elements icon indicating copy to clipboard operation
elements copied to clipboard

Search (more more like filter) for API Component

Open philsturgeon opened this issue 4 years ago • 2 comments

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

image
  1. Filter ToC if search term is found in any of these 5 locations:
  • title
  • operationId
  • path
  • description
  • summary
  1. if a group is empty then nothing should be shown
  2. 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)

philsturgeon avatar Mar 31 '21 13:03 philsturgeon

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! :)

mpodlasin avatar Oct 04 '21 10:10 mpodlasin

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?

weyert avatar Apr 24 '24 16:04 weyert