From d2d109a69c5524d4946cf5b78d31e47a6323dd9f Mon Sep 17 00:00:00 2001 From: Will Miao Date: Fri, 26 Jun 2026 09:53:04 +0800 Subject: [PATCH] feat(ui): replace native sort select with custom dropdown sized to selected text --- static/css/layout.css | 151 +++++++++ static/js/components/controls/PageControls.js | 2 + static/js/components/controls/SortDropdown.js | 290 ++++++++++++++++++ static/js/recipes.js | 2 + templates/components/controls.html | 9 +- 5 files changed, 452 insertions(+), 2 deletions(-) create mode 100644 static/js/components/controls/SortDropdown.js diff --git a/static/css/layout.css b/static/css/layout.css index 7122cc3b..863a3ba1 100644 --- a/static/css/layout.css +++ b/static/css/layout.css @@ -281,6 +281,157 @@ box-shadow: none; } +/* === Sort dropdown — decoupled trigger width =========================== + The native is kept in the DOM + (visually hidden) so existing JS that reads/writes `.value` / `.disabled` + and dynamically adds/removes