Repository navigation
π Settings search: scroll to and highlight the exact setting, resolve tab from the DOM - #12035
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Generated by changelog-fragment-guard from the PR title (#5675). Edit the wording freely, or replace this file with the no-changelog label if the change is not user-visible. Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Signed-off-by: clubanderson <407614+clubanderson@users.noreply.github.com>
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
Clicking a result or "Open tab" switched tabs and left the user at the top of a long tab; hits in the hand-maintained index could also point at a tab that has no such control (dashboard.strategy_lab under Features). - Result rows and Open tab resolve the target tab from where the key is rendered, scroll the row into view inside #config-body, flash it (.cfg-row-flash, reduced-motion aware) and focus its control. - Enter in the search box opens the first result. - Every setting row carries data-setting-key; rows that lacked a yaml hint got explicit anchors (logging, watchdog, otel, ioscan, retro, rotation, thresholds, SLA targets, acmm_level). - Fixed/removed drifted index entries; node-backed webstatic tests audit every entry against the rendered tabs. Signed-off-by: Andrew Anderson <andy@clubanderson.com>
Smooth-scrolling a ~10k px dialog body landed short when sections above the row grew from their own fetches mid-scroll (Features tab). Scroll instantly and re-centre once if the row left the viewport. Signed-off-by: Andrew Anderson <andy@clubanderson.com>
Generated by changelog-fragment-guard from the PR title (#5675). Edit the wording freely, or replace this file with the no-changelog label if the change is not user-visible. Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Signed-off-by: clubanderson <407614+clubanderson@users.noreply.github.com>
Signed-off-by: Andrew Anderson <andy@clubanderson.com>
09eddb4 to
7bdbb83
Compare
|
merged by Hive trusted-author auto-merge: author @clubanderson holds role owner and GitHub permission admin on repo; CI green at 7bdbb83. |
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
Fixes #12034
What
Settings search now takes you to the exact setting.
role=button), and Open tab / Enter in the search box all go throughsettingsSearchOpenHit: resolve the tab,switchConfigTab, then after a frame scroll the row into view inside#config-body(scrollIntoView({block:'center'})), apply a transient.cfg-row-flash(1.6s, token colours,prefers-reduced-motionβ static outline) and focus the row's input/select/toggle. Ancestor<details>/.collapsedgroups are opened first. Rows a tab fills in after its own fetch get a few short retries; because Features-like tabs grow above the row for a moment after render, the scroll is instant and re-centres once if the row left the viewport.data-setting-key(settingsAnnotateRows: own attribute β yaml-hint<code>βdata-section/data-key), andsettingsSearchResolveTab(tab, key)picks the tab where the key actually renders, falling back to the index'stabonly when nothing is rendered. Result groups and "Open tab" use the resolved tab, so a drifted entry can no longer strand you (verified by a test that injects a deliberately wrong entry).governor.modes.*.threshold, SLA targets,acmm_level).acmm_level, Restart thresholds keygovernor.modes, removed Release channel (lives in the dashboard release notice, not Settings) and Knowledge channel (no such control), marked the two Context7 entrieslazy.Tests (
pkg/dashboard/webstatic/settings_search_test.go, node-backed, notime.Sleep)A mini-DOM harness (
testdata/settings_search_harness.js) runs the realindex.htmlfunctions, including rendering all 24 governor tabs:TestSettingsSearchOpenTabRevealsRowβ groups = [Dashboard], Dashboard active, row hascfg-row-flash,scrollIntoViewcalled once on that row withblock:'center', focus on it, search cleared.TestSettingsSearchRowClickAndEnter,TestSettingsSearchRevealExpandsDetails,TestSettingsSearchDriftedEntryResolvesFromDOM,TestSettingsSearchRevealRetriesLazyRows.TestSettingsSearchIndexResolvesToControlsβ iterates every static index entry, renders all tabs, asserts each key resolves to exactly one rendered control in the tab it claims (group keys β₯1). On v6 it flagsExperiment Labascontrol renders in Dashboard, not Featuresuntil that entry is corrected.Style/tooltip ratchets unchanged; existing ids/classes kept.
go build ./... && go test ./pkg/dashboard/...green.Live verification (v5 spoke, patched index served over live data)
Before β "strategy" lists under Features and Dashboard; Open tab on Features lands on a tab with no such control:
After β single Dashboard result; Open tab lands on the flashed row:
Deep row β "trajectory" β Features, scrolled 7658px into the tab, row centred and highlighted:
Input focus β "max backups" β Logging, input focused:
Forward-merge to v6 (needed)
The Settings dialog code is shared; the console v6 hive shows the same bug with
dashboard.experiment_lab. Trial cherry-pick ontoorigin/v6: onlyindex.htmlconflicts, both hunks insideSETTINGS_SEARCH_STATIC_HITS(v6 renamed Strategy Lab β Experiment Lab and added entries). Resolution: keep v6's entries, set Maturity Levelkey: 'acmm_level', change the Experiment Lab entry totab: 'Dashboard', section: 'Dashboard runtime'. The test scenarios referencedashboard.strategy_laband must be renamed todashboard.experiment_labon v6; with that, all six tests and the audit (326 entries, 208 keys, 0 problems) pass on v6.