Commit 83b79e3
authored
v6: Restyle the top bar Run button (play icon, divider, chip shortcut) (#4399)
## Summary
Reworks the green **"Run"** button in the top bar
(`.graphiql-top-bar-run`) so it stops reading as a heavy, cluttered
element in an otherwise monochrome bar.
- Add a small play icon before the "Run" label.
- Add a faint vertical divider between the label and the keyboard
shortcut.
- Recolor the shortcut keys (`⌘` `⏎`) into translucent-white chips that
sit on the green fill, instead of the default dark-bordered keycap boxes
that looked like foreign objects on the button.
- Set the label to medium weight (500) rather than the previous heavy
bold (600).
Also removes the hardcoded `font-weight: 600` from the shared primary
button variant (`.graphiql-button-primary`), used by the collections
plugin dialogs (Import / Export / Save), so its label matches the other
buttons.
## Test plan
- [ ] Open GraphiQL and look at the top bar "Run" button: play icon +
"Run" + a faint divider + the `⌘⏎` shortcut as subtle chips. It should
read as one calm unit, not stand out as bold/busy.
- [ ] The shortcut chips should be legible white-on-green, not dark
boxes.
- [x] Open a collections dialog (e.g. Save / Import) and confirm the
green primary button's label matches a neutral button's weight.
- [x] Disabled state (e.g. GET selected with a mutation) still dims the
whole button and shows the "switch to POST" tooltip.
Refs: #42191 parent a8254bc commit 83b79e3
4 files changed
Lines changed: 32 additions & 4 deletions
File tree
- .changeset
- packages/graphiql-react/src/components
- button
- top-bar
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | 44 | | |
46 | 45 | | |
47 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
143 | | - | |
| 143 | + | |
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
149 | 171 | | |
150 | 172 | | |
151 | 173 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
92 | 94 | | |
93 | 95 | | |
94 | 96 | | |
| |||
0 commit comments