Marking Component As Non-Interactive If Hover/Unhover Hooks Are Not Exists#654
Marking Component As Non-Interactive If Hover/Unhover Hooks Are Not Exists#654suresh-gangumalla wants to merge 3 commits intolightning-js:devfrom
Conversation
Component's hoverable configuration property will alter holder node `interactive` flag Signed-off-by: Suresh Kumar Gangumalla <sureshkumar.gangumalla@invecas.com>
Test Results: ✅ PASSEDRun at: 2026-04-07T08:58:52.179Z Summary: |
|
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 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>
Test Results: ✅ PASSEDRun at: 2026-04-15T12:42:24.919Z Summary: |
hoverable config property| const identifier = | ||
| this.element && this.element.component | ||
| ? this.element.component[symbols.identifier] | ||
| : undefined |
There was a problem hiding this comment.
what are the use cases where this.element and this.element.component are undefined?
| } else { | ||
| this.props['interactive'] = v | ||
| } |
There was a problem hiding this comment.
should we not skip this else block?
| } | ||
|
|
||
| export const hasHook = (hook, identifier) => { | ||
| return !!(cbs[identifier] && cbs[identifier][hook]) |
There was a problem hiding this comment.
maybe rewrite to cbs[identifier] !== undefined && hook in cbs[identifier] ?
Signed-off-by: Suresh Kumar Gangumalla <sureshkumar.gangumalla@invecas.com>
Test Results: ✅ PASSEDRun at: 2026-04-16T06:01:30.060Z Summary: |
Component's hoverable configuration property will alter holder node
interactiveflag