Repository navigation
Closed
Labels
Description
Problem
More → Edit as JSON… for a widget, and Edit as JSON… for a profile, open a SwiftUI TextEditor (BarInspector.jsonSheet and ProfileJSONSheet in ProfilesView.swift on main). Editing JSON there is hard:
- ⌘Z doesn't undo the typing. StableBar has no visible main menu, so ⌘Z and ⇧⌘Z belong to the Undo and Redo buttons in the Settings footer (fix: keep the Settings form the same height while saving or showing errors #165, kept by fix: let ⌘V, ⌘C, ⌘X and ⌘A work in Settings text fields #261). In the sheet, ⌘Z does nothing to the text.
- Typing
"can insert “ or ”, depending on the macOS text settings. The JSON then fails withUnexpected character 'â' around line 3, column 13.: the column counts UTF-8 bytes, and the character shown is the first byte of the curly quote printed as Latin-1. - Return and Tab ignore the file's two-space indentation. Return starts the next line at column 1.
- There's no find.
- The two sheets differ. The widget sheet is 480×300 with 11.5 pt text and the Settings field colors. The profile sheet is 560×280 with body-size text and the system text background. Neither can be resized.
Proposal
Use one shared JSON sheet for widgets and profiles, built on an NSTextView set up for JSON:
- ⌘Z and ⇧⌘Z undo and redo inside the editor. Elsewhere in Settings they still run the footer's Undo and Redo.
- Smart quotes, smart dashes, text replacement, autocorrect and spell-check are off.
- Return keeps the line's indentation and adds two spaces after
{or[. Tab inserts two spaces. - ⌘F opens the find bar, with replace, and ⌘G / ⇧⌘G find the next and previous match. Escape closes the find bar without closing the sheet.
- A syntax error names its line and the real character, such as
Line 3: Unexpected character '“'., and selects that line. - The sheet can be resized and looks the same in both places.
The configuration format doesn't change, and there is no new dependency. Multiple cursors, syntax colors and line numbers can come later.
Possible today
No. Users have to type straight quotes carefully, or edit the configuration file in another editor.
Related
- fix: keep the Settings form the same height while saving or showing errors #165 and fix: let ⌘V, ⌘C, ⌘X and ⌘A work in Settings text fields #261 keep ⌘Z and ⇧⌘Z on the Settings footer's Undo and Redo buttons. This leaves that alone outside the JSON editor.
- Edit a widget's popup in Settings, not only in JSON #217 asks to edit popups in Settings instead of JSON. This makes the JSON route easier until then.
Triaged by Claude Code (Claude Opus 5.5).
Activity
stablebar-releases commentedon Nov 16, 2026
🎉 This issue has been resolved in version 0.16.0 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀