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

Add routes for home page tabs #2074

Merged
merged 2 commits into from
Sep 18, 2023
Merged

Conversation

florian-h05
Copy link
Contributor

@florian-h05 florian-h05 commented Sep 17, 2023

Adds routes for /overview, /locations, /equipment and /properties so a home page reload keeps the tab and routing to individual tabs is possible.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
@florian-h05 florian-h05 requested a review from a team as a code owner September 17, 2023 12:16
@florian-h05 florian-h05 added enhancement New feature or request main ui Main UI labels Sep 17, 2023
Copy link
Member

@ghys ghys left a comment

Choose a reason for hiding this comment

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

That's great! The much-requested feature I was referring to was #866 - have a way to show the locations tab for those who don't configure an overview page.
While it doesn't address the issue completely it's a good step forward as they could just open /locations if they want.
If we choose not to have a setting to configure the default initial tab, changing the tab would set a openhab.ui:home.lastHomePageTab local storage setting so the last accessed tab would be restored if they hit the root URL - this PR has made it easier.
In any case it's a nice improvement as it is.

@ghys ghys merged commit d2685e9 into openhab:main Sep 18, 2023
@ghys ghys added this to the 4.1 milestone Sep 18, 2023
@florian-h05 florian-h05 deleted the homepage-tabroutes branch September 18, 2023 18:52
JustinGeorgi pushed a commit to JustinGeorgi/openhab-webui that referenced this pull request Sep 24, 2023
Adds routes for `/overview`, `/locations`, `/equipment` and
`/properties` so a home page reload keeps the tab and routing to
individual tabs is possible.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: jgeorgi <justin.georgi@gmail.com>
JustinGeorgi pushed a commit to JustinGeorgi/openhab-webui that referenced this pull request Sep 24, 2023
Adds routes for `/overview`, `/locations`, `/equipment` and
`/properties` so a home page reload keeps the tab and routing to
individual tabs is possible.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: jgeorgi <justin.georgi@gmail.com>
digitaldan pushed a commit to digitaldan/openhab-webui that referenced this pull request Sep 24, 2023
Adds routes for `/overview`, `/locations`, `/equipment` and
`/properties` so a home page reload keeps the tab and routing to
individual tabs is possible.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
florian-h05 added a commit to florian-h05/openhab-webui that referenced this pull request Dec 10, 2023
Fixes openhab#2196.
Reverts openhab#2074.

I have tried messing around with the browser history manually to fix that issue, however trying several approaches, none worked perfect.
This is the best solution I could come up with, it at least remembers which tab you had opened when you navigate back to the home page from any other page.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request main ui Main UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants