Skip to content

Remove sidemenu#1071

Open
timbms wants to merge 562 commits intodevelopfrom
feature/remove-sidemenu-swiftui-2026
Open

Remove sidemenu#1071
timbms wants to merge 562 commits intodevelopfrom
feature/remove-sidemenu-swiftui-2026

Conversation

@timbms
Copy link
Copy Markdown
Contributor

@timbms timbms commented Feb 15, 2026

No description provided.

timbms and others added 30 commits July 25, 2025 06:38
…der. Therefore passing the color information in the call to the iconify api in line with https://iconify.design/docs/api/svg.html

Signed-off-by: Tim Bert <5411131+timbms@users.noreply.github.com>
Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>
* Enable f7 icons as for android app. Align with android app
* CSS injection as used in android app is ineffective with SDImageSVGCoder. Therefore passing the color information in the call to the iconify api in line with https://iconify.design/docs/api/svg.html
* Extending tests

Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>

---------

Signed-off-by: Tim Bert <5411131+timbms@users.noreply.github.com>
Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>
Signed-off-by: Tim Bert <5411131+timbms@users.noreply.github.com>
Signed-off-by: Tim Bert <5411131+timbms@users.noreply.github.com>
Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>
Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>
remove updateNavigationTitle

Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>
Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>
Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>
Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>
Improving stability of IconView

Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>
Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>
Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>
Show current image before new image is loaded
Handling of none icon

Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>
Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>
Signed-off-by: Tim Bert <5411131+timbms@users.noreply.github.com>
Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>
Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>
Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>
Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>
Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>
IconView to take full widget only

Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>
Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>
Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>
…syntax

Included environmentObject for all RowViews where necessary

Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>
* Include tag 'events' in openapi generation

Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>

* Correcting openapi.json for Content-Type sent by getEvents

Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>

* Removed content application/json for getEvents and regenerated Client.swift and Types.swift
Introduced the struct OpenHABEvent to decode getEvents data. Should be included in openapi.json
Introduced helper openHABEvents(topics: ) to get an AsyncSequence

Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>

* DateTime parsing pushed to OpenAPIService initializer
Removed updateForLongPolling and pollDataForSitemap(subscriptionId) that was not used

Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>

* Adds a complete working SSE command item impl

Signed-off-by: Dan Cunningham <dan@digitaldan.com>

* revert dev id

Signed-off-by: Dan Cunningham <dan@digitaldan.com>

* remove commented code

Signed-off-by: Dan Cunningham <dan@digitaldan.com>

* better screensaver commands

Signed-off-by: Dan Cunningham <dan@digitaldan.com>

* new device app options for notifications/sse

Signed-off-by: Dan Cunningham <dan@digitaldan.com>

* Adds TTS, finalizes device sytax, updates README

Signed-off-by: Dan Cunningham <dan@digitaldan.com>

* remove comment

Signed-off-by: Dan Cunningham <dan@digitaldan.com>

* Small cleanups

Signed-off-by: Dan Cunningham <dan@digitaldan.com>

---------

Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>
Signed-off-by: Dan Cunningham <dan@digitaldan.com>
Co-authored-by: Dan Cunningham <dan@digitaldan.com>
Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>
Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>
* Include tag 'events' in openapi generation

Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>

* Correcting openapi.json for Content-Type sent by getEvents

Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>

* Removed content application/json for getEvents and regenerated Client.swift and Types.swift
Introduced the struct OpenHABEvent to decode getEvents data. Should be included in openapi.json
Introduced helper openHABEvents(topics: ) to get an AsyncSequence

Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>

* DateTime parsing pushed to OpenAPIService initializer
Removed updateForLongPolling and pollDataForSitemap(subscriptionId) that was not used

Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>

* Adds a complete working SSE command item impl

Signed-off-by: Dan Cunningham <dan@digitaldan.com>

* revert dev id

Signed-off-by: Dan Cunningham <dan@digitaldan.com>

* remove commented code

Signed-off-by: Dan Cunningham <dan@digitaldan.com>

* better screensaver commands

Signed-off-by: Dan Cunningham <dan@digitaldan.com>

* new device app options for notifications/sse

Signed-off-by: Dan Cunningham <dan@digitaldan.com>

* Adds TTS, finalizes device sytax, updates README

Signed-off-by: Dan Cunningham <dan@digitaldan.com>

* remove comment

Signed-off-by: Dan Cunningham <dan@digitaldan.com>

* Small cleanups

Signed-off-by: Dan Cunningham <dan@digitaldan.com>

---------

Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>
Signed-off-by: Dan Cunningham <dan@digitaldan.com>
Co-authored-by: Dan Cunningham <dan@digitaldan.com>
timbms and others added 14 commits February 13, 2026 17:18
Introduce an immutable WidgetDisplayState snapshot in OpenHABCore
that centralizes label text, effective state, value ranges, and
mapping resolution. All iOS SwiftUI row views and the watchOS
WidgetRowViewModel now derive display properties from this single
source instead of querying widget/item properties directly.

Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>
The sendCommand closures on widgets captured [weak self] where self
was the OpenHABPage. When the page title didn't change during long
polling, the new page was never retained and got deallocated, killing
all command closures. Wire closures directly to UserData instead,
matching what iOS SitemapPageViewModel.injectSendCommand already does.

Also extract WidgetRenderingKind for shared row-type resolution and
simplify OpenAPIService server URL handling.

Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>
Both platforms now use valueText(step:) + widget.unit consistently.
iOS no longer prefers the server labelValue (which could differ in
format), and watchOS no longer switches between server and local
formatting on button press.

Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>
Address code review findings: add @mainactor to WidgetCommandDispatcher,
include sourcePrefix/deviceId in SitemapPageViewModel commands, snapshot
displayState once per render in all row views, restore ColorPicker
throttle+debounce for real-time feedback, and align SegmentedRowView
to use displayState.mappings consistently.

Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>
Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>
Extract inline view code into computed properties in settings views
and reorder helper functions after body in row views for consistent
structure.

Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>
Introduce OHTextToken style tokens to standardize typography across all
row views, replacing ad-hoc font/lineLimit/truncation settings. Add
number pattern formatting for setpoint and slider values on both iOS
and watchOS. Improve page title fallback handling and video layout.

Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>
Stop page handling when SitemapPageView disappears so old polling
tasks don't continue running alongside new ones when navigating
between sitemaps. This also eliminates redundant getSitemaps calls
caused by multiple view model instances polling simultaneously.

Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>
Introduce a key-based deduplication check (sitemap+pageId) to skip
redundant startPageHandling() calls, and a UUID-based run ID to
discard results from superseded polling tasks. Adds structured
logging with reason/runID/key for easier debugging. Refines
connection change handling to avoid unnecessary polling restarts
when the URL hasn't changed.

Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>
Introduce WidgetCommandLifecycleState to track sending/failed states
for commands, with versioned state management and auto-reset. Add
command lifecycle indicator in the navigation toolbar. Extend
WidgetCommandPolicy with finalOnly and pressRelease modes, and add
WidgetCommandPhase to support press/change/release semantics in
ButtonGrid, Segmented, and Slider rows. Refactor startPageHandling()
into smaller focused methods for readability.

Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>
Switch title display mode to automatic and conditionally show the
command lifecycle indicator on the leading side only when not idle.

Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>
Replace always-visible search bar with a magnifying glass toolbar
button that toggles search presentation. On iOS 17+ uses the
isPresented parameter of searchable; on older versions falls back
to a custom bottom search bar with focus management.

Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>
Remove the SideMenu package dependency and replace it with a
SwiftUI-driven app shell using NavigationSplitView on iPad and a
sheet on iPhone. Introduce AppShellCoordinator to bridge menu
requests between SwiftUI and the UIKit root view controller, and
AppShellView as the new window root. Rename showSideMenu to
showMenu throughout, remove storyboard initial view controller,
and clean up navigation chrome handling.

Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>
@digitaldan
Copy link
Copy Markdown
Contributor

Love the new menu ! Couple things i noticed.

When i load up the app on the main ui, the navigation title is visible and takes up space where it was not before (so should be hidden)

image

Also, the current menu allowed you to swipe from the right of the screen to the left to get the menu, while undocumented, it was helpful if pages did not load or broke and we could not get our hamburger menu button back (stranded at this point). Any thoughts on something to address that?

@digitaldan
Copy link
Copy Markdown
Contributor

Also when testing on a ipad, the behavior is a bit odd,

image

And the top menu button does not do anything once the side menu is open

Also i noticed that the app is not loading the main page when first run, you have to click "home" again to get it to load.

- Use inline title display mode to avoid extra space in sitemap view
- Add right-edge swipe gesture to open menu on compact layout
- Start iPad sidebar hidden and toggle visibility on hamburger tap
- Use prominentDetail split view style for better iPad proportions
- Move setupTracker() before switchToSavedView() so network tracker
  is ready when sitemap view calls waitForActiveConnection()

Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>
@timbms
Copy link
Copy Markdown
Contributor Author

timbms commented Feb 15, 2026

@digitaldan Thanks for the feedback. I tried to fix is quickly.

@digitaldan
Copy link
Copy Markdown
Contributor

so when i load it now, still a blank page, and there are duplicate menu buttons, but i do like the floating menu !

image

@digitaldan
Copy link
Copy Markdown
Contributor

also when i do reload the webview, both menu buttons are still visible, and the content is pushed way down from the top

image

On iPad the NavigationSplitView provides its own sidebar toggle, so
the hamburger button in SitemapNavigationView is redundant. Only show
it on compact (iPhone) layouts.

Also skip the UIKit navigation bar for webview on iPad to prevent
duplicate chrome and content being pushed down.

Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>
The search button (magnifying glass) in the sitemap toolbar is only
useful on compact layouts. On iPad the NavigationSplitView provides
the sidebar and the extra toolbar button is out of place.

Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>
@digitaldan
Copy link
Copy Markdown
Contributor

So its still not loading the main ui at launch. FYI this is a clean simulator running our app in the default demo mode.

image

its also still showing the left menu button, and this is also pushing the view down still

image

Maybe test this yourself first with the simulators?

The webview's lifecycle methods (viewWillAppear, clearExistingPage,
didFail, viewWillDisappear) independently show/hide the UIKit
navigation bar, overriding applyNavigationChrome. On iPad inside
NavigationSplitView this causes the content to be pushed down by a
redundant nav bar.

Fix by checking horizontalSizeClass in setHideNavigationBar() and
viewWillDisappear — on regular width the UIKit nav bar stays hidden.

Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>
Delete all UIKit table view cells (ColorPickerCell, SetpointCell,
SliderUITableViewCell, etc.), their cell providers, WidgetCellProvider,
NoIconDisplayableCell, UITableViewCellExtension, and the old
OpenHABSitemapViewController — all fully replaced by SwiftUI views.

Also defer CurrentViewState publishing to the next run loop to avoid
mutating ObservableObject state during SwiftUI rendering, and add
VideoEncoding enum to VideoRowView.

Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>
Add LeftEdgeSwipeModifier so swiping from the left edge on iPad
toggles the sidebar, matching the right-edge swipe on iPhone.

Hide the NavigationSplitView toolbar when the webview is active on
iPad to prevent SwiftUI navigation chrome from appearing.

Reset navigation titles on all child view controllers before applying
chrome to prevent stale titles from leaking between view switches.

Signed-off-by: Tim Mueller-Seydlitz <timbms@gmail.com>
@digitaldan
Copy link
Copy Markdown
Contributor

Ok, looking good! 2 things, its still not loading the first time you launch. And second is that the app no longer rotates correctly (unless something is wrong with my simulator!)

image

@timbms timbms changed the base branch from develop to openapigen-swiftui February 23, 2026 14:15
@TAKeanice TAKeanice force-pushed the openapigen-swiftui branch from 1f242b5 to 166a59c Compare March 26, 2026 19:49
Base automatically changed from openapigen-swiftui to develop March 30, 2026 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants