Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

filter docs by user input #1025

Closed

Conversation

BoldBigflank
Copy link

WIP plugin to let the user filter fields

Example:
image
after:
image

To Do:
Style the input
Make sure the filter updates Accessors, Methods, etc.
Add a "And ## hidden (show)" indicator that clicking will reset the filter
Fix the input lag (decouple it from rerendering the boxes)

Copy link

vercel bot commented Dec 2, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
documentation ❌ Failed (Inspect) Dec 2, 2023 9:52pm

@RaananW
Copy link
Member

RaananW commented Dec 4, 2023

Thank you so much!!

Seems like there is a typing issue:

Failed to compile.
[22:52:01.657] 
[22:52:01.657] ./lib/buildUtils/parser.utils.ts:91:46
[22:52:01.657] Type error: Property 'properties' does not exist on type 'Parent<Node<Data>, Data>'.
[22:52:01.657] 
[22:52:01.657] �[0m �[90m 89 | �[39m        �[36mvar�[39m props �[33m=�[39m node�[33m.�[39mproperties�[33m;�[39m�[0m
[22:52:01.657] �[0m �[90m 90 | �[39m�[0m
[22:52:01.657] �[0m�[31m�[1m>�[22m�[39m�[90m 91 | �[39m        �[36mif�[39m (node�[33m.�[39mtagName �[33m===�[39m �[32m'li'�[39m �[33m&&�[39m parent�[33m?�[39m�[33m.�[39mproperties�[33m?�[39m�[33m.�[39mclassName�[33m?�[39m�[33m.�[39mincludes(�[32m'tsd-index-list'�[39m)) {�[0m
[22:52:01.657] �[0m �[90m    | �[39m                                             �[31m�[1m^�[22m�[39m�[0m
[22:52:01.658] �[0m �[90m 92 | �[39m            �[36mconst�[39m textString �[33m=�[39m node�[33m.�[39mchildren[�[35m0�[39m]�[33m.�[39mchildren�[33m.�[39mfilter((c) �[33m=>�[39m c�[33m.�[39mtype �[33m===�[39m �[32m'text'�[39m)�[33m.�[39mmap((c) �[33m=>�[39m c�[33m.�[39mvalue)�[33m.�[39mjoin(�[32m''�[39m)�[0m
[22:52:01.658] �[0m �[90m 93 | �[39m            �[36mif�[39m (options�[33m.�[39mfilterString �[33m&&�[39m �[33m!�[39mtextString�[33m.�[39mincludes(options�[33m.�[39mfilterString)) {�[0m
[22:52:01.658] �[0m �[90m 94 | �[39m                �[0m
[22:52:01.728] error Command failed with exit code 1.
[22:52:01.728] info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
[22:52:01.750] Error: Command "yarn run build" exited with 1
[22:52:02.484] 

@RaananW
Copy link
Member

RaananW commented Dec 4, 2023

Sorry - bad formatting...

./lib/buildUtils/parser.utils.ts:91:46
--
22:52:01.657 | Type error: Property 'properties' does not exist on type 'Parent<Node<Data>, Data>'.
22:52:01.657 |  
22:52:01.657 | 89 \|         var props = node.properties;
22:52:01.657 | 90 \|
22:52:01.657 | > 91 \|         if (node.tagName === 'li' && parent?.properties?.className?.includes('tsd-index-list')) {
22:52:01.657 | \|                                              ^
22:52:01.658 | 92 \|             const textString = node.children[0].children.filter((c) => c.type === 'text').map((c) => c.value).join('')
22:52:01.658 | 93 \|             if (options.filterString && !textString.includes(options.filterString)) {
22:52:01.658 | 94 \|
22:52:01.728 | error Command failed with exit code 1.
22:52:01.728 | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
22:52:01.750 | Error: Command "yarn run build" exited with 1

You can run npm run build:local locally to see the error as well

@RaananW
Copy link
Member

RaananW commented Jan 26, 2024

any news on this one?

@RaananW
Copy link
Member

RaananW commented Feb 9, 2024

Closing for now, feel free to reopen if you have any updates :-)

@RaananW RaananW closed this Feb 9, 2024
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.

3 participants