Macro toolbar: user-chosen macro buttons

Aperta
#1,271 2 commenti 1 reazione 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python
Ambito
desktop

Direzione di ricerca

The proposal names the Macro manager, the separate QToolBar, opensak.json, User Guide section 29, and the language files. Start by locating the Macro manager and how toolbar state is saved and restored. The acceptance criteria define done: per-macro buttons persist across restart, upgrades, and backup/restore, handle missing or incompatible macros, and the guide and translations are updated.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area: macro area: UI improvement

Raised in the Facebook group: "Is it possible to add macro buttons to the toolbar?"

Not possible today. This issue proposes a design that stays stable across upgrades. Planned for after v1.22.0 stable (tracked in #1195).

Proposal

  • A separate "Macros" toolbar (own QToolBar), not mixed into the main toolbar. Hidden when empty; position/visibility saved via saveState()/restoreState().
  • The user chooses which macros get a button: a "Show on toolbar" checkbox per macro in the Macro manager. Optionally a keyboard shortcut in the same place (already mentioned in the original concept, §7).
  • A macro can not add itself to the toolbar. Macros come from external sources, so a button must always be the user's choice. An optional header key (e.g. Toolbar-Label: / Icon:) may suggest a label/icon, but doesn't enable anything by itself.

Upgrade and robustness

  • Stored as UI settings in opensak.json, not part of the macro API, so the API 4 promise is unaffected. A new header key is an addition, which API 4 allows.
  • Buttons reference the macro by its code/path (same approach as approvals, #1091), not by position.
  • Edge cases:
    • Macro missing after update/removal: button hidden or greyed out with a tooltip, no error.
    • Macro changed (approval hash mismatch): clicking goes through the normal approval dialog, so no shortcut around it.
    • Requires-API higher than the app supports: button disabled with an explanation.
  • Backup/restore: covered by #1137 (settings + macros folder).

Open questions

  • Icons in v1: text-only / default icon, or custom SVG/PNG from the macros folder?
  • Show the macro name or a separate short label?

Acceptance criteria

  • Macros toolbar can be shown/hidden and remembers its position
  • Toolbar buttons can be enabled/disabled per macro in the Macro manager
  • Buttons survive restart, upgrade and backup/restore
  • Missing/changed/incompatible macro is handled as described above
  • User Guide section 29 updated
  • All language files updated with the new strings
Lingua principale
Python
Stelle
37
Fork
17
Merge medio
16h 7m
PR unite (30g)
128

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di OpenSAK-Org/OpenSAK

Tutte le issue di OpenSAK-Org/OpenSAK

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.