A confirm opened from a pill beside a page's title (Cancel a run, Restart server, Delete a snippet) floats under its pill as a panel instead of unfolding inside the title's row and pushing the other pills aside, and spans the row on a phone
Browse files at this commit729df69e2e000d9a1db3f8c4dd72c5824398a458Parent: d61240eAll checks have passed
Show checks
ci/buildSucceededDetails
- style
- a confirm opened from a pill beside a page's title (Cancel a run, Restart server, Delete a snippet) floats under its pill as a panel instead of unfolding inside the title's row and pushing the other pills aside, and spans the row on a phone
- a form of fields opened there still opens in place
- the confirm's way back reads Keep it, so a run's Cancel no longer offers a second Cancel
2 changed files +49 -1
crates/forge-web/src/pages/admin_runners.rsmodified+1 -1
| @@ -410,7 +410,7 @@ pub(crate) async fn confirm_post( | ||
| 410 | 410 | <p class="hint">(message)</p> |
| 411 | 411 | <div class="acts"> |
| 412 | 412 | <button type="submit" class="small">(confirm)</button> |
| 413 | - <button type="button" class="act" data-close-details="">(s(lang, "Cancel", "Vazgeç"))</button> | |
| 413 | + <button type="button" class="act" data-close-details="">(s(lang, "Keep it", "Vazgeç"))</button> | |
| 414 | 414 | </div> |
| 415 | 415 | </form> |
| 416 | 416 | </details> |
style/_one.scssmodified+48 -0
| @@ -1559,6 +1559,7 @@ a.line:hover .name, | ||
| 1559 | 1559 | .corner-menu, |
| 1560 | 1560 | .ref-menu, |
| 1561 | 1561 | .pop-panel, |
| 1562 | +.head-title > details.reveal:not(:has(.field)) > .opened, | |
| 1562 | 1563 | .row-menu-panel, |
| 1563 | 1564 | .ci-tl-more > p, |
| 1564 | 1565 | .dock-expand > .dock-message, |
| @@ -3584,6 +3585,53 @@ details.log-group { | ||
| 3584 | 3585 | } |
| 3585 | 3586 | } |
| 3586 | 3587 | |
| 3588 | +// A confirm opened from a pill beside the title floats under the pill as a panel, so the title's | |
| 3589 | +// row never reflows around it. A form of fields still opens in place, with room for its labels. | |
| 3590 | +.head-title > details.reveal:not(:has(.field)) { | |
| 3591 | + display: block; | |
| 3592 | + position: relative; | |
| 3593 | + | |
| 3594 | + > .opened { | |
| 3595 | + position: absolute; | |
| 3596 | + z-index: 30; | |
| 3597 | + top: calc(100% + 8px); | |
| 3598 | + left: 0; | |
| 3599 | + display: flex; | |
| 3600 | + flex-direction: column; | |
| 3601 | + gap: 10px; | |
| 3602 | + box-sizing: border-box; | |
| 3603 | + width: max-content; | |
| 3604 | + max-width: min(360px, calc(100vw - 32px)); | |
| 3605 | + margin: 0; | |
| 3606 | + padding: 14px 16px; | |
| 3607 | + | |
| 3608 | + > .hint { | |
| 3609 | + margin: 0; | |
| 3610 | + } | |
| 3611 | + | |
| 3612 | + > .acts { | |
| 3613 | + margin-left: 0; | |
| 3614 | + } | |
| 3615 | + } | |
| 3616 | + | |
| 3617 | + // On a phone the pill may sit far right: the panel spans the title's row instead. | |
| 3618 | + @media (max-width: 700px) { | |
| 3619 | + position: static; | |
| 3620 | + | |
| 3621 | + > .opened { | |
| 3622 | + right: 0; | |
| 3623 | + width: auto; | |
| 3624 | + max-width: none; | |
| 3625 | + } | |
| 3626 | + } | |
| 3627 | +} | |
| 3628 | + | |
| 3629 | +@media (max-width: 700px) { | |
| 3630 | + .head-title:has(> details.reveal[open]) { | |
| 3631 | + position: relative; | |
| 3632 | + } | |
| 3633 | +} | |
| 3634 | + | |
| 3587 | 3635 | // A choice whose options are places (an import's source) reads exactly like one of radios. |
| 3588 | 3636 | .choice.choice > a { |
| 3589 | 3637 | display: inline-flex; |