EnergyVenom's picture
Deploy 7831dd1: layout fixes, sidebar folds to icons
f56442a verified
Raw History Blame Contribute Delete
10.7 kB
/* The layout layer, loaded last: buttons that look like buttons, cards that hold their content, and pages that fit
every screen from a 360px phone to a 1920px monitor. Fixes found by screenshotting every page at 390, 768, 1280 and
1440 px (light and dark). Tokens only; the type layer (type.css) is unchanged. `html body` puts these one step above
the page stylesheets that load with each page. */
/* ------------------------------------------------------------------ buttons */
/* a secondary action in a page head or a card's action row is a framed button, never bare words next to the primary */
html body .trio-head-actions .mantine-Button-root[data-variant='subtle'],
html body .fpt-pagehead-actions .mantine-Button-root[data-variant='subtle'],
html body .trio-acts .mantine-Button-root[data-variant='subtle'] {
border: 1px solid var(--sep-strong); background: var(--bg-elev); color: var(--label);
}
html body .trio-head-actions .mantine-Button-root[data-variant='subtle']:hover,
html body .fpt-pagehead-actions .mantine-Button-root[data-variant='subtle']:hover,
html body .trio-acts .mantine-Button-root[data-variant='subtle']:hover { background: var(--fill); }
/* every button in a page head has the same height, so a row of them lines up */
html body .trio-head-actions .mantine-Button-root, html body .trio-head-actions .mantine-ActionIcon-root { min-height: var(--h-sm); height: var(--h-sm); }
html body .trio-head-actions .mantine-ActionIcon-root { width: var(--h-sm); }
/* a button's label never spills out of it: long labels end in an ellipsis inside, the full text stays in the title */
html body .mantine-Button-root { max-width: 100%; }
html body .mantine-Button-inner { min-width: 0; }
html body .mantine-Button-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* ------------------------------------------------------------------ cards and controls hold their content */
/* segmented controls and selects never push a card past the screen edge (Settings > AI models on a phone) */
html body .mantine-SegmentedControl-root { max-width: 100%; }
@media (max-width: 767px) {
html body .mantine-SegmentedControl-root { display: flex; width: 100%; }
html body .mantine-SegmentedControl-control { flex: 1 1 0; min-width: 0; }
html body .mantine-SegmentedControl-label { white-space: normal; line-height: var(--lh-xs); padding-block: var(--sp-1); }
}
html body .mantine-Card-root, html body .pw-card { min-width: 0; max-width: 100%; }
/* two cards side by side keep the same height (Settings: local and external model) */
html body .mantine-SimpleGrid-root > .mantine-Card-root, html body .mantine-SimpleGrid-root > .pw-card { height: 100%; }
/* ------------------------------------------------------------------ banners */
/* the app-wide banners: title and sentence read as one paragraph at every width, aligned with the page */
html body .trio-globalbanners .trio-banner { display: block; }
html body .trio-globalbanners .trio-banner b { margin-right: var(--sp-1); }
html body .fpt-main[data-reading='true'] > .trio-globalbanners { max-width: var(--w-content); margin-inline: auto; }
@media (max-width: 767px) { html body .trio-globalbanners .trio-banner { padding: var(--sp-2) var(--sp-3); font-size: var(--fs-sm); line-height: var(--lh-sm); } }
/* ------------------------------------------------------------------ the top bar on a phone: one row */
/* menu, page name, then the bell and search; the practice cue sits under the page name in small text */
@media (max-width: 767px) {
html body .fpt-main > .mantine-Stack-root > .fpt-topbar.pw-topbar:not(.fpt-ws .fpt-topbar) {
display: flex; flex-wrap: nowrap; align-items: center; min-height: 52px; row-gap: 0;
}
html body .fpt-main > .mantine-Stack-root > .fpt-topbar.pw-topbar .fpt-topbar-left { display: flex; flex: 1 1 auto; min-width: 0; }
html body .fpt-main > .mantine-Stack-root > .fpt-topbar.pw-topbar .fpt-topbar-sub { flex-wrap: nowrap; overflow: hidden; white-space: nowrap; height: auto; }
html body .fpt-main > .mantine-Stack-root > .fpt-topbar.pw-topbar .fpt-topbar-cue { order: 0; flex: 0 1 auto; min-width: 0; overflow: hidden; }
html body .fpt-topbar.pw-topbar .fpt-topbar-cue .fpt-env-long { display: none; }
html body .fpt-main > .mantine-Stack-root > .fpt-topbar.pw-topbar .fpt-topbar-actions { flex: none; margin-left: auto; }
}
/* ------------------------------------------------------------------ stat cards: two per row on a phone */
@media (max-width: 639px) {
html body .home-stats, html body .rp-stats, html body .rpt-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2); }
html body .rp-stat { padding: var(--sp-3); }
html body .rp-stat-k { font-size: var(--fs-2xs); line-height: var(--lh-2xs); }
}
/* ------------------------------------------------------------------ the test run page */
/* its top bar is one row: the search is the magnifier button (Ctrl K), not an empty field */
html body .fpt-ws .pw-topbar .fpt-search { width: var(--h-sm); min-width: var(--h-sm); padding: 0; justify-content: center; }
html body .fpt-ws .pw-topbar .fpt-search span, html body .fpt-ws .pw-topbar .fpt-search kbd { display: none; }
@media (min-width: 1280px) { html body .fpt-ws .fpt-topbar.pw-topbar { flex-wrap: nowrap; } }
@media (max-width: 767px) {
/* back to Test runs is the arrow alone; the sub-line starts at the edge and scrolls instead of being cut */
html body .fpt-ws .pw-topbar .fpt-back { font-size: 0; gap: 0; margin-right: 0; }
html body .fpt-ws .pw-topbar .fpt-back::after { content: none; }
html body .fpt-ws .pw-topbar .fpt-back svg { width: 20px; height: 20px; }
html body .fpt-ws .pw-topbar .fpt-topbar-sub { justify-content: flex-start; }
}
/* ------------------------------------------------------------------ empty states and their actions */
html body .pw-empty .mantine-Button-root, html body .fpt-empty .mantine-Button-root { margin-top: var(--sp-2); }
/* ------------------------------------------------------------------ page widths on a desktop */
/* one content width for every page (1200px), the wide one (1440px) for data pages: Test runs, Scenarios, Settings,
Defects, Reports; long paragraphs keep their own reading width (.trio-lede: 62ch) */
html body .fpt-main[data-reading='true'] > .mantine-Stack-root > :not(.fpt-topbar) { max-width: var(--w-content); }
html body .fpt-main[data-reading='true'] > .mantine-Stack-root.adm-wide > :not(.fpt-topbar) { max-width: var(--w-wide); }
/* ------------------------------------------------------------------ the test run page's top bar on a desktop */
/* one row: the run's name on one line (its full name in the tooltip), then the actions; Ask AI is its icon here */
@media (min-width: 1280px) {
html body .fpt-ws .pw-topbar .fpt-topbar-row1 .fpt-title { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: unset; line-clamp: unset; }
html body .fpt-ws .pw-topbar .fpt-topbar-actions { flex-wrap: nowrap; flex: none; }
html body .fpt-ws .pw-topbar .fpt-topbar-left { flex: 1 1 0; min-width: 120px; }
}
html body .fpt-ws .pw-topbar .pw-askai { width: var(--h-sm); padding: 0; }
html body .fpt-ws .pw-topbar .pw-askai .mantine-Button-label { display: none; }
html body .fpt-ws .pw-topbar .pw-askai .mantine-Button-section { margin: 0; }
html body .fpt-ws .pw-topbar .ws-cancel { padding-inline: var(--sp-2); }
/* the run page's middle column is narrow next to its side panel: Ask AI and the search button (Ctrl K opens both from
anywhere) appear only on wide screens, and the bar never draws over the panel */
@media (min-width: 1280px) { html body .fpt-ws .fpt-topbar.pw-topbar { overflow: clip; overflow-clip-margin: 4px; } }
@media (max-width: 1599px) {
html body .fpt-ws .pw-topbar .pw-askai, html body .fpt-ws .pw-topbar .fpt-search { display: none; }
}
@media (max-width: 1439px) {
/* "Test runs" is the back arrow alone (its name stays its label); the bell is on every other page */
html body .fpt-ws .pw-topbar .fpt-back { font-size: 0; gap: 0; margin-right: 0; }
html body .fpt-ws .pw-topbar .fpt-back::after { content: none; }
html body .fpt-ws .pw-topbar .fpt-back svg { width: 18px; height: 18px; }
html body .fpt-ws .pw-topbar .pw-bell { display: none; }
}
/* the run's views (Scenarios, Failures, Team, Report ...) wrap onto a second line rather than hide the first behind a scroll */
html body .fpt-detail-head .fpt-navtabs, html body .fpt-detail-switch .mantine-Tabs-list { flex-wrap: wrap; overflow: visible; }
html body .fpt-detail-head .fpt-navtabs { border-radius: var(--r-lg); }
/* cards side by side are the same height, so a pair never leaves a hole under the shorter one (Settings > AI models) */
html body .fpt-cols:not([data-compact='true']) { align-items: stretch; }
/* 1024 to 1279px: the run's name and caption on the first row, its actions on a second row of their own */
@media (min-width: 1024px) and (max-width: 1279px) {
html body .fpt-ws .fpt-topbar.pw-topbar { flex-wrap: wrap; row-gap: var(--sp-1); padding-block: var(--sp-2); }
html body .fpt-ws .pw-topbar .fpt-topbar-left { flex: 1 1 calc(100% - 80px); }
html body .fpt-ws .pw-topbar .fpt-topbar-row1 .fpt-title { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html body .fpt-ws .pw-topbar .fpt-topbar-actions { flex: 1 1 100%; justify-content: flex-start; flex-wrap: nowrap; }
}
/* ------------------------------------------------------------------ dark mode: marked cards without a glow */
html:root[data-mantine-color-scheme='dark'] body .fpt-stage[data-stage='approve'],
html:root[data-mantine-color-scheme='dark'] body .fpt-stage[data-stage='judge'] { box-shadow: 0 0 0 1px var(--orange-line); }
html:root[data-mantine-color-scheme='dark'] body .fpt-stage[data-stage='stopped'] { box-shadow: 0 0 0 1px var(--red-line); }
@media (min-width: 1024px) and (max-width: 1279px) {
html body .fpt-ws .fpt-topbar.pw-topbar { padding-inline: var(--sp-4); }
/* the side panel's views fit its narrower width: tighter tabs, and a scroll rather than a cut if a label is long */
html body .fpt-panel-tablist { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
html body .fpt-panel-tablist .mantine-Tabs-tab, html body .fpt-panel-tablist .mantine-SegmentedControl-label { padding-inline: var(--sp-2); letter-spacing: 0.02em; }
}
@media (min-width: 1024px) and (max-width: 1279px) {
html body .fpt-panel-head .mantine-Tabs-tab { padding-inline: 7px; font-size: var(--fs-2xs); letter-spacing: 0.03em; }
}