Repository navigation
Keep dashboard hide and show in the native F menu - #15
Conversation
fdussert
left a comment
There was a problem hiding this comment.
Thanks a lot for this, Florian! Being able to get the Edge back for a moment without quitting the helper is a real gap, and the change is small and easy to follow. Keeping the user's choice in a separate DashboardVisibility value, so that setEdgeFrame cannot bring a hidden dashboard back after a display rearrangement, sleep/wake or an Edge reconnect, is exactly the right shape. The menu item is disabled while the Edge is gone, the shim registry is updated, and scripts/test-helper.sh and scripts/build-helper.sh both pass cleanly here.
A few things before this can go in:
-
Showing the dashboard steals keyboard focus.
showDashboard()callsNSApp.activate(ignoringOtherApps: true)andmakeKeyAndOrderFront, while every other path inKioskWindowusesorderFrontRegardless()without activating the app. After "Show", the kiosk becomes the key window, so whatever the user types goes to a touch strip with no keyboard. Could you useorderFrontRegardless()(plusNSApp.unhide(nil)only whenNSApp.isHidden) and leave activation alone? -
Cmd-H in the admin. The "existing hide/show buttons" in the comment on
applicationDidHide/applicationDidUnhideare really the admin's "Hide Fremkit" (Cmd-H) menu item. Because of point 1, unhiding the app from the Dock while the admin is open now makes the kiosk key over the admin. Once point 1 is fixed this mostly goes away, but please reword the comment. The|| NSApp.isHiddenchecks are then redundant, sinceapplicationDidHidealready setshiddenByUser. -
What touch and the mouse do while hidden. Touches still map onto the Edge, so they land on whatever is underneath, which is often the Finder desktop (taps, drags, and a long press turns into a right-click). The mouse fence is on by default and still keeps the pointer off the Edge, so the windows behind can only be reached by touch and can't be dragged off.
-
Please have a look at #7. #7 (
WindowFence, by @mcouzinet) tackles the same pain automatically: every two seconds, any window that lands on the Edge is moved back to the main display, under the same fence switch. Once it lands, with the fence on there is nothing left behind the kiosk, so "Hide" would mostly reveal the wallpaper. The two fit together well if Hide becomes "borrow the Edge as a normal display": pause both fences (pointer and window sweep) while the dashboard is hidden, and resume them on Show. That also solves point 3. Could you rebase on top of #7, or coordinate with @mcouzinet? They don't conflict textually, so it's really about the behaviour. -
Labels. "Hide" and "Show" ("Masquer" and "Réafficher") have no object, while the items around them say "Reload the dashboard". How about "Hide the dashboard" / "Show the dashboard" and "Masquer le dashboard" / "Afficher le dashboard"? README.md line 218 lists the menu items and should mention the new one.
-
CHANGELOG.
## Unreleasedalready has an### Addedsection; please add the line there instead of opening a new heading at the top. Please also use the project's wording ("the Edge" rather than "XENEON", "the helper's menu" rather than "native F menu") and the bold lead sentence the other entries use. -
Tests (minor).
testMenuLabelsAreWrittenInBothLanguagespins the exact copy and duplicatesL10nTests.testEveryKeyIsWrittenInBothLanguages; I'd drop it. The two state tests are fine. -
Nit. In
KioskWindow, the new members sit betweenurland the doc comment ofretryWork. A// MARK: - Visibilitysection after Geometry, with a line of doc onhideDashboard/showDashboard, would match the rest of the file.
A note on persistence: not keeping the hidden state across a helper restart looks right to me (a dashboard that stays dark after a reboot would look broken), so no change needed there, just worth a word in the description.
Thanks again, this is close!
|
Thanks for the quick turnaround, Florian! Everything from the first review is in: no more focus stealing, the separate application-hidden state is a neat way to handle Cmd-H, the mouse fence now pauses while the Edge is borrowed (including across a reconnect), and the labels, README, CHANGELOG and tests all look right. Helper tests (79/79) and the build pass here. One thing left, and it's the #7 point: the branch doesn't build on #7 yet, and Thanks again, this is very close! |
Let the user hide and show the XENEON window without quitting the helper. Preserve that choice through display rearrangements while touch and server state continue to run. Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Keep one activation rule for the mouse fence and any additional fence registered by the helper. WindowFence can register its start/stop callback without duplicating hide and reconnect handling. Co-Authored-By: Claude <noreply@anthropic.com>
368510b to
965175a
Compare
What this changes
Adds “Masquer le dashboard / Afficher le dashboard” (English: “Hide the dashboard / Show the dashboard”) to the native F menu. Hiding lends the XENEON display to windows behind the dashboard without quitting Fremkit. Touch and data collection continue. The explicit hidden state survives display rearrangement and Cmd-H, but is held only in memory: restarting the helper shows the dashboard again.
The same visibility decision now drives every registered fence callback. The existing mouse fence pauses while the dashboard is hidden and resumes when it returns, including after a display reconnect. PR #7's WindowFence is still held and is not included here. When it lands, its constructor can register a start/stop callback in
fenceUpdates; that makes its two-second window sweep follow the identical hide/show rule. Until that integration lands, this PR does not claim to control the window sweep.Verification
pnpm helper:test: 79 passed.pnpm helper:build,pnpm typecheck,pnpm test: pass (1,368 server and 385 UI tests).