feat(quickTools): replace checkbox with height select & dynamic toggler#2278
Conversation
- Replace quickTools true/false checkbox with Off/Compact/Full (0/1/2)
height selector
- Move floatingButton and quickTools settings into dedicated
"Quick Tools" settings category
- Manage $toggler element dynamically via appendOuter/remove instead of
CSS class toggle (hide-floating-button)
- Add 4 translation keys ("compact", "off", "quick tools height",
"quick tools toggler") across all 32 language files
- Update default quicktoolsItems ordering
Bug fixes:
- Cancel pending .hide timeout before re-appending toggler to prevent
race condition removal after re-connect
- Remove .hide class on re-append to prevent invisible toggler
(opacity: 0 !important)
- Coerce legacy boolean quickTools values to number for select handler
Greptile SummaryThis PR replaces the binary
Confidence Score: 4/5Mostly safe to merge; the undo/redo button state can be incorrect after closing a search-replace session, but it is self-correcting on the next document change. The undo/redo disabled state is not refreshed when the search bar is dismissed and the quick-tools rows are re-inserted into the footer. A replace operation during search leaves the undo button silently stuck in its pre-search state until the user types again. All other changes — toggler lifecycle, height coercion, search state deferral, and settings persistence — look correct. src/handlers/quickTools.js — the search-bar action stack callback that restores footer content should call Important Files Changed
Sequence Diagram%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
participant User
participant QuickTools
participant ActionStack
participant Footer
participant AppSettings
User->>QuickTools: toggleSearch()
QuickTools->>QuickTools: save activeSearchState
QuickTools->>Footer: "content = [$searchRow1, $searchRow2]"
QuickTools->>ActionStack: push("search-bar", restoreAction)
Note over Footer: $row1/$row2 NOT in footer
User->>Footer: make replacement (docChanged)
Footer-->>QuickTools: editor-state-changed
QuickTools->>Footer: "querySelectorAll([data-id="undo"]) → empty"
Note over QuickTools: undo/redo buttons NOT updated ⚠️
User->>QuickTools: close search
QuickTools->>ActionStack: pop restoreAction()
QuickTools->>Footer: "content = restoreState.content"
QuickTools->>QuickTools: "activeSearchState = null"
Note over QuickTools: updateHistoryButtons() NOT called → stale state
User->>QuickTools: change quickTools height
QuickTools->>AppSettings: update quickTools value
AppSettings->>QuickTools: "setHeight(height, save=false)"
Note over QuickTools: search active → update activeSearchState, return early
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
participant User
participant QuickTools
participant ActionStack
participant Footer
participant AppSettings
User->>QuickTools: toggleSearch()
QuickTools->>QuickTools: save activeSearchState
QuickTools->>Footer: "content = [$searchRow1, $searchRow2]"
QuickTools->>ActionStack: push("search-bar", restoreAction)
Note over Footer: $row1/$row2 NOT in footer
User->>Footer: make replacement (docChanged)
Footer-->>QuickTools: editor-state-changed
QuickTools->>Footer: "querySelectorAll([data-id="undo"]) → empty"
Note over QuickTools: undo/redo buttons NOT updated ⚠️
User->>QuickTools: close search
QuickTools->>ActionStack: pop restoreAction()
QuickTools->>Footer: "content = restoreState.content"
QuickTools->>QuickTools: "activeSearchState = null"
Note over QuickTools: updateHistoryButtons() NOT called → stale state
User->>QuickTools: change quickTools height
QuickTools->>AppSettings: update quickTools value
AppSettings->>QuickTools: "setHeight(height, save=false)"
Note over QuickTools: search active → update activeSearchState, return early
Reviews (5): Last reviewed commit: "fix" | Re-trigger Greptile |
…e touchMoveThreshold category - Wrap clearTimeout/remove-hide/appendOuter inside floatingButton guard in editorFile.js else-branch to prevent toggler resurrection race when floatingButton is disabled during hide animation - Move touchMoveThreshold back to categories.interface (it's a global touch setting, not quick-tools specific)
This comment was marked as outdated.
This comment was marked as outdated.
… trigger mode display - Move touchMoveThreshold back to categories.interface and reorder it before the Quick Tools section in the settings list - Add valueText callback for quickToolsTriggerMode to display capitalized labels (Click/Touch) in the settings row
…leanup - Remove isConnected check from toggler hide paths in appSettings, applySettings, and editorFile — hide logic now always executes so disabling floatingButton reliably hides the toggler - Replace early return in setHeight() with else branches so rows beyond target height are removed (fixes compact mode not reducing from full height)
…/Acode into ajit/improve-quicktools
Bug fixes:
Cancel pending .hide timeout before re-appending toggler to prevent race condition removal after re-connect
Remove .hide class on re-append to prevent invisible toggler (opacity: 0 !important)
Coerce legacy boolean quickTools values to number for select handler
fix state sync on settings page in search mode
fix search panel behaviour on switching the tab
Keep undo/redo disabled when there is nothing to undo/redo
add paste command to add in quicktools