Skip to content
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

WebViewUI: Open drawer instead of going back to Sitemaps #3706

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mueller-ma
Copy link
Member

When pressing the 'back to app' button the drawer is opened instead of closing the UI. This way users can switch faster between e.g. MainUI and notifications.

When pressing the 'back to app' button the drawer is opened instead of closing the UI. This way users can switch faster between e.g. MainUI and notifications.

Signed-off-by: mueller-ma <[email protected]>
Comment on lines -471 to -477
if (temporaryPage != null) {
temporaryPage = null
activity.updateTitle()
updateActionBarState()
updateFragmentState(FragmentUpdateReason.PAGE_UPDATE)
updateConnectionState()
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code needs to be restored otherwise the action bar doesn't show up when switching from MainUI to Sitemaps.

@digitaldan
Copy link
Contributor

Thanks @mueller-ma ! This is a nice improvement. I think in hindsight the name "exitToApp" was probably not what we wanted, it should have been named "menuButtonClicked" or something, as exiting was not really what we intended. ah well, naming stuff is hard.

@maniac103
Copy link
Contributor

I'm not too sure I'm a fan of that, because 'exitToApp' exactly matches the icon/appearance of the button. That means with this proposal we'd have 2 buttons opening 2 different drawers in MainUI, which look completely different.
IMHO, if we want to expand from 'exitToApp', we should integrate some new API into MainUI, maybe even integrated into its drawer menu, and remove exitToApp from newer MainUI versions.

@digitaldan
Copy link
Contributor

The only other app which uses "exitToApp" is the IOS client, and we also show the side menu. I don't think "exiting" is really what we intended in any situation.

That means with this proposal we'd have 2 buttons opening 2 different drawers in MainUI, which look completely different.

Hmm, not sure i understand, what two buttons ? and what 2 drawers?

@mueller-ma
Copy link
Member Author

Main UI could be changed to display the same right drawer as in the browser, but make the entries configurable via the app.

@digitaldan
Copy link
Contributor

The IOS client does something similar to the Main UI, it calls /rest/ui/tiles to grab the enabled UI's on a user's openhab, and then displays them in the native side menu in its own section along with the other IOS menu items.

@digitaldan
Copy link
Contributor

In any case, it would be nice if the MainUI and SItemaps could both be the primary interface in Android, right now the Main UI UX is clunky with it exiting to a sitemap every time that button is pressed.

@maniac103
Copy link
Contributor

maniac103 commented Jun 28, 2024

Hmm, not sure i understand, what two buttons ? and what 2 drawers?

Hamburger button on the left -> opens MainUI drawer
Exit button on the right -> opens app drawer

Main UI could be changed to display the same right drawer as in the browser, but make the entries configurable via the app.

That's about what I intended to suggest above: Make it possible for the app to inject items into MainUI's drawer, and get called back once they're selected.

@digitaldan
Copy link
Contributor

Hamburger button on the left -> opens MainUI drawer
Exit button on the right -> opens app drawer

Gotcha, Understood. Right now this works OK on IOS b/c its native menu comes in on the right side of the app, matching the MainUI button on the right side, could we maybe reuse the existing android side menu, just switch sides when in the main UI ? I worry about trying to do much magic in mixing the MainUI and NativeUI menu together.

@maniac103
Copy link
Contributor

could we maybe reuse the existing android side menu, just switch sides when in the main UI ?

I really don't think opening the drawer from different sides, depending from where/when it's opened (sitemap vs. Main UI), makes sense UX wise. Right hand side drawers are not really a thing in Android.

I worry about trying to do much magic in mixing the MainUI and NativeUI menu together.

Well, at some point we'll need to decide whether we want seamless MainUI integration or not. If the answer is yes, there's a price to pay for that, which is some additional complexity...

@digitaldan
Copy link
Contributor

I would suggest as a stop gap until we can make a hybrid menu in the MainUI, we at least open the native drawer on the left when the right menu button is clicked. While not totally ideal, its far superior to the experience right now , and gives us time to work on a longer term solution.

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.

3 participants