From bc215511853054a2e93eab9abd6655c04158d8f4 Mon Sep 17 00:00:00 2001
From: Andrew <159703254+andrewsoonqn@users.noreply.github.com>
Date: Mon, 6 Jul 2026 13:01:21 +0800
Subject: [PATCH 1/4] Implement plugin search functionality
---
resources/web/dialog/PluginsDialog/index.html | 23 +++
resources/web/dialog/PluginsDialog/index.js | 83 ++++++++--
.../dialog/PluginsDialog/plugin-search.css | 116 +++++++++++++
.../web/dialog/PluginsDialog/plugin-search.js | 156 ++++++++++++++++++
4 files changed, 368 insertions(+), 10 deletions(-)
create mode 100644 resources/web/dialog/PluginsDialog/plugin-search.css
create mode 100644 resources/web/dialog/PluginsDialog/plugin-search.js
diff --git a/resources/web/dialog/PluginsDialog/index.html b/resources/web/dialog/PluginsDialog/index.html
index 853d1a8464..fa15b792e0 100644
--- a/resources/web/dialog/PluginsDialog/index.html
+++ b/resources/web/dialog/PluginsDialog/index.html
@@ -6,6 +6,7 @@
diff --git a/resources/web/dialog/PluginsDialog/plugin-search.css b/resources/web/dialog/PluginsDialog/plugin-search.css
index 99d9128aa2..985d37528c 100644
--- a/resources/web/dialog/PluginsDialog/plugin-search.css
+++ b/resources/web/dialog/PluginsDialog/plugin-search.css
@@ -107,6 +107,28 @@
border-color: var(--main-color-hover);
}
+/* "ab" over a bracket drawn by ::after box draws it */
+.plugin-search-underline {
+ position: relative;
+ display: inline-block;
+ padding-bottom: 2px;
+}
+.plugin-search-underline::after {
+ content: "";
+ position: absolute;
+ /* why: ticks stick out past the outer edges of "a"/"b" on each side. */
+ left: -1px;
+ right: -1px;
+ bottom: 0;
+ /* why: short ticks + bottom rule, tucked near the baseline. */
+ height: 2px;
+ border: 1px solid currentColor;
+ border-top: 0;
+ /* why: soften the two joints where the ticks meet the bottom rule. */
+ border-bottom-left-radius: 2px;
+ border-bottom-right-radius: 2px;
+}
+
/* why: reuse the themed warn tokens so matched-char marks track light and dark automatically.
note: no padding/margin/border - a highlight must not change text width, else rows reflow. */
mark.plugin-search-hit {