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

style: refine sticky header on the artist and album detail pages #444

Merged
merged 10 commits into from
Oct 12, 2024

Conversation

United600
Copy link
Collaborator

No description provided.

add appbarbutton styles
@huynhsontung
Copy link
Owner

The artist's name is now deemphasized on the Album details page. Why are we changing the artist name style? We have more vertical space now right?
image

@huynhsontung
Copy link
Owner

Notice the header jitter while scrolling.

ApplicationFrameHost_C3HNSwG9d8.mp4

Also you can see the text flowing behind the header at the top edge. This is why I put the Header element on the same level as the ListView, and not as the ListView's Header. The ListView actually terminates before reaching the top edge .

image

@huynhsontung
Copy link
Owner

huynhsontung commented Sep 14, 2024

The new header also breaks keyboard navigation as it hides the focus highlight.

ApplicationFrameHost_C7OUc0Cg9m.mp4

@United600
Copy link
Collaborator Author

The artist's name is now deemphasized on the Album details page. Why are we changing the artist name style? We have more vertical space now right?

Changed to be consistent with the rest of the app headers. If anything now it's more pronounced, it got bumped from 28 to 32 font size.

Notice the header jitter while scrolling.

Yeah sometimes it "bounces", I attempted to use Translation instead of Offset, but the issue still occurs. Do you think the overlap between the content and the header exacerbates this problem? Any tips?

Also you can see the text flowing behind the header at the top edge

Yep, I think it's because of said "bouncing", or maybe scaling related, but I always got that 1 pixel line visibility issue.

The new header also breaks keyboard navigation as it hides the focus highlight.

I tried to minimize this as much as possible (obscures, at maximum, 2 items) but it's the nature of this type of header behavior.

@huynhsontung
Copy link
Owner

Changed to be consistent with the rest of the app headers. If anything now it's more pronounced, it got bumped from 28 to 32 font size.

You misread. I said artist name, which I just noticed you changed the font size to body text in the minimal state.

Yep, I think it's because of said "bouncing", or maybe scaling related, but I always got that 1 pixel line visibility issue.

Not really, even when we fix the top 1 pixel, you will still see the ListView behind the top 2 corners due to our corner radius > 1 pixel

I tried to minimize this as much as possible (obscures, at maximum, 2 items) but it's the nature of this type of header behavior.

This is not true. You can see in other parts of the app how ListView behaves when the mini-player is visible.

@United600
Copy link
Collaborator Author

Changed to be consistent with the rest of the app headers. If anything now it's more pronounced, it got bumped from 28 to 32 font size.

You misread. I said artist name, which I just noticed you changed the font size to body text in the minimal state.

Yep, my bad.

I tried to minimize this as much as possible (obscures, at maximum, 2 items) but it's the nature of this type of header behavior.

This is not true. You can see in other parts of the app how ListView behaves when the mini-player is visible.

Right, it introduces a fixed padding. That would be ideal but it can't be "fixed" since it doesn't take into account the possibility of changes to text size.

Comment on lines +55 to +58
<!-- Uniform padding to ensure the text baseline aligns with TextBlocks (Caption) that have centered vertical alignment -->
<Thickness x:Key="HyperlinkButtonUniformPadding">11,6.75,11,6.75</Thickness>

<Thickness x:Key="SplitButtonPadding">12,6,12,7.11</Thickness>
<Thickness x:Key="SplitButtonPadding">12,6,12,7.05</Thickness>
Copy link
Owner

Choose a reason for hiding this comment

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

What's up with the fractional values? Are these values from WinUI?

Copy link
Collaborator Author

@United600 United600 Oct 9, 2024

Choose a reason for hiding this comment

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

It is to keep the same height, and for the SplitButton also the content baseline, as the Button across all scales. However, it is not always perfect, as there can be discrepancies at either X25% or X75% scales.

No they are not from WinUI.

@huynhsontung huynhsontung merged commit c5cf81f into huynhsontung:main Oct 12, 2024
4 checks passed
@United600 United600 deleted the sticky-header branch October 12, 2024 12:34
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