Reimagine the settings view#5379
Merged
Merged
Conversation
New reusable Lit controls under shared/components, used by the redesigned Settings page and available to other webviews: - gl-switch and gl-slider wrap Web Awesome's wa-switch/wa-slider with VS Code theming (checked styling via the :state(checked) custom state) - gl-segmented-control implements the WAI-ARIA radio-group pattern with roving focus and selection-follows-focus arrow keys; its roving-focus selector escapes the option value (CSS.escape) so a value with a quote or selector metacharacter can't break arrow-key movement - gl-icon-cube renders an icon in a rounded, tinted container with a size CSS property and a brand (gradient) appearance - All expose contrast-safe borders for high-contrast themes and emit gl-change-value (slider also emits gl-input-value while dragging) - gl-switch and the shared gl-select gain accessible names; adds a shared linkify helper for rendering inline links Co-Authored-By: Claude <noreply@anthropic.com>
Extension-side backend for the redesigned Settings page: - A settings RPC sub-service with scope-aware config updates (preserving the default-stripping and customSettings semantics), format previews rendered by the real CommitFormatter, and buffered config / integrations / anchor change events derived from the shared services - Updates the protocol, registration, and webview controller to drive the new Lit app and preserve all gitlens.showSettingsPage!<anchor> deep links Co-Authored-By: Claude <noreply@anthropic.com>
Replaces the legacy DOM-binding settings app (28 HTML partials, ~380 data-setting bindings, ~90 static preview images) with a Lit app following the newest webview conventions (signals-based state, the shared RPC services).
- A typed declarative settings model — every setting is a ConfigPath-keyed descriptor, with the legacy visibility/enablement expression grammar ported verbatim for full parity (the parser keeps the full right-hand side of compound expressions); all legacy settings remain editable
- A two-pane layout: a searchable, grouped, resizable category rail (persisted width) paired with a detail pane and master toggles. Search matches literal setting names (e.g. gitlens.currentLine.format), labels, and categories, scrolls the match into view, shows a result count and a polite live region, and offers an Open in Settings UI escape hatch for settings not surfaced on the page (Ctrl/Cmd+F focuses it)
- Connection-aware nav cues: an Autolinks rule count and per-category status pips that agree with the rendered controls
- Live, state-driven previews that react to changes as they happen, rendered with the CSP-safe cspStyleMap so positions/colors/sizes apply on first render; the CodeLens preview shows all three scopes and the avatar placeholders stay visible in high-contrast themes
- Full keyboard support and a11y across the rail and detail pane, listbox semantics with aria-selected, decorative status pips, and unit-aware slider announcements; dependent controls dim once (not twice) under an off master
- Robust input handling: number and format inputs buffer in-progress edits and discard them when the control is reused for another setting; config writes clone objects before mutating and dedupe array toggles
- Custom autolink rules validate <num>/prefix inline, are named by their prefix, don't vanish while editing, and the Case-sensitive option now matches its label
- Category hints can link to commands and docs
- Removes a dead rebaseEditor.showDetailsView control and fixes two legacy bugs: a sortRepositoriesBy option value typo ('dcovered') and a wrong menus.ghpr enablement expression
- Removes the legacy HTML partials and static preview images the live previews replace
Two net-new categories, driven by the shared subscription / integrations / AI RPC services: - Cloud Integrations: a row per supported integration with connection status and connect / upgrade / manage / synchronize actions - AI: provider and model, GitKraken MCP, default coding agent, and Claude Code hooks rows with command-driven actions, plus a master switch bound to gitlens.ai.enabled (an org-disabled state shows an admin notice) - Failed service fetches render an inline error with a Retry action instead of an indefinite skeleton, and use the semantic --vscode-testing-iconPassed token so custom and high-contrast themes keep their contrast
|
This pull request is abnormally large and would use a significant amount of tokens to review. If you still wish to review it, comment "augment review" and we will review it. |
Apply each config change to the local snapshot before the write round-trips, so rapid edits to the same composite setting (the menus object, checkgroups, autolinks) accumulate instead of recomputing from the lagging host echo and clobbering each other; a failed write rolls back. Also guard the shared-service loads so a superseded retry's late resolution can't overwrite fresher data.
Only render http/https/mailto/command (or scheme-less) targets as links; anything else, such as a percent-encoded javascript: payload, falls back to literal text.
Announce the slider's unit via wa-slider's valueFormatter, surface the switch's disabled reason through wa-switch's hint (aria-describedby), replace the token menu's listbox/option misuse with a labeled group of buttons, and use the shared sr-only helper in the nav. Also highlight only the first visible variant of a paired control so duplicate-key descriptors don't double-highlight.
Move the debounced format-preview fetches into willUpdate so render stays pure.
- Restores the Commit Graph date-style hints - Merges the split Views settings descriptors into one array
Restores the cohesive single-row layout for autolink rules in the redesigned Settings. The Case-sensitive/Alphanumeric checkboxes wrapped to a second row and read as detached parts; folding them back into the prefix field as embedded Aa/a1 toggles (mirroring the gl-search-input field pattern) keeps the prefix and its options as one control and stops the row from wrapping. Keeps the corrected, non-inverted ignoreCase semantics with aria-pressed state plus aria-label/title tooltips for discoverability. Co-Authored-By: Ona <no-reply@ona.com>
5c4f9bf to
49a319f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.