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

Update tab and language icon style for long text #4429

Merged
merged 11 commits into from Feb 2, 2024
Merged

Conversation

cooltey
Copy link
Collaborator

@cooltey cooltey commented Feb 1, 2024

Copy link
Member

@dbrant dbrant left a comment

Choose a reason for hiding this comment

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

I don't think it looks correct on my device (Galaxsy S9, Android 10):

image image

Can we please push back on Designers very strongly when something cannot be done a certain way? Fonts across various devices are not guaranteed to be exactly the same pixel width; we cannot guarantee that a box with an exact pixel size will contain a specific number of characters, because Fonts are not measured the same way that Views are. This is why font sizes are specified in sp units, while views are specified in dp units.

@dbrant
Copy link
Member

dbrant commented Feb 1, 2024

We're also forgetting that the user is able to control the global font size adjustment throughout the whole system (many users select a "larger" font size), which makes pixel-defined Views look even worse:

image image

Therefore it's generally not a good idea to define the size of a View in precise dp values, when expecting it to contain a specific number of characters. These kinds of Views should be variable size (perhaps with a minimum size) and scalable based on the font.

@cooltey
Copy link
Collaborator Author

cooltey commented Feb 2, 2024

Thanks @dbrant

I posted a reply to the designer to the ticket: https://phabricator.wikimedia.org/T353562#9508461

and I also tried to apply match_parent to the custom views but the result does not work as expected. Will let you know when the designer reviews it and passes it to code review.

@cooltey
Copy link
Collaborator Author

cooltey commented Feb 2, 2024

@dbrant it's ready for review!

@dbrant dbrant merged commit 4f0e46b into main Feb 2, 2024
2 checks passed
@dbrant dbrant deleted the update-cube-icon-design branch February 2, 2024 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants