-
Notifications
You must be signed in to change notification settings - Fork 11
Conversation
`hierarchy.lvl5:${snipetLength.current}`, | ||
`hierarchy.lvl6:${snipetLength.current}`, | ||
`content:${snipetLength.current}`, | ||
`hierarchy.lvl1:${snippetLength.current}`, |
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.
good catch!
@orta Thanks for the contribution! Before reviewing this PR, could you please let us know why you decided not to use the default |
It doesn't suite the website style - I'm OK with the modal looking out of place, but not a top nav design element |
Hi Orta, As I'm very interested by the developer experience that our user will have and report with this release I'd like to know if moving back to the button is an option for you. If we were to allow a generic dark feel to the search button, would you be more likely to use it? And if if not I'd really appreciate if you could elaborate on the reasons to let us adapt our product. |
Probably not, but I'm open to seeing what it looks like though and could change my mind, the design of our site is pretty set in stone at this point. 👍 I totally see what you're going for as a button. Makes sense, and when you use the mouse it does the popover straight away, but I can't make that happen when you do focus via the keyboard (you can't tab through the page then) so I could either open the modal when there's a keypress which might lose characters (and would still need this PR) or I can send a keyboard user when they press return (which was my current implementation) https://typescript-v2-690.vercel.app if you want to try |
Thanks a lot @orta for raising this concern, I'm glad you catched this before any release! <3 |
🎉 thanks folks |
Summary
I've been looking at integrating the react version of the docsearch into the TS website in lieu of algolia/docsearch#955 in this PR microsoft/TypeScript-Website#690
The bug in the text to speech isn't present in the new version (the HTML is simpler, and contains the full text of each result )- which solves that issue, but I need to be able to pass an initial query into the modal, so that I can have someone type in the input and then send that off.
That said, I'm not too sure if this is the right way to do it vs all the
useX
functions that are around but at least it proves the concept