fix: Rewrite upper right document search box#10538
fix: Rewrite upper right document search box#10538jennifer-richards merged 2 commits intoietf-tools:mainfrom
Conversation
This is a fix to the problem where the first item in the dropdown is auto-selected and then when you hit return you go to that rather than searching for what's in the text field. It appears to be challenging to get this behavior with select2, so this is actually a rewrite of the box with explicit behavior. As a side effect, the draft names actually render a bit better. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
jennifer-richards
left a comment
There was a problem hiding this comment.
Thanks for this. I think it needs a couple tweaks before we can merge it.
The draft names are all cut off by the right-hand side of the window, showing in many cases the least informative part of draft names. The old wrapped names were a little awkward, but this seems less usable to me.
Also, we should extract the JS code into a module rather than inlining it in base.html. This commit shows what's needed, but I'd be happy to do that refactor if you prefer.
|
Updated per review comments. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #10538 +/- ##
==========================================
- Coverage 88.39% 88.39% -0.01%
==========================================
Files 326 330 +4
Lines 43813 44255 +442
==========================================
+ Hits 38727 39117 +390
- Misses 5086 5138 +52 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This is a fix to the problem where the first item in the dropdown is auto-selected and then when you hit return you go to that rather than searching for what's in the text field.
It appears to be challenging to get this behavior with select2, so this is actually a rewrite of the box with explicit behavior. As a side effect, the draft names actually render a bit better.
Fixes #10358