Skip to content

Marking Component As Non-Interactive If Hover/Unhover Hooks Are Not Exists#654

Open
suresh-gangumalla wants to merge 3 commits intolightning-js:devfrom
suresh-gangumalla:omit-overlay-components
Open

Marking Component As Non-Interactive If Hover/Unhover Hooks Are Not Exists#654
suresh-gangumalla wants to merge 3 commits intolightning-js:devfrom
suresh-gangumalla:omit-overlay-components

Conversation

@suresh-gangumalla
Copy link
Copy Markdown
Collaborator

Component's hoverable configuration property will alter holder node interactive flag

Component's hoverable  configuration property will
alter holder node `interactive` flag

Signed-off-by: Suresh Kumar Gangumalla <sureshkumar.gangumalla@invecas.com>
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 7, 2026

Test Results: ✅ PASSED

Run at: 2026-04-07T08:58:52.179Z

Summary:
passed: 1178 failed: 8 of 1186 tests

@michielvandergeest
Copy link
Copy Markdown
Collaborator

hey @suresh-gangumalla, this looks good! But it does mean that we're introducing a somewhat arbitrary component config prop.

I had another idea, and I'm not sure how feasible it is, but it would make this whole thing pretty "automagic": what if we keep the generator the same (i.e. setting holder prop to true for all components) and then in the holder prop we verify if the component has a hover (or unhover, would that make sense to track separately?) hook specified. And if it does the component is considered to be hoverable

can you look into that approach?

if component does not registered hover/unhover hooks in component
configuation then that component subjected to non interactive by setting
`interactive` on holder node to false.

Signed-off-by: Suresh Kumar Gangumalla <sureshkumar.gangumalla@invecas.com>
@github-actions
Copy link
Copy Markdown

Test Results: ✅ PASSED

Run at: 2026-04-15T12:42:24.919Z

Summary:
Tests passed. No summary found in output.

@suresh-gangumalla suresh-gangumalla changed the title Added hoverable config property Marking Component As Non-Interactive If Hover/Unhover Hooks Are Not Exists Apr 15, 2026
Comment thread src/engines/L3/element.js Outdated
Comment on lines +532 to +535
const identifier =
this.element && this.element.component
? this.element.component[symbols.identifier]
: undefined
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what are the use cases where this.element and this.element.component are undefined?

Comment thread src/engines/L3/element.js Outdated
Comment on lines +538 to +540
} else {
this.props['interactive'] = v
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we not skip this else block?

Comment thread src/lib/hooks.js Outdated
}

export const hasHook = (hook, identifier) => {
return !!(cbs[identifier] && cbs[identifier][hook])
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe rewrite to cbs[identifier] !== undefined && hook in cbs[identifier] ?

Signed-off-by: Suresh Kumar Gangumalla <sureshkumar.gangumalla@invecas.com>
@github-actions
Copy link
Copy Markdown

Test Results: ✅ PASSED

Run at: 2026-04-16T06:01:30.060Z

Summary:
Tests passed. No summary found in output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants