-
Notifications
You must be signed in to change notification settings - Fork 429
Add kiosk mode core infrastructure (PR 1/5) #4422
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
nstefanelli
wants to merge
41
commits into
home-assistant:main
Choose a base branch
from
nstefanelli:kiosk-pr1-core
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+2,553
−90
Open
Changes from all commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
61c9ff7
Add kiosk mode core infrastructure (PR 1/5)
nstefanelli dcfb29e
Use SFSafeSymbols instead of string-based system images
nstefanelli b9efbcf
Add unit tests for kiosk mode functionality
nstefanelli 9817f51
Address PR review feedback
nstefanelli aa39b40
Add Kiosk Mode entry to app settings menu
nstefanelli b2ce91a
Fix MainActor isolation error in deinit - weak references handle clea…
nstefanelli db18fb5
Improve kiosk auth behavior
nstefanelli 664b1b9
Fix: Use manager.settings for auth checks, not local settings copy
nstefanelli 4329c1e
Fix status bar hiding and add 30-second screensaver timeout
nstefanelli 7f25208
Merge upstream/main to resolve conflicts
nstefanelli 4004e78
Fix SwiftFormat lint issues
nstefanelli a79e322
Fix SwiftFormat issues in test file (sort imports, remove test prefix)
nstefanelli e05279e
Merge branch 'main' into kiosk-pr1-core
nstefanelli 39d5d5e
Fix kiosk settings UI issues from PR review
nstefanelli a71e530
Clarify night time logic comments per Copilot review
nstefanelli 19f95f3
Merge branch 'main' into kiosk-pr1-core
nstefanelli 806f28f
Address PR review feedback from bgoncal
nstefanelli fedb9ba
Merge branch 'main' into kiosk-pr1-core
nstefanelli a618cdc
Remove unused settings and add Done button to toolbar
nstefanelli a690539
Merge branch 'main' into kiosk-pr1-core
nstefanelli 1649e29
Address PR #4218 review feedback
nstefanelli cf2b11a
Merge branch 'main' into kiosk-pr1-core
nstefanelli 20f3679
Merge branch 'main' into kiosk-pr1-core
nstefanelli be5fb59
Address PR review feedback from bgoncal
nstefanelli 913edc2
Merge upstream/main and adapt kiosk mode to new Frontend directory st…
nstefanelli 57848ae
Regenerate SwiftGen Strings.swift with kiosk localization keys
nstefanelli f4896bb
Fix Xcode project file and update database table for upstream compati…
nstefanelli b5e5285
Update Xcode project and regenerate SwiftGen strings after upstream m…
nstefanelli 89db14f
Replace deprecated edgesIgnoringSafeArea with ignoresSafeArea
nstefanelli 83bbd2f
Address Copilot code review feedback
nstefanelli d89d94c
Remove extra trailing blank line in KioskSettings test file
nstefanelli 3050279
Fix database table count tests for kiosk settings table
nstefanelli 0a7f1c0
Merge remote-tracking branch 'upstream/main' into kiosk-pr1-core
nstefanelli 58241d1
Rebuild pbxproj from upstream to fix corrupted merge
nstefanelli 099edf2
Add KioskSettingsTable to Shared-watchOS build phase
nstefanelli 75e8b72
Remove KioskSettingsTable from SharedTesting build phase
nstefanelli 7786ec9
Address second round of Copilot review feedback
nstefanelli 69b0743
Address maintainer review: handler pattern, fullscreen screensaver, G…
nstefanelli 7a2cceb
Strip day/night brightness schedule for separate PR, hide clock optio…
nstefanelli d6a88b7
Merge upstream/main into kiosk-pr1-core
nstefanelli b1622f2
Address round 2 maintainer review and Copilot feedback
nstefanelli File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
30 changes: 30 additions & 0 deletions
30
Sources/App/Frontend/Extensions/WebViewController+Kiosk.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| import Shared | ||
| import UIKit | ||
|
|
||
| // MARK: - Kiosk Mode Extension | ||
|
|
||
| extension WebViewController { | ||
| /// Setup kiosk mode integration with KioskModeManager | ||
| /// Call this from viewDidLoad | ||
| func setupKioskMode() { | ||
| KioskModeManager.shared.setup(using: self) | ||
| } | ||
|
|
||
| // MARK: - Status Bar & Home Indicator | ||
|
|
||
| var kioskPrefersStatusBarHidden: Bool { | ||
| KioskModeManager.shared.prefersStatusBarHidden | ||
| } | ||
|
|
||
| var kioskPrefersHomeIndicatorAutoHidden: Bool { | ||
| KioskModeManager.shared.prefersHomeIndicatorAutoHidden | ||
| } | ||
|
|
||
| // MARK: - Touch Handling | ||
|
|
||
| /// Record user touch activity to reset the screensaver idle timer | ||
| /// Required because WKWebView consumes touch events before UIKit idle detection | ||
| func recordKioskActivity() { | ||
| KioskModeManager.shared.recordActivity(source: "touch") | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| import CoreGraphics | ||
| import Foundation | ||
| import Shared | ||
|
|
||
| // MARK: - Kiosk Constants | ||
|
|
||
| /// Centralized constants for the kiosk mode | ||
| public enum KioskConstants { | ||
| // MARK: - Animation Durations | ||
|
|
||
| public enum Animation { | ||
| /// Standard transition animation duration | ||
| public static let standard: TimeInterval = 0.3 | ||
| /// Quick animation for subtle transitions | ||
| public static let quick: TimeInterval = 0.2 | ||
| /// Slow animation for screensaver transitions | ||
| public static let slow: TimeInterval = 0.5 | ||
| /// Pixel shift animation duration | ||
| public static let pixelShift: TimeInterval = 1.0 | ||
| } | ||
|
|
||
| // MARK: - UI Dimensions | ||
|
|
||
| public enum UI { | ||
| /// Standard corner radius (uses DesignSystem) | ||
| public static let cornerRadius: CGFloat = DesignSystem.CornerRadius.oneAndHalf | ||
| /// Small corner radius (uses DesignSystem) | ||
| public static let smallCornerRadius: CGFloat = DesignSystem.CornerRadius.one | ||
| /// Large clock font size | ||
| public static let largeClockFontSize: CGFloat = 120 | ||
| /// Minimal clock font size | ||
| public static let minimalClockFontSize: CGFloat = 80 | ||
| /// Digital clock font size | ||
| public static let digitalClockFontSize: CGFloat = 100 | ||
| /// Analog clock size | ||
| public static let analogClockSize: CGFloat = 300 | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.