mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-23 16:03:06 +00:00
feat(plugins): show a running state on a plugin command's toolbar button (#2371)
A plugin command that takes seconds (an LLM call that fills the commit message) gave no sign at the button that the click was taken, and a second click started a second run. Actions may now set `indicatesRunning`: the action runner counts their in-flight runs and an IconButton bound to such an action shows a spinner, sets aria-busy and ignores clicks until the run settles. Plugin commands set it, so every toolbar slot that draws them (editor.title, mainToolbar, commit.message) is covered without a plugin API change and without features importing each other. The button stays focusable (aria-disabled, not disabled). Spinner moves to its own module so Button can use it without a cycle with Feedback, which re-exports it. Refs #2254 Co-authored-by: NguyenBang <nguyenbang@Mac.lan>
This commit is contained in:
committed by
GitHub
co-authored by
NguyenBang
parent
68dd88993b
commit
16bf9b53a2
@@ -98,6 +98,9 @@
|
||||
opacity: 0.4;
|
||||
cursor: default;
|
||||
}
|
||||
.iconButton[aria-busy="true"] {
|
||||
cursor: progress;
|
||||
}
|
||||
.iconButton[aria-pressed="true"] {
|
||||
background: var(--bg-toolbar-selected, var(--bg-tree-selected));
|
||||
color: var(--fg-strong);
|
||||
|
||||
Reference in New Issue
Block a user