elements
elements copied to clipboard
Search (more more like filter) for API Component
User story.
As a docs viewer, I can do filter ToC, so that I can find the operations I am looking for easily on large APIs.
Is your feature request related to a problem?
StoplightProject will have a proper search powered by our public API, but Elements "API component" users will not have this. We still need to provide them a way to help filtering out only relevant results in the ToC.
Describe the solution you'd like
- Filter ToC if search term is found in any of these 5 locations:
- title
- operationId
- path
- description
- summary
- if a group is empty then nothing should be shown
- search results can show in a flat list, and if this is bad UI we can change that later
- Should literally filter down the sidebar
- No designs for this one, but it could highlight the text somehow (yellow highlight)
Whole implementation should be in this component:
https://github.com/stoplightio/elements/blob/main/packages/elements-core/src/components/MosaicTableOfContents/TableOfContents.tsx
WARNING!!! This is a more complex, involved issue, likely requiring some time and effort.
If you decide that you are up for the challenge, contact me and I will give you all the help and support that I can! :)
Whole implementation should be in this component:
https://github.com/stoplightio/elements/blob/main/packages/elements-core/src/components/MosaicTableOfContents/TableOfContents.tsx
WARNING!!! This is a more complex, involved issue, likely requiring some time and effort.
If you decide that you are up for the challenge, contact me and I will give you all the help and support that I can! :)
Does this offer still stand?