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

Imperfect looks on the Color controls #1561

Open
Jay-o-Way opened this issue Jun 13, 2024 · 10 comments
Open

Imperfect looks on the Color controls #1561

Jay-o-Way opened this issue Jun 13, 2024 · 10 comments
Labels
bug Something isn't working design Issues with design/layout help wanted Extra attention is needed

Comments

@Jay-o-Way
Copy link
Contributor

Jay-o-Way commented Jun 13, 2024

Which version of the app?

WinUI 3 Gallery

Description

Minor issue.

  • In some occasions, it looks like the border of the ColorTile control and the child element(s) do not have the same CornerRadius, or a padding (?) that creates a border.
  • In some occasions, it looks like 4px is used.
  • In some (2) places, CornerRadius="4" is used. Not only is it hard-coded, it's also the incorrect value for these cases.

Screenshots

Schermafbeelding 2024-06-13 150625

Schermafbeelding 2024-06-13 152029

Note

A Grid with a CornerRadius (Style GalleryTileGridStyle uses OverlayCornerRadius) does not clip the content. A Border does. That means we can envelope each Grid with a Border. the accompanying Style should then be set on the Border, in place of the Grid.

Issue is: GalleryTileGridStyle is used throughout the DesignGuidance and Accessibility pages.

@Jay-o-Way Jay-o-Way added bug Something isn't working needs-triage labels Jun 13, 2024
@karkarl karkarl added help wanted Extra attention is needed design Issues with design/layout and removed needs-triage labels Jun 13, 2024
@niels9001
Copy link
Contributor

@Jay-o-Way Something you'd like to pick up?

@Jay-o-Way
Copy link
Contributor Author

Jay-o-Way commented Jul 18, 2024

@niels9001 I think these lines are unused and can be removed, which means the two top Grids can be removed. Can you confirm?


<ColumnDefinition Width="Auto" />

@niels9001
Copy link
Contributor

@niels9001 I think these lines are unused and can be removed, which means the two top Grids can be removed. Can you confirm?

Yes, even the root grid can be removed here?

<ColumnDefinition Width="Auto" />

I think we are using that columndefinition for the border?

@Jay-o-Way
Copy link
Contributor Author

I think we are using that columndefinition for the border?

Ah yes, the ShowSeparator. Thing is - in practice it isn't used, so I already removed it (locally) when working on this. Therefore the ColumnDefinition is obsolete.

@niels9001
Copy link
Contributor

I think we are using that columndefinition for the border?

Ah yes, the ShowSeparator. Thing is - in practice it isn't used, so I already removed it (locally) when working on this. Therefore the ColumnDefinition is obsolete.

Just looking at the code.. it's turned on by default:

image

And in 8 instances we turn it off https://github.com/search?q=repo%3Amicrosoft%2FWinUI-Gallery%20ShowSeparator&type=code?

So I think we are using it?

@Jay-o-Way

This comment was marked as outdated.

@niels9001
Copy link
Contributor

@Jay-o-Way It is used in some occasions, and it is visible for me?

Set to true:
image

Set to false:
image

I think, since we are use it here and there to make the default be false and only turn it on when needed to reduce the verbosity of XAML. But other than that, I think we need to keep it..

@Jay-o-Way
Copy link
Contributor Author

Jay-o-Way commented Jul 23, 2024

I see. Focussed on the declared ("false") values and missed the instances where it wasn't declared. 🫣
We could elevate this topic to a higher level: why not choose to use it either always or never?


Ugh, my brain keeps thinking more and more things. Maybe, one day, we can combine all the issues with these Color things, and refactor the whole thing..? Using a very large UserControl with bound data is a big work, but might solve a couple of issues.

@niels9001
Copy link
Contributor

niels9001 commented Jul 24, 2024

I see. Focussed on the declared ("false") values and missed the instances where it wasn't declared. 🫣 We could elevate this topic to a higher level: why not choose to use it either always or never?

This was per design spec. We only need it when 2 neighboring colors are similar to provide the right contrast. I don't think there's a problem here that needs to be solves? Having it default to false would be my only proposed change.

On the CornerRadius issues - yes, we should remove any hardcoded 4px radiuses if those are defined. Not sure why those were defined in the first place though 😨. (Could be that the grid style was added later, and we missed removing a few of these).

@Jay-o-Way
Copy link
Contributor Author

I've been digging into this now, but the corners are weird. Looks like it's not a matter of a property, but more of the rendering...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working design Issues with design/layout help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants