Skip to content

Conversation

@BenediktSeidlSWM
Copy link
Contributor

No description provided.

@BenediktSeidlSWM
Copy link
Contributor Author

@manisandro Hi, did you manage to take a look at this pull request yet? If you have any suggestions on how to improve this feature, please let me know. Cheers

@manisandro
Copy link
Member

@BenediktSeidlSWM Sorry, didn't yet get around properly reviewing this. As a very general remark, it would be great to introduce a generic and reusuable keyboard navigatable list component to hide the complexity in consumer components.

this.resultIndex = 0;
// Reset the reference to the selected result
this.selectedResultEl = null;
// Build the different sections of the search results
Copy link
Member

Choose a reason for hiding this comment

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

Can we be sure that the menu will never be re-rendered while key-navigating?

@BenediktSeidlSWM
Copy link
Contributor Author

BenediktSeidlSWM commented Oct 8, 2025

I will take a look into how a reusable list component could be split out of this plugin.

One thing I noticed which increases the complexity of this component is the support of nested search results. It becomes relevant at this line. @manisandro Do you know how relevant it is that these results are nested in the DOM? Maybe the indentation of each result could be passed in some other way (recursion depth as a variable). If the new list component supported only a flat list without any nested structures, that would make a refactoring of the component less complex.

@manisandro
Copy link
Member

I think a flat list with indentation should also work well

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