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

Display page markup on Main UI overview page (including background colors/images) #1627

Closed
Dennis1984120 opened this issue Jan 7, 2023 · 13 comments · Fixed by #1642
Closed
Labels
enhancement New feature or request main ui Main UI

Comments

@Dennis1984120
Copy link

When designing a page in the Main UI, you can choose to use a custom background-image. This works in general, but not when that specific page is (displayed on the) overview page of the Main UI, both in the browser and on mobile.

For this reason, you cannot create the new style that for example the Apple Home app and the Homey app uses (colored background and semi-transparant/white widgets on top).

While designing ("correct"):
background-correct

Displaying ("wrong"):
background-white

My suggestion is to display the background-properties on the overview page when they are defined as such.

@Dennis1984120 Dennis1984120 added enhancement New feature or request main ui Main UI labels Jan 7, 2023
@stefan-hoehn
Copy link
Contributor

Can you please provide the information how you configured the background image?

@Dennis1984120
Copy link
Author

Dennis1984120 commented Jan 12, 2023

Yes, of course.

This is my YAML right at the top of the page:

config:
label: Startpagina
style:
background-image: url(/static/backgrounds/one.png)
background-size: cover

And to emphasize again... it works on all pages, but on the overview page some style information is just 'deleted'. If I display the specific page just by linking to it directly (without the overview page) it just works.

@hmerk
Copy link

hmerk commented Jan 13, 2023

Just tried and can confirm this wrong behavior.
Somehow the style gets ignored.
Opening overwiew page in editor and pressing run is working fine, but not when calles as homepage.

@stefan-hoehn
Copy link
Contributor

I can confirm that it doesn't work. What confuses me though that you do seem to see it during the design phase. I don't see it even even there.

Would you mind providing the code of a very much simplified overview page so I am able to reproduce the issue on my side? (you can just delete most of your code in the code tab, just make sure you don't save it or make a backup of the code beforehand to be able to restore it).

Here is my indenting:
image

@hmerk Can you see it in edit mode?

@stefan-hoehn
Copy link
Contributor

Justin actually noticed that seems to be related to the tabbed pages:
https://community.openhab.org/t/overview-page-background-image/138139/7

@stefan-hoehn
Copy link
Contributor

I have a provided a PR that fixes the issue ^

image

@hmerk
Copy link

hmerk commented Jan 14, 2023

@stefan-hoehn But what about the background color, that's what I was testing and it did not work.

@stefan-hoehn
Copy link
Contributor

I am pretty sure it'll work as well. I am going to check tomorrow

@hmerk
Copy link

hmerk commented Jan 14, 2023

@stefan-hoehn Did not check the PR before my comment. Now that I have read it, I believe it will solve both issues.
Thanks !

@stefan-hoehn
Copy link
Contributor

stefan-hoehn commented Jan 14, 2023

Me too, but nothing works before it is actually verified and tested.... Old QA wisdom 😀

I can confirm that also the bg-color works

image

@Dennis1984120
Copy link
Author

This is really great @stefan-hoehn . Thanks a lot! And also thanks @hmerk for confirming this issue. Really great if this makes it into OH4 or earlier, so I can finally complete my preferred styling all through my UI.

Can I buy you a coffee/anything else or do you want me to make a donation to OpenHAB foundation?

@stefan-hoehn
Copy link
Contributor

Can I buy you a coffee/anything else or do you want me to make a donation to OpenHAB foundation?

"Applause feeds the hunger of the artist" <3

You can become a "sustaining member", Dennis, if you like:

https://www.openhabfoundation.org/join/

@hmerk
Copy link

hmerk commented Jan 15, 2023

Donations are also always welcome ;-)

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 a pull request may close this issue.

3 participants