-
-
Notifications
You must be signed in to change notification settings - Fork 389
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 icon sizes relative to font size #4575
Conversation
Deployment of preview was torn down |
Why are there such much diffs related to a changed property order? Makes it a bit hard to review. |
I think this comes from some vscode tailwind plugin I am using which automatically sorts the TW classes. I didn't configure this, it seems to be the default. I think it happens when auto-format is applied on file-save. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, let's discuss UI again 🙃️ To me they finally look "not broken" now 😄️ Here are my arguments: Before, line-height of icons didn't match with the text and it always looked non-harmonic to me. Last, the forge and settings icons are way too big IMO and didn't had any size restrictions set at all. They now match in height with the line height of the owner/repo name to the left. The same goes for the badge showing the pipeline status. Besides the fact that to me it isn't adding value at this place and could be removed entirely, it is way too large. Overall my main point is though that all icons should have a relative size so the chosen font-size that "matches", i.e. either equals the font-size in line height or has a visible substantial difference (i.e. at least 1.5x). |
I don't know what to say to be honest... Icon buttons should be squares and the focus on the pipeline should lay on the status icon... Just make all icons the same size related to any text around it doesn't make any sense at all to me and is a pure black and white perspective.
Sorry but this is some kind of "human bullshit" and I don't mean it in an offensive way, but odd numbers exists to use them. Just make everything even or dividable by 5 or something similar is some weird human obsessions. |
Your putting my comment somewhat out of context. I didn't say "all icons should be identical" but some that match context-wise, being it with text attached right next to it (btw you even did #4458 because of that). But it doesn't make any sense from a UI PoV to have icons exceed neighboring elements by a fraction in height. There should be a logic behind sizing and no wild-west approach. Without such a logic, UI is "human bullshit" to me. There are rules for building UIs (just to use the contrast ratio rules as an example). Similar ones apply to sizing and margins. I am not bound to these sizes even though I consider them good but I'd like to see meaningful alternative proposals then that don't just follow a gut feeling. |
Ok if we want to strictly follow some ui design guidelines now fine but which one? If you are looking at the before/after screenshots, do you really think it looks good? If we want to change the icon sizes, fine, but then the surrounding space is now way too much. The icons for the pipeline status in particular now just look lost. I still think that especially icon buttons should have the same size regardless of the used icon. Now, every icon button as a completely different size. |
I am not a UI expert but if you check the icons and line height of this PR on GH, you'll also see that the icons on the right align with the line-height of the attached text. Not everything needs to go into (this) one PR WRT to related changes (spacing, margins, etc). I agree on the point of the surrounding space being to large somewhat. Yet again, I'd like to focus on the icon sizings here and if you don't like a 1:1 that's fine, but please come up with some other numbers than that are not 1.1x line-height like it has been before. Such relative sizes are confusing for the mind as they are so close to "match" but then they don't and your mind realizes this when looking at it and gives you the feeling that "something doesn't add up". If there is a clear difference (like e.g. 2x) then it is clear and non-confusing.
Yes, much better than before WRT to sizings.
I don't know yet what the "icon buttons" are in this context. Do you mean the forge icon? They should all have the same relative size now and the same height as the line-height of the owner/repo button on the left. If not, there's an issue. |
The icon size before was just fine for me. Make it relative is fine but making them way smaller without adjusting the spacing looks ugly and unpolished to me and thats why I will not approve it. Of course if other maintainers agree on this PR I wont block it. No the gitea icon doesnt look good. As I said these icons should be squares now the hight is bigger than the width and the width of the forge icon is different than the width of the settings icon button... |
Agree on that, height wasn't enforced by mistake. |
Fair enough. In this case I'll update everything and this PR will get bigger than initially thought, to have the possibility to potentially convince you with respect to styling. |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
@xoxys I think the inner part of the radio button is too big with 0.6: 0.4: |
IMO 0.6 looks better and should be the same ratio we had before. But no strong opinion here. |
OK, then let's keep it. Are we good here finally? 🙂️ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your work.
I guess thats a rendering issue in some browsers while using relative sizes like rem 😔 |
@qwerty287 Which browser? Checked with FF, Brave and Safari and couldn't reproduce when zooming in/out. |
We can check if e.g. 0.5rem has the same issue or 0.65 might fix it. |
Actually Firefox as well... |
My first check used a FF fork (Zen). I can reproduce with FF vanilla 👍️. However, given that it fails only for FF vanilla and works for others, I'd argue that this is a FF bug then? (and hence shouldn't block this PR). |
Have you tried the mentioned approaches? |
Not yet but now. Indeed Setting to 0.5 then. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I had this sort of issue already. Good that this hack still works 🤣 Yes, really weird rendering bug.
Tested again, everything else looks good to me.
Great we were able to finish this ✨ |
fix #2162 (comment)
Icon are now relative to the font-size in the browser and the height is aligned with the text height.
New classes were added for the badge and forge/settings icons in the repo view, they didn't had any size limits applied before.
Tested with different font-size settings in FF, from 12 to 16.
Example with size 12 in FF:
Changes