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

Fix profile avatar being slightly offset into left border (fixes #20822) #20994

Merged
merged 5 commits into from
Dec 15, 2022
Merged

Fix profile avatar being slightly offset into left border (fixes #20822) #20994

merged 5 commits into from
Dec 15, 2022

Conversation

RiedleroD
Copy link
Contributor

@RiedleroD RiedleroD commented Nov 18, 2022

I don't know why it was shifted in the first place or why the width is specified twice, but this fixes the problem, so it looks fine to me.

edit: I now do know why it was shifted, but I ignored the width thing because it's not part of the PR and I don't have to touch the codebase again hopefully

I don't know why it was shifted in the first place or why the width is specified twice, but this fixes the problem, so it looks fine to me.
@ineffyble ineffyble added bug Something isn't working ui Front-end, design labels Nov 24, 2022
@ClearlyClaire ClearlyClaire changed the title hotfix for #20822 Fix profile avatar being slightly offset into left border Nov 28, 2022
@ClearlyClaire ClearlyClaire changed the title Fix profile avatar being slightly offset into left border Fix profile avatar being slightly offset into left border (fixes #20822) Nov 28, 2022
@ClearlyClaire
Copy link
Contributor

I think this was here to align the avatar with the text. Maybe moving margin-left: -2px to the container element would make sense.

Copy link

@patrick91 patrick91 left a comment

Choose a reason for hiding this comment

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

I've done something like this in my instance to add transparent bg, it worked well :)

@hampuskraft
Copy link

@RiedleroD Would it be possible to do as @ClearlyClaire suggested and move it to the account__header__tabs class instead of removing the negative margin? That way, the avatar is perfectly aligned with the elements below it.

@RiedleroD
Copy link
Contributor Author

@hampuskraft certainly, but negative margin is usually bad practice. I'll see if there's a better way to do it later today and commit the best way I can find.

@hampuskraft
Copy link

In this case, I think a negative margin is the best (if not the only) solution. But if an alternative exists, that could be interesting.

@RiedleroD
Copy link
Contributor Author

Well if I knew more about the codebase, I'd simply remove the overflow:hidden that cuts off the border, and change the border into an outline, so it doesn't affect layouting. I don't know why the overflow was hidden though, because it's apparrently impossible to comment your CSS code (glaring at whoever wrote that, not looking up who it was via git blame though)

anyway, to resolve this as quickly as possible, this workaround is good enough for now. Someone should really rewrite that mess though, before too much technical debt accumulates and mastodon ends up looking like youtube or something.

@RiedleroD
Copy link
Contributor Author

btw, someone with a working mastodon testing setup should check if my changes actually work as intended. I double- and triple-checked with the changes I make via inspector in my browser, but mastodon is important enough for that to be insufficient. I won't be setting up a whole testing environment for a two-line change though, especially as reviews are required anyway.

Copy link

@hampuskraft hampuskraft left a comment

Choose a reason for hiding this comment

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

This should do the trick, but you might want to fix the formatting 😅

@RiedleroD
Copy link
Contributor Author

"Hmm I wonder why it takes this long to get looked at by the crew"

Pull requests that do not pass automated checks may not be reviewed

I thought the mastodon team was lackin but it was I who was the fool all along :I

well, I'm just glad I finally looked at the contributing guidelines instead of blaming it on "gargron bad hurr durr"

@Gargron Gargron merged commit c3388f4 into mastodon:main Dec 15, 2022
neatchee pushed a commit to neatchee/mastodon that referenced this pull request Dec 16, 2022
…odon#20822) (mastodon#20994)

* hotfix for mastodon#20822

I don't know why it was shifted in the first place or why the width is specified twice, but this fixes the problem, so it looks fine to me.

* realigned pfp with content below

* fixed formatting 

my bad

* added comment to explain the negative margin

before I forget - comments are *important* !

Co-authored-by: Riedler <riedler@gelse.eu>
@RiedleroD RiedleroD deleted the patch-1 branch January 5, 2023 12:55
nametoolong pushed a commit to nametoolong/nuage that referenced this pull request Jan 12, 2023
…odon#20822) (mastodon#20994)

* hotfix for mastodon#20822

I don't know why it was shifted in the first place or why the width is specified twice, but this fixes the problem, so it looks fine to me.

* realigned pfp with content below

* fixed formatting 

my bad

* added comment to explain the negative margin

before I forget - comments are *important* !

Co-authored-by: Riedler <riedler@gelse.eu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ui Front-end, design
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Avatar border bug [regression] Profile picture glitch in Mastodon 4
6 participants