Closed devajmeireles closed 1 year ago
Thank you! I've been wanting to add this, and I prefer your naming of hint
:grin:
I'm going to mark this as draft until I've done a review for Taylor.
I've made a small tweak to prevent reserving an extra line for errors when a hint is provided because the errors will use that same line.
I've also made the hint appear while searching otherwise it flashes away briefly when the search callback isn't instantaneous.
The only other thing I'm considering is whether to hide the hint when the search
/suggest
dropdown is visible rather than the hint jumping down the screen. This would feel a bit more like the web, where a <select>
dropdown appears in front of the other content on the page, but with the downside that the hint isn't always visible.
I've made a small tweak to prevent reserving an extra line for errors when a hint is provided because the errors will use that same line.
I've also made the hint appear while searching otherwise it flashes away briefly when the search callback isn't instantaneous.
The only other thing I'm considering is whether to hide the hint when the
search
/suggest
dropdown is visible rather than the hint jumping down the screen. This would feel a bit more like the web, where a<select>
dropdown appears in front of the other content on the page, but with the downside that the hint isn't always visible.
For me, it looks fantastic! I believe so, it will be better to hide the tooltip when search
/select
is opened. Do you want me to do this? Let me know if I can help.
I've made a small tweak to prevent reserving an extra line for errors when a hint is provided because the errors will use that same line. I've also made the hint appear while searching otherwise it flashes away briefly when the search callback isn't instantaneous. The only other thing I'm considering is whether to hide the hint when the
search
/suggest
dropdown is visible rather than the hint jumping down the screen. This would feel a bit more like the web, where a<select>
dropdown appears in front of the other content on the page, but with the downside that the hint isn't always visible.For me, it looks fantastic! I believe so, it will be better to hide the tooltip when
search
/select
is opened. Do you want me to do this? Let me know if I can help.
On second thought, I also have no problem keeping the hint for search
/select
. Seems to work fine in my tests.
@jessarcher , Can I mark the PR as ready for review? I don't know when to do this. Let me know if I can help with anything else.
On second thought, I also have no problem keeping the hint for
search
/select
. Seems to work fine in my tests.
Agreed - I just tried hiding it when the search/suggest menu is visible and I think I prefer it how it is.
Considering the stylization of the prompt that reminds us of the idea we have in HTML where the typed value is inserted in an input, this PR aims to add
hits
to the inputs: small blocks of text that allow us to give hints, similar to what we do in HTML:Notes: