-
-
Notifications
You must be signed in to change notification settings - Fork 733
Implement Search as ARIA spec compliant* dialog and combobox pattern #2831
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
Conversation
src/lib/output/themes/default/assets/typedoc/components/Search.ts
Outdated
Show resolved
Hide resolved
src/lib/output/themes/default/assets/typedoc/components/Search.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple general issues:
- With no search history, typing something and then clearing the search field results in the claim "No Recent Searches"... which is rather confusing, I just searched for something! Didn't click on anything, but... maybe that's expected, but it greatly confused me for a bit.
- This introduced some contrast issues in the new search dialog (run chromium's lighthouse checks)
This is looking really awesome! It seems to behave significantly better on mobile and I like the change on desktop as well
Regarding the recent searches message, yup, totally agree, I think even left a comment about in the code that it's actually search results. I picked up it up from remix.run, and I'm confused what to show there, "no recent... What?" |
Would it be better to just not show anything there? It's a different dialog size, but just showing a search bar the first time it is opened doesn't seem completely wrong to me. I also just realized that storing IDs is not necessarily the way we should go about that. IDs are somewhat likely to change between rebuilds of the site as they are dependent on conversion order, so if the very first class TypeDoc converts gets a new property, all the IDs will end up shifted. |
Edit: Removing it. ...Yup, I mainly added for cosmetic UX purposes. It's not important and I already had doubts about it (that's why it's the last commit).Without anything it feels.. empty. I'll get some quick design advice on this, otherwise I'll just remove it. And yes I tested the change of IDs, I still added it on the premises that atleast it won't crash. From commit message:
It was the simplest way to achieve it, and I don't wanna make it complicated, so I'll probably just remove it. But I don't think occasional changing suggestions is a big deal. But after all, it is a bug. So here's my confusion:
Tradeoffs everywhere.. What are your thoughts about it? |
src/lib/output/themes/default/assets/typedoc/components/Search.ts
Outdated
Show resolved
Hide resolved
src/lib/output/themes/default/assets/typedoc/components/Search.ts
Outdated
Show resolved
Hide resolved
I've merged this into the beta branch |
It will now behave correctly if a custom theme overrides `getReflectionClasses` to include additional non-filter classes.
Thank you! |
Pretty much a complete rewrite of the UI and UI logic for search.
UI Changes:
ready
class from search element.More details are in commit messages. I haven't updated the changelog, because I don't know what's relevant.
Visual Regression script probably won't detect the change?
*Mostly. There might be minor variations