[feat](trx-frontend-http): one navigation model at every width
CI / test (pull_request) Successful in 8m13s
CI / frontend (pull_request) Successful in 3m0s
CI / reuse (pull_request) Successful in 3s
CI / test (push) Successful in 7m25s
CI / lint (pull_request) Successful in 2m18s
CI / lint (push) Successful in 2m17s
CI / frontend (push) Successful in 2m9s
CI / reuse (push) Successful in 3s
CI / test (pull_request) Successful in 8m13s
CI / frontend (pull_request) Successful in 3m0s
CI / reuse (pull_request) Successful in 3s
CI / test (push) Successful in 7m25s
CI / lint (pull_request) Successful in 2m18s
CI / lint (push) Successful in 2m17s
CI / frontend (push) Successful in 2m9s
CI / reuse (push) Successful in 3s
Eight destinations sat flat in the tab strip with equal weight, competing with the controls for the same row and then scrolling out of reach with only a fade to say so. They are not equal: Radio is where an operator spends nearly all their time, Bookmarks, Digital modes and Map are operating surfaces, and Statistics, Recorder, Settings and About are occasional. The mobile layout already grouped them exactly that way, behind its More menu, so the application carried two navigation models. Adopt the mobile grouping at every width instead of adding a third: four operating tabs plus More. The strip no longer scrolls at any width, and the menu keeps its bottom-sheet placement on mobile while anchoring under its button elsewhere. Drop the labels between 701 and 1180px so the tabs degrade to their icons — which every tab already carries — before the strip could ever need to hide a destination. Rename Main to Radio: it is the receiver, not a generic first page, and the name now says what the destination is rather than where it sits. Freeing that width also let the style picker and theme toggle return to the bar inline, leaving only the layout picker in the overflow menu. Navigating to About in the browser smoke test now goes through More, as a person would. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GdyUjuXejCEfiub675z6cz Signed-off-by: Stan Grams <sjg@haxx.space>
This commit was merged in pull request #26.
This commit is contained in:
@@ -46,7 +46,7 @@ SPDX-License-Identifier: GPL-2.0-or-later
|
|||||||
<div class="tab-bar-nav" aria-label="Primary navigation">
|
<div class="tab-bar-nav" aria-label="Primary navigation">
|
||||||
<button class="tab active" data-tab="main">
|
<button class="tab active" data-tab="main">
|
||||||
<svg class="tab-icon" aria-hidden="true"><use href="#icon-home"/></svg>
|
<svg class="tab-icon" aria-hidden="true"><use href="#icon-home"/></svg>
|
||||||
<span class="tab-label">Main</span>
|
<span class="tab-label">Radio</span>
|
||||||
</button>
|
</button>
|
||||||
<button class="tab" data-tab="bookmarks">
|
<button class="tab" data-tab="bookmarks">
|
||||||
<svg class="tab-icon" aria-hidden="true"><use href="#icon-bookmark"/></svg>
|
<svg class="tab-icon" aria-hidden="true"><use href="#icon-bookmark"/></svg>
|
||||||
|
|||||||
@@ -1552,6 +1552,12 @@ small { color: var(--text-muted); }
|
|||||||
background: color-mix(in srgb, var(--border-light) 70%, transparent);
|
background: color-mix(in srgb, var(--border-light) 70%, transparent);
|
||||||
}
|
}
|
||||||
.tab-bar-nav .tab { flex: 0 0 auto; }
|
.tab-bar-nav .tab { flex: 0 0 auto; }
|
||||||
|
/* Icons before scrolling: every tab already carries one, and four icons plus
|
||||||
|
* More always fit, so the strip never has to hide a destination. */
|
||||||
|
@media (max-width: 1180px) and (min-width: 701px) {
|
||||||
|
.tab-bar-nav .tab .tab-label { display: none; }
|
||||||
|
.tab-bar-nav .tab { padding: 0.5rem 0.6rem; }
|
||||||
|
}
|
||||||
.tab {
|
.tab {
|
||||||
background: transparent;
|
background: transparent;
|
||||||
border: none;
|
border: none;
|
||||||
@@ -3082,9 +3088,22 @@ body[data-operator-layout="broadcast"] #cw-bar-overlay {
|
|||||||
body[data-operator-layout="broadcast"] .controls-row { grid-template-columns: 1fr auto; }
|
body[data-operator-layout="broadcast"] .controls-row { grid-template-columns: 1fr auto; }
|
||||||
body[data-operator-layout="broadcast"] #wfm-controls-col { grid-column: 1 / -1; }
|
body[data-operator-layout="broadcast"] #wfm-controls-col { grid-column: 1 / -1; }
|
||||||
}
|
}
|
||||||
.mobile-more-btn, .mobile-more-menu, .decoder-tab-select { display: none; }
|
/* One navigation model at every width. Statistics, Recorder, Settings and
|
||||||
|
* About are occasional destinations: they live behind More rather than
|
||||||
|
* competing with the operating tabs for the row and then scrolling out of
|
||||||
|
* reach. The mobile layout already grouped them this way; the desktop strip
|
||||||
|
* now matches it, which is why the tab strip no longer needs to scroll. */
|
||||||
|
.tab-bar-nav .tab[data-tab="statistics"],
|
||||||
|
.tab-bar-nav .tab[data-tab="recorder"],
|
||||||
|
.tab-bar-nav .tab[data-tab="settings"],
|
||||||
|
.tab-bar-nav .tab[data-tab="about"] { display: none; }
|
||||||
|
.mobile-more-btn { display: flex; flex: 0 0 auto; }
|
||||||
|
.mobile-more-menu, .decoder-tab-select { display: none; }
|
||||||
|
.tab-bar-nav { position: relative; }
|
||||||
.mobile-more-menu {
|
.mobile-more-menu {
|
||||||
position: fixed;
|
position: absolute;
|
||||||
|
top: calc(100% + 0.4rem);
|
||||||
|
right: 0;
|
||||||
right: max(0.75rem, env(safe-area-inset-right));
|
right: max(0.75rem, env(safe-area-inset-right));
|
||||||
bottom: calc(5.4rem + env(safe-area-inset-bottom));
|
bottom: calc(5.4rem + env(safe-area-inset-bottom));
|
||||||
z-index: 80;
|
z-index: 80;
|
||||||
@@ -3281,6 +3300,12 @@ body[data-operator-layout="broadcast"] #cw-bar-overlay {
|
|||||||
.tab[data-tab="statistics"], .tab[data-tab="recorder"],
|
.tab[data-tab="statistics"], .tab[data-tab="recorder"],
|
||||||
.tab[data-tab="settings"], .tab[data-tab="about"] { display: none; }
|
.tab[data-tab="settings"], .tab[data-tab="about"] { display: none; }
|
||||||
.mobile-more-btn { display: flex; }
|
.mobile-more-btn { display: flex; }
|
||||||
|
.mobile-more-menu {
|
||||||
|
position: fixed;
|
||||||
|
top: auto;
|
||||||
|
right: max(0.75rem, env(safe-area-inset-right));
|
||||||
|
bottom: calc(5.4rem + env(safe-area-inset-bottom));
|
||||||
|
}
|
||||||
.mobile-more-btn[aria-expanded="true"] {
|
.mobile-more-btn[aria-expanded="true"] {
|
||||||
color: var(--accent-text);
|
color: var(--accent-text);
|
||||||
background: color-mix(in srgb, var(--accent-green) 10%, transparent);
|
background: color-mix(in srgb, var(--accent-green) 10%, transparent);
|
||||||
|
|||||||
@@ -184,7 +184,10 @@ try {
|
|||||||
await page.locator('.tab[data-tab="main"]').click();
|
await page.locator('.tab[data-tab="main"]').click();
|
||||||
assert.equal(new URL(page.url()).pathname, "/");
|
assert.equal(new URL(page.url()).pathname, "/");
|
||||||
|
|
||||||
await page.locator('.tab[data-tab="about"]').click();
|
// About is an occasional destination, so it lives behind More at every
|
||||||
|
// width rather than in the operating tab strip.
|
||||||
|
await page.locator("#mobile-more-btn").click();
|
||||||
|
await page.locator('[data-navigate-tab="about"]').click();
|
||||||
await page.locator("#tab-about").waitFor({ state: "visible" });
|
await page.locator("#tab-about").waitFor({ state: "visible" });
|
||||||
assert.equal(new URL(page.url()).pathname, "/about");
|
assert.equal(new URL(page.url()).pathname, "/about");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user