forge
Explore
Log in

Don't you dare go Hollow

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 commit

729df69e2e000d9a1db3f8c4dd72c5824398a458Ahmet Kaan GümüşParent: d61240e
All checks have passed
Show checks
  • 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
Show full message
💄 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
crates/forge-web/src/pages/admin_runners.rsmodified+1 -1
@@ -410,7 +410,7 @@ pub(crate) async fn confirm_post(
410410 <p class="hint">(message)</p>
411411 <div class="acts">
412412 <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>
414414 </div>
415415 </form>
416416 </details>
style/_one.scssmodified+48 -0
@@ -1559,6 +1559,7 @@ a.line:hover .name,
15591559 .corner-menu,
15601560 .ref-menu,
15611561 .pop-panel,
1562+.head-title > details.reveal:not(:has(.field)) > .opened,
15621563 .row-menu-panel,
15631564 .ci-tl-more > p,
15641565 .dock-expand > .dock-message,
@@ -3584,6 +3585,53 @@ details.log-group {
35843585 }
35853586 }
35863587
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+
35873635 // A choice whose options are places (an import's source) reads exactly like one of radios.
35883636 .choice.choice > a {
35893637 display: inline-flex;