feat(keybind-cheatsheet): v3.6.0 — color customization, MangoWC support, Niri parser fixes#725
Conversation
Automatic Code Quality ReviewFile: keybind-cheatsheet/ColorPairRow.qml
+ placeholderText: row.bgValue.length === 0 ? (row.pluginApi?.tr("settings.color-auto") || "auto") : ""
+ placeholderText: row.textValue.length === 0 ? (row.pluginApi?.tr("settings.color-auto") || "auto") : ""File: keybind-cheatsheet/Settings.qml
+ text: "qs -c \"noctalia-shell\" ipc call plugin:keybind-cheatsheet toggle"
+ border.width: 1 |
…clipboard paste, pill UI - Full per-category color customization: background + text color pickers for Super/Ctrl/Shift/Alt/XF86/Print/numeric/mouse/default plus description text - Empty-string sentinel for Super/Ctrl/Shift overrides so Material theme accents (mPrimary/mSecondary/mTertiary) are used unless the user sets a concrete color - Redesigned Color Picker UI: two-pill layout per row (bg + text), single click anywhere on the pill opens NColorPickerDialog, pencil icon removed - Clipboard quick-paste: wl-paste polled every 1500 ms; when a #RRGGBB(AA) hex is on the clipboard, a paste icon appears inside each pill for one-click apply - Live preview + revert-on-cancel: changes apply immediately via _applyPreview; Settings.onDestruction restores the Component.onCompleted snapshot if the user closes without saving - Panel now follows shell opacity/blur settings like tailscale/hello-world (panel-in-panel pattern instead of self-painted background) - Fixed Color.mPrimaryContainer references that produced undefined colors at runtime on current shell builds - Extracted ColorPill.qml and ColorPairRow.qml from Settings.qml - Extended edit-copy pattern to all 20+ color/text settings; saveSettings() persists them and calls pluginApi.saveSettings() - New i18n keys: panel.search-placeholder (merged with upstream), settings. color-auto, settings.color-paste-hint, settings.keybind-ipc-command, localized across all 20 supported languages - manifest: bump to 3.5.0, add 20+ color defaults, fix windowHeight default from 0 to 850, extend tags with Hyprland/Niri
68694ac to
a2a8c41
Compare
….6.0) MangoWC compositor support: - Full MangoWC parser: bind=, axisbind=, mousebind=, source=/source-optional= recursive includes - Glob pattern support via mangoGlobProcess - Lookup tables: mangoKeyNameMap, mangoAxisMap, mangoButtonMap, mangoNoArgActions, mangoDirActions - spawn_shell IPC → friendly label (plugin:NAME toggle → "Name: Toggle") - Panel title: "MangoWC Keymap" when CompositorService.isMango - Settings: MangoWC config path field with format hint - manifest.json: mangoConfigPath defaultSetting, MangoWC tag, description updated - i18n: panel.title-mango + settings.mango-path/format-hint/keybind-example-mango in 20 locales - Removed dead error.mango-not-supported/mango-detail keys Niri parser fixes (discussion noctalia-dev#715): - Fix 5: loadingTimeoutTimer cleanup in Component.onDestruction - Fix 5: Panel loading text branches on loadingTimedOut flag - Fix 5: panel.loading-timeout key added to all 20 i18n files Version: 3.5.1 → 3.6.0 Closes noctalia-dev#715
|
Thanks for pulling the MangoWC work into the release. Ran through the merged parser against the test configs and want to flag a few regressions from the rewrite. Listing them with user impact so they don't read as style nits. 1. XF86 media keys render raw (will be noticed)
2. Stray
3. Per-bind
4. Missing SUPER and ALT aliases
5. Default category no longer localized Hardcoded |
|
I will fix it this evening |
Addresses PR noctalia-dev#725 review feedback from @countgitmick. - formatMangoKeyCombo now applies formatSpecialKey for bind keys, so XF86AudioRaiseVolume renders as "Vol Up", XF86AudioMute as "Mute", brightness keys as "Bright Up/Down", etc. - extractMangoCategory restored filters: length cap (100 chars), horizontal-rule strip (────, ====, ----), numbered-list extraction (1. Foo -> Foo), paren/bracket continuation reject, flow-arrow reject (→, ->, =>), keyword-prefixed notes reject (TODO/FIXME/NOTE/HACK/ XXX/BUG/WIP). - findMangoUnquotedComment skips past #" so per-bind #"description" suffix is preserved; parseMangoConfig extracts the trailing quoted description and uses it as the rendered description. - formatMangoKeyCombo recognizes LOGO (= SUPER) and MOD1 (= ALT) as valid Mango modifier tokens. - parseMangoConfig uses pluginApi.tr("default-category") for the fallback category instead of hardcoded "General"/"Mouse". - Category detection moved into the pure-comment branch so "# Title" lines actually update currentCategory (previously dead code path). manifest version 3.6.0 -> 3.6.1.
|
@spiros132 Do you want to review it and post? It would be helpful for a lot of ppl. |
spiros132
left a comment
There was a problem hiding this comment.
Looks good to me, just check this one thing otherwise I'll merge it in :D
|
|
||
| // Auto-generate description for undescribed binds when included | ||
| if (!hasDesc && includeUndescribed) { | ||
| description = verb ? (verb + (param ? " " + param : "")) : "(no description)"; |
There was a problem hiding this comment.
Should this be in the translation as well or no?
Translate hardcoded "(no description)" fallback string for MangoWC
undescribed binds into the i18n system.
- Main.qml:820: replace "(no description)" with pluginApi?.tr("panel.no-description")
- Add panel.no-description key to all 20 locale files (en, de, es, fr, hn,
hu, it, ja, ko-KR, ku, nl, nn-NO, pl, pt, ru, sv, tr, uk-UA, zh-CN, zh-TW)
en: "(no description)", pl: "(brak opisu)", others: English placeholder
- Bump version 3.6.1 → 3.6.2
- Update CHANGELOG.md
spiros132
left a comment
There was a problem hiding this comment.
Looks good to me, should I merge it in or should we wait until @countgitmick checks if the mango parser works correctly?
|
Lets wait, whole mange parser is his doing so it should be well done. |
Summary
Major release for the Keybind Cheatsheet plugin, combining appearance overhaul, MangoWC compositor support, and Niri parser bug fixes.
v3.5.0 — Full per-category color customization + clipboard paste
#RRGGBBor#RRGGBBAA) anywhere on your system and a clipboard icon appears in each pill for one-click paste.wl-pasteis polled every 1.5s while Settings is visible; polling stops on close. A hint line with a clipboard icon above the pickers explains the feature.mPrimary/mSecondary/mTertiary); empty text override falls back to the global "Key label" color.WARN scene … Unable to assign [undefined] to QColorcaused by a non-existentColor.mPrimaryContainerreference.Architecture:
ColorPill.qmlandColorPairRow.qmlcomponents.stringso the empty-string fallback sentinel works uniformly.keyText*settings +keyTextDefaultadded tomanifest.metadata.defaultSettings.v3.5.1 — Niri parser fixes (closes #715)
Addresses all issues reported by @Ito-69 in discussion #715:
// include "file.kdl"is skipped).keybindings.common.kdlandkeybindings.noctalia.kdlfrom the Niri config directory."Mod+Return"now parsed correctly).cheatsheetDataVersioncounter in Main.qml incremented on each save; Panel.qml binds to it to force re-evaluation — no more stuck "Loading…" after parse.loadingTimeoutTimerproperly stopped inComponent.onDestruction. New i18n keypanel.loading-timeoutadded to all 20 locale files.v3.6.0 — MangoWC compositor support
bind=,axisbind=, andmousebind=directives.source=andsource-optional=directives followed recursively; glob patterns supported.killclient,focusdir,view,tag,spawn_shell, etc.) translated to human-readable labels.spawn_shellcalls tonoctalia-shell ipc call plugin:<name>render as "Plugin Name: Toggle".axisbind=shows scroll direction,mousebind=shows button name.mangoKeyNameMap,mangoAxisMap,mangoButtonMap,mangoNoArgActions,mangoDirActions— hoisted to module level to avoid per-bind allocation.panel.title-mango,settings.mango-path,settings.mango-format-hint,settings.keybind-example-mangoadded to all 20 locale files. English used as placeholder for non-English locales — native-speaker translations welcome.error.mango-not-supported/error.mango-detailkeys from all locale files.Translations
All 20 supported language files updated across all three change sets:
de,en,es,fr,hn,hu,it,ja,ko-KR,ku,nl,nn-NO,pl,pt,ru,sv,tr,uk-UA,zh-CN,zh-TW.Test plan
qs -c noctalia-shell, no QML warnings.mousebind=andaxisbind=entries show correct labels.source=recursive includes followed; glob patterns expanded.Version
3.4.0→3.5.0→3.5.1→3.6.0Closes #715