Commit ae31d6a
authored
fix: let gambit suggestions wrap instead of running off the dropdown (#4888)
Dropdown items are laid out as single lines and ellipsised, which is right
for a menu of commands but not for the gambit rows in the search modal.
Those rows document the query syntax, and the value shown against `is:` is
every boolean gambit joined into one string — it grows with each extension
that registers one, so there is no width at which truncating it stays
useful. On a forum with a handful of extensions installed the row was
already being cut off mid-word.
The row now wraps. `white-space`, `overflow` and `text-overflow` are reset
alongside the defaults they override so the two are read together; the
generic rule matches on two classes and two elements, so a reset declared
further down the file on the class alone would have lost the cascade and
silently done nothing.
Wrapping then needs the flex containers to allow it: a flex item will not
shrink below the intrinsic width of its text without `min-width: 0`, and
the key and value need `flex-wrap` to move onto separate lines. The key
keeps its own line, since it is the label the row is identified by. Now
that a row can be taller than one line, the alignment shifts from centre
to the first line so the key, its value and the add/negate buttons all sit
on the same baseline rather than floating against the middle of a wrapped
block.1 parent c4ce10c commit ae31d6a
1 file changed
Lines changed: 28 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
59 | 70 | | |
60 | 71 | | |
61 | 72 | | |
| |||
247 | 258 | | |
248 | 259 | | |
249 | 260 | | |
250 | | - | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
251 | 264 | | |
252 | 265 | | |
253 | 266 | | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
254 | 271 | | |
255 | 272 | | |
256 | 273 | | |
257 | | - | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
258 | 277 | | |
259 | 278 | | |
260 | 279 | | |
261 | 280 | | |
262 | 281 | | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
263 | 285 | | |
264 | 286 | | |
265 | 287 | | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
266 | 292 | | |
267 | 293 | | |
268 | 294 | | |
| |||
0 commit comments