-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Optimize profile layout to enhance visual experience #31278
Conversation
The reason for this problem is that fixed-size svg is not centered between its two parent containers; |
@lunny why set that label when there is only 1 review and we aren't even sure whether this is valid at all? |
Sorry, made a mistake. |
Upon careful review of our previous communications, it can be seen that: Firstly, I encountered this issue on my Edge browser: the icons and their corresponding text are not horizontally centered; Subsequently, I pinpointed the cause by tracing back: there are two parent containers above the icon, neither of which had the display property set, resulting in their child elements not being centered. The height of the parent is 20, the child's height is 19, and the icon's height is 16; Finally, I resolved this issue by applying flex and center styles to both parent containers; As a result, I naturally proceeded to submit this pull request (PR). As for @silverwind , he states that the issue does not exist on his Firefox and Chrome browsers, but his evidence does not negate the problem I've raised! The issue I've brought up at least proves that there is indeed a style anomaly here! Moreover, my modifications have indeed resolved the issue I raised, and have not introduced any new problems. So, what else do I need to do? |
I can reproduce this in Windows's Chrome and Edge. edit: |
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.
Will check later whether there is a better way.
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.
This code looks good to me. Well done 👍🏻
I have identified the issue and resolved it; thus, at the very least, this issue indeed needed to be addressed. If you believe my modification is not reasonable enough, please state your thoughts, and I will cooperate to make corrections, rather than outright rejecting the modification. |
@kerwin612 Please wait for silverwind's review. |
Pushed a fix that removed the unnecessary and unsemantic |
{{svg "octicon-lock"}} | ||
</i> | ||
{{end}} | ||
<a class="flex-text-inline" href="{{AppSubUrl}}/user/settings#privacy-user-settings" data-tooltip-content="{{ctx.Locale.Tr (Iif .ShowUserEmail "user.email_visibility.limited" "user.email_visibility.private")}}"> |
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.
Hmm, it looks like an abuse.
The flex
and align items
should be on the parent element <li>
to align the svg mail
/ mailto
/ svg private
.
No idea why it is only on the svg private
.....
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.
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.
Yes I agree flex-text-inline
is likely not ideal, but it's aiming at this specific alignment problem that for some reason only shows on Windows, it does not reproduce on any MacOS browser for me.
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.
I guess the root problem is the "spaces" between elements, which make the height different.
I guess using {{- svg ... -}}
would make the height correct and no need to use "flex" on "a". Just a guess and using "flex" is still acceptable.
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.
Yes, likely it is whitespace-related because the display: flex
removes the whitespace rendering.
* giteaofficial/main: Fixed incorrect localization `explorer.go` (go-gitea#31348) Improve detecting empty files (go-gitea#31332) Fix hash render end with colon (go-gitea#31319) Fix line number widths (go-gitea#31341) Fix navbar `+` menu flashing on page load (go-gitea#31281) Reduce memory usage for chunked artifact uploads to MinIO (go-gitea#31325) Fix dates displaying in a wrong manner when we're close to the end of the month (go-gitea#31331) Fix adopt repository has empty object name in database (go-gitea#31333) Optimize profile layout to enhance visual experience (go-gitea#31278)
before:
after: