Commit c7dd6ea
committed
Narrow the role denial to actions: keep the commit-page link live
The previous two commits disabled every commit affordance on a role-denied
package, including "Create new revision" — which is a link, not a button.
Supporting that meant inventing disabled-link semantics on a shared
component: dropping the href, setting aria-disabled, and extending the
stylesheet, none of which anything else needed.
The rule is now: disable actions that cannot succeed, never navigation.
Navigating to the commit page is harmless and useful — that page opens under
a denial, shows the banner, and disables its own commit buttons with a
tooltip, so the user can still read their changes, review the file list and
write a message. The explanation belongs at the point of action, not one
screen earlier. It also makes the packages list consistent rather than
exceptional: it hides CommitAndPush, an action, and touches nothing
navigational.
So CreateNewRevision goes back to a plain link, and everything that existed
only to disable it is reverted to its pre-branch state: the `disabled` prop
on CtaLink, its pass-through in CreateNewRevision, and the
[aria-disabled="true"] rules in button.css. Nothing else had picked any of
them up. CommitAndPush on the detail page stays disabled with its tooltip,
and the commit page is untouched.
The page's tests keep the denied-vs-readable contrast and gain one pinning
the new rule: the action bar's markup is sliced out of the page source and
asserted to render the commit-page link plain — no `disabled`, no popover
wrapper — while the action after it still carries its denial tooltip. A host
-target test cannot render the Leptos view, and a boolean seam for a value
that is always false would test a fiction rather than the markup someone
would edit while "fixing the inconsistency".1 parent fa32d56 commit c7dd6ea
5 files changed
Lines changed: 77 additions & 49 deletions
File tree
- quilt-sync
- ui
- assets/css/components
- src
- components/buttons
- base
- pages/installed_package
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
| 23 | + | |
27 | 24 | | |
28 | 25 | | |
29 | 26 | | |
30 | 27 | | |
31 | | - | |
32 | | - | |
| 28 | + | |
33 | 29 | | |
34 | 30 | | |
35 | 31 | | |
| |||
39 | 35 | | |
40 | 36 | | |
41 | 37 | | |
42 | | - | |
43 | | - | |
| 38 | + | |
44 | 39 | | |
45 | 40 | | |
46 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | 38 | | |
47 | 39 | | |
48 | | - | |
49 | 40 | | |
50 | 41 | | |
51 | 42 | | |
52 | 43 | | |
53 | | - | |
54 | | - | |
| 44 | + | |
55 | 45 | | |
56 | 46 | | |
57 | 47 | | |
| |||
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | 11 | | |
13 | 12 | | |
14 | | - | |
| 13 | + | |
15 | 14 | | |
16 | 15 | | |
17 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
206 | 207 | | |
207 | 208 | | |
208 | 209 | | |
| |||
374 | 375 | | |
375 | 376 | | |
376 | 377 | | |
377 | | - | |
378 | | - | |
379 | | - | |
380 | | - | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | | - | |
387 | | - | |
| 378 | + | |
388 | 379 | | |
389 | 380 | | |
390 | 381 | | |
391 | | - | |
| 382 | + | |
392 | 383 | | |
393 | 384 | | |
394 | 385 | | |
| |||
445 | 436 | | |
446 | 437 | | |
447 | 438 | | |
448 | | - | |
449 | | - | |
| 439 | + | |
450 | 440 | | |
451 | 441 | | |
452 | 442 | | |
453 | 443 | | |
454 | | - | |
455 | | - | |
456 | | - | |
457 | | - | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
458 | 454 | | |
459 | 455 | | |
460 | 456 | | |
| |||
485 | 481 | | |
486 | 482 | | |
487 | 483 | | |
488 | | - | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
489 | 490 | | |
490 | | - | |
| 491 | + | |
491 | 492 | | |
492 | | - | |
| 493 | + | |
493 | 494 | | |
494 | 495 | | |
495 | 496 | | |
496 | 497 | | |
497 | | - | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
498 | 532 | | |
499 | 533 | | |
500 | | - | |
| 534 | + | |
501 | 535 | | |
502 | 536 | | |
503 | 537 | | |
504 | 538 | | |
505 | 539 | | |
506 | 540 | | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
507 | 551 | | |
0 commit comments