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

Use same variable for status bar color as frontend #2757

Merged
merged 1 commit into from
May 7, 2024

Conversation

bgoncal
Copy link
Member

@bgoncal bgoncal commented May 1, 2024

Summary

We were using --app-header-background-color for status bar in the app and frontend uses --app-theme-color, this PR changes that to keep consistency with frontend

Screenshots

Link to pull request in Documentation repository

Documentation: home-assistant/companion.home-assistant#

Any other notes

@bgoncal bgoncal self-assigned this May 1, 2024
@bgoncal bgoncal linked an issue May 1, 2024 that may be closed by this pull request
@zacwest
Copy link
Member

zacwest commented May 2, 2024

The purpose of this view is to extend the background of the top header so it looks seamless - like a navigation controller. Is the header background color always the theme color or is this going to introduce discrepancies that look bad? What does this look like in the default themes?

@bgoncal
Copy link
Member Author

bgoncal commented May 2, 2024

The purpose of this view is to extend the background of the top header so it looks seamless - like a navigation controller. Is the header background color always the theme color or is this going to introduce discrepancies that look bad? What does this look like in the default themes?

Indeed, but browsers also do this "trick" (#2752), but for browsers the frontend uses app-theme-color instead of the app-header, so it makes sense to align I guess. @bramkragten can you confirm this?

For the default themes it looks the same with or without this change

@Nezz
Copy link

Nezz commented May 3, 2024

Yes, it'd align this way. It does not make a difference for the default theme, but it does for ones that use transparency for app-header-background-color like my theme:
https://github.com/Nezz/homeassistant-visionos-theme

I believe @bgoncal uses a similar theme too since he implemented home-assistant/frontend#20473

@@ -6,6 +6,7 @@ public struct ThemeColors: Codable {
public enum Color: String, CaseIterable {
// these are in WebSocketBridge.js in this repo (we inject it)
case appHeaderBackgroundColor = "--app-header-background-color"
Copy link

Choose a reason for hiding this comment

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

I wonder if we should fall back to this if the theme color is not set?

@bgoncal
Copy link
Member Author

bgoncal commented May 6, 2024

I checked with front end and app-theme-color will be always set, so no need to fallback

@bgoncal bgoncal merged commit 71e5dd8 into master May 7, 2024
5 checks passed
@bgoncal bgoncal deleted the align-statusbar-frontend branch May 7, 2024 08:57
bgoncal added a commit that referenced this pull request May 8, 2024
@jockebq
Copy link

jockebq commented May 8, 2024

Will this also resolve this issue?
home-assistant/frontend#18277

@Nezz
Copy link

Nezz commented May 8, 2024

No, that's a separate issue. I'll try to get it fixed.

@jockebq
Copy link

jockebq commented May 8, 2024

No, that's a separate issue. I'll try to get it fixed.

Great, really looking forward to it! What's the ETA from a fix like this to a release on iOS?

@bgoncal
Copy link
Member Author

bgoncal commented May 8, 2024

No, that's a separate issue. I'll try to get it fixed.

Great, really looking forward to it! What's the ETA from a fix like this to a release on iOS?

If it gets merged before the last week of the month it probably will be in the month's release, otherwise the month after. (Unless it is something critical)

@jockebq
Copy link

jockebq commented May 8, 2024

No, that's a separate issue. I'll try to get it fixed.

Great, really looking forward to it! What's the ETA from a fix like this to a release on iOS?

If it gets merged before the last week of the month it probably will be in the month's release, otherwise the month after. (Unless it is something critical)

Sounds great, if I join the Testflight beta, will things like this get released sooner in the beta?

@bgoncal
Copy link
Member Author

bgoncal commented May 8, 2024

Yes

@Nezz
Copy link

Nezz commented May 8, 2024

That issue/feature looks like a frontend change to me. You might not even need an app update.

@jockebq
Copy link

jockebq commented May 8, 2024

That issue/feature looks like a frontend change to me. You might not even need an app update.

Aha, ok, do I need a Home Assistant image beta version then? Or how do you mean this gets fixed?

@jockebq
Copy link

jockebq commented May 14, 2024

No, that's a separate issue. I'll try to get it fixed.

Great, really looking forward to it! What's the ETA from a fix like this to a release on iOS?

If it gets merged before the last week of the month it probably will be in the month's release, otherwise the month after. (Unless it is something critical)

Got the TestFlight update which pushed today, but the fix isn't there right? Because I still have the same issue as before?

Thank you!

@bgoncal
Copy link
Member Author

bgoncal commented May 14, 2024

No, that's a separate issue. I'll try to get it fixed.

Great, really looking forward to it! What's the ETA from a fix like this to a release on iOS?

If it gets merged before the last week of the month it probably will be in the month's release, otherwise the month after. (Unless it is something critical)

Got the TestFlight update which pushed today, but the fix isn't there right? Because I still have the same issue as before?

Thank you!

Nope, the PR got reverted because the front end font use "app-theme-color" with the same color as the top navigation bar all the times, so it looks weird in the app.
The goal is to extend the navigation bar color below the status bar, currently the only way possible is through --app-header-background-color

@jockebq
Copy link

jockebq commented May 14, 2024

No, that's a separate issue. I'll try to get it fixed.

Great, really looking forward to it! What's the ETA from a fix like this to a release on iOS?

If it gets merged before the last week of the month it probably will be in the month's release, otherwise the month after. (Unless it is something critical)

Got the TestFlight update which pushed today, but the fix isn't there right? Because I still have the same issue as before?
Thank you!

Nope, the PR got reverted because the front end font use "app-theme-color" with the same color as the top navigation bar all the times, so it looks weird in the app. The goal is to extend the navigation bar color below the status bar, currently the only way possible is through --app-header-background-color

Is --app-header-background-color something I can do myself or is this a fix you will work on?

@bgoncal
Copy link
Member Author

bgoncal commented May 14, 2024

@jockebq --app-header-background-color is a variable that you can set in your theme and customize the header background.

@jockebq
Copy link

jockebq commented May 14, 2024

@jockebq --app-header-background-color is a variable that you can set in your theme and customize the header background.

Ah, that I have already set. What I am talking about is this issue: home-assistant/frontend#18277
That on an iPhone 14 Pro looks very weird because the app itself does not begin on the top of the screen. So if you have a background set like in the picture it looks very bad.

@bgoncal
Copy link
Member Author

bgoncal commented May 14, 2024

Ok, I got it now, this PR was never meant to fix that, this was the original issue: #2752

@ncodee
Copy link

ncodee commented Jun 15, 2024

Wasn't this suppose to fix the issue?
I'm still seeing a solid background under the status bar, even with the new background option introduced in 2024.6.

@Nezz
Copy link

Nezz commented Jun 15, 2024

This was reverted in #2768:

I had to revert the PR, the app theme color doesn't always match the navigation bar, which makes it look weird in some situations like dark mode using the default themes

(see #2752)

The frontend was fixed to provide the correct color variables in Home Assistant 2024.6 (home-assistant/frontend#20758). I guess now the fix can be re-applied @bgoncal? I'm not sure how quickly people update.

@bgoncal bgoncal restored the align-statusbar-frontend branch June 25, 2024 11:45
@bgoncal
Copy link
Member Author

bgoncal commented Jun 25, 2024

@Nezz #2827

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Status bar color follows wrong color variable
6 participants