Skip to content

fix: Rewrite upper right document search box#10538

Merged
jennifer-richards merged 2 commits intoietf-tools:mainfrom
ekr:fix_search_dropdown
Apr 8, 2026
Merged

fix: Rewrite upper right document search box#10538
jennifer-richards merged 2 commits intoietf-tools:mainfrom
ekr:fix_search_dropdown

Conversation

@ekr
Copy link
Copy Markdown
Contributor

@ekr ekr commented Mar 12, 2026

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

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>
@ekr ekr changed the title Rewrite upper right document search box. Fixes #10358 fix: Rewrite upper right document search box. Fixes #10358 Mar 12, 2026
@jennifer-richards jennifer-richards changed the title fix: Rewrite upper right document search box. Fixes #10358 fix: Rewrite upper right document search box Mar 16, 2026
Copy link
Copy Markdown
Member

@jennifer-richards jennifer-richards left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Image

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.

Comment thread ietf/templates/base.html Outdated
@ekr
Copy link
Copy Markdown
Contributor Author

ekr commented Mar 27, 2026

Updated per review comments.

@jennifer-richards jennifer-richards merged commit f39e916 into ietf-tools:main Apr 8, 2026
2 checks passed
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.39%. Comparing base (d50e812) to head (2cbc378).
⚠️ Report is 40 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 12, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Document search" box shouldn't autocomplete

3 participants