2 Commits

Author SHA1 Message Date
b56b41996b Clock: toggle with Pos1 instead of Einfg
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 16:36:33 +02:00
7b9e072713 Browse: scroll the root shelves again, just without a scrollbar
Hiding the vertical scrollbar with overflow: hidden also stopped the wheel from
scrolling. Keep overflow: auto and hide only the bar, as the shelf rows already do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 11:16:29 +02:00
6 changed files with 17 additions and 12 deletions

View File

@@ -136,7 +136,7 @@ general:
# auto_off_minutes: 15 # auto_off_minutes: 15
# timeout: 5.0 # seconds before a hung command is killed # timeout: 5.0 # seconds before a hung command is killed
# The clock overlay (Einfg on the kiosk keyboard, Guide on the remote). Optional; these # The clock overlay (Pos1 on the kiosk keyboard, Guide on the remote). Optional; these
# are the defaults. On school days a bus countdown shows for bus_lead_minutes before # are the defaults. On school days a bus countdown shows for bus_lead_minutes before
# bus_time. School days skip weekends and the school and public holidays of # bus_time. School days skip weekends and the school and public holidays of
# `subdivision`, fetched daily from openholidaysapi.org and cached under # `subdivision`, fetched daily from openholidaysapi.org and cached under

View File

@@ -190,14 +190,13 @@ function BrowseViewImpl({
/> />
<div <div
ref={scroller} ref={scroller}
className={ANIMATE_VIEW_TRANSITIONS ? "view-enter" : undefined} className={`no-scrollbar${ANIMATE_VIEW_TRANSITIONS ? " view-enter" : ""}`}
// Right padding reserves room for the tab rail's own glass bar (see // Right padding reserves room for the tab rail's own glass bar (see
// TAB_RAIL_CLEARANCE) so a full-width shelf row never renders under it. The // TAB_RAIL_CLEARANCE) so a full-width shelf row never renders under it. The
// three rows fit the screen, so no vertical scrollbar: each row scrolls // vertical scrollbar is hidden, but the wheel and touch still scroll.
// sideways on its own.
style={{ style={{
flex: 1, flex: 1,
overflow: "hidden", overflow: "auto",
minHeight: 0, minHeight: 0,
padding: `14px ${TAB_RAIL_CLEARANCE}px 250px 32px`, padding: `14px ${TAB_RAIL_CLEARANCE}px 250px 32px`,
}} }}

View File

@@ -4,7 +4,7 @@
* minus the mascot swimming through the scene (too distracting for a clock you read * minus the mascot swimming through the scene (too distracting for a clock you read
* at a glance). * at a glance).
* *
* Mounted for as long as the app is, and only hidden: Einfg and the remote's Guide key * Mounted for as long as the app is, and only hidden: Pos1 and the remote's Guide key
* have to show it at once, not after a first render. The second ticker only runs while * have to show it at once, not after a first render. The second ticker only runs while
* it is on screen. Any click closes it. */ * it is on screen. Any click closes it. */

View File

@@ -522,14 +522,14 @@ describe("Del", () => {
}); });
}); });
describe("Einfg", () => { describe("Pos1", () => {
it("toggles the clock, on every page", () => { it("toggles the clock, on every page", () => {
for (const page of ["music", "room", "typing", "parents"] as const) { for (const page of ["music", "room", "typing", "parents"] as const) {
expect(press("Insert", { ...initialUiState, page })).toContainEqual({ expect(press("Home", { ...initialUiState, page })).toContainEqual({
type: "ui", type: "ui",
patch: { showClock: true }, patch: { showClock: true },
}); });
expect(press("Insert", { ...initialUiState, page, showClock: true })).toContainEqual({ expect(press("Home", { ...initialUiState, page, showClock: true })).toContainEqual({
type: "ui", type: "ui",
patch: { showClock: false }, patch: { showClock: false },
}); });

View File

@@ -269,9 +269,9 @@ export function handleKey(
// another room. // another room.
if (key === "Delete" && !event.ctrlKey && !event.metaKey) return [{ type: "screen" }]; if (key === "Delete" && !event.ctrlKey && !event.metaKey) return [{ type: "screen" }];
// Einfg, right next to it: the clock, over whatever is on screen - the typing tab // Pos1, in the same block: the clock, over whatever is on screen - the typing tab
// included, like Del, since no lesson drills it either. // included, like Del, since no lesson drills it either.
if (key === "Insert" && !event.ctrlKey && !event.metaKey) { if (key === "Home" && !event.ctrlKey && !event.metaKey) {
return [{ type: "pop", freq: 520 }, { type: "ui", patch: { showClock: !state.showClock } }]; return [{ type: "pop", freq: 520 }, { type: "ui", patch: { showClock: !state.showClock } }];
} }

View File

@@ -273,11 +273,17 @@ button {
focused. */ focused. */
padding: 14px 10px 14px; padding: 14px 10px 14px;
cursor: grab; cursor: grab;
}
/* Scrolls by wheel, touch and keyboard, but draws no scrollbar. */
.shelf-row,
.no-scrollbar {
scrollbar-width: none; /* Firefox */ scrollbar-width: none; /* Firefox */
-ms-overflow-style: none; /* old Edge */ -ms-overflow-style: none; /* old Edge */
} }
.shelf-row::-webkit-scrollbar { .shelf-row::-webkit-scrollbar,
.no-scrollbar::-webkit-scrollbar {
display: none; /* Chrome, Safari */ display: none; /* Chrome, Safari */
} }