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 icon alignment for show/hide outdated link on resolved conversation #11881

Merged
merged 3 commits into from
Jun 15, 2020

Conversation

CirnoT
Copy link
Contributor

@CirnoT CirnoT commented Jun 13, 2020

Before:
chrome_2020-06-13_15-52-11

After:
chrome_2020-06-13_15-51-58

@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Jun 13, 2020
@silverwind
Copy link
Member

Better than before, but it does not look quite vertical center inside the box to me. Maybe some flexbox centering would help.

Also there's a border-radius issue on the bottom where the white background cuts into the border-radius of the box. Maybe you can either remove the background or set border-radius on the element with the background.

@CirnoT
Copy link
Contributor Author

CirnoT commented Jun 13, 2020

Better than before, but it does not look quite vertical center inside the box to me. Maybe some flexbox centering would help.

Wasn't supposed to fix that actually, just alignment between text and icon.

Also there's a border-radius issue on the bottom where the white background cuts into the border-radius of the box. Maybe you can either remove the background or set border-radius on the element with the background.

I see it, will try later and open another PR if I manage to get it right

@CirnoT CirnoT changed the title Fix alignment for show/hide outdated link on resolved conversation Fix icon alignment for show/hide outdated link on resolved conversation Jun 13, 2020
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Jun 13, 2020
@silverwind
Copy link
Member

silverwind commented Jun 13, 2020

Fine with me but I think we want to group related fixes together as less PRs is less work :)

@CirnoT
Copy link
Contributor Author

CirnoT commented Jun 13, 2020

Yes but it's not really an easy fix, because the issue is on .segment within .segments, and I can't override background there either because arc-green depends on changing background of .segment, so I would have to add another hack for this specific element there.

Also setting border radius is not a proper fix because if you look closely there, the actual bottom border line is thinner than it should be.

The best I can come up with so far is

& > .segment {
    margin-bottom: .02em;
}

@CirnoT
Copy link
Contributor Author

CirnoT commented Jun 13, 2020

Also setting border on first .segment breaks when comment is expanded. Ultimately the issue is caused by the fact that last .segment element is hidden, and that's the one that Fomantic applies border onto.

@techknowlogick techknowlogick added the topic/ui Change the appearance of the Gitea UI label Jun 13, 2020
@techknowlogick techknowlogick added this to the 1.13.0 milestone Jun 13, 2020
@silverwind
Copy link
Member

silverwind commented Jun 13, 2020

That border radius issue is tricky because fomantic uses

.ui.segments:not(.horizontal) > .segment:last-child

to fix the border radius but :last-child matches a hidden segment. I don't think this can be solved via CSS.

What we could do is remove background from .segment in both themes via an important rule.

@CirnoT
Copy link
Contributor Author

CirnoT commented Jun 13, 2020

It makes the segment same color as background on arc-green however, which is definitely not desired.

@silverwind
Copy link
Member

Generally I'd say arc-green has no business setting a different background there if the light theme also doesn't do it, but I guess these parts need a rework anyways.

@CirnoT
Copy link
Contributor Author

CirnoT commented Jun 13, 2020

The problem is that borders are generally less visible on arc-green, so it makes it harder to notice and is compensated with slight variations in background color.

Designing dark theme on top of light one is not an easy task, I'd say arc-green is doing exceptionally well for what it has to work with.

@CirnoT
Copy link
Contributor Author

CirnoT commented Jun 13, 2020

if the light theme also doesn't do it

Technically it does, the background isn't inherited but explicitly set on element to #fff

@silverwind
Copy link
Member

Designing dark theme on top of light one is not an easy task, I'd say arc-green is doing exceptionally well for what it has to work with.

I think it's doing rather bad actually, contrast issues all over the place and many small issues. I plan to eventually auto-generate arc green and a proper dark theme using https://github.com/silverwind/remap-css which is just a css color remapping but I still have a few TODOs on that module before I can start on it.

@silverwind
Copy link
Member

silverwind commented Jun 13, 2020

overflow:hidden on .segments could work to solve the border radius but it's kind of dangerous and can have side effects. Maybe add a collapsed class to it (probably in js) and then do .timeline-item .segments.collapsed {overflow: hidden}.

@CirnoT
Copy link
Contributor Author

CirnoT commented Jun 13, 2020

Will take second attempt at solving it later, but don't want to block this PR either.

@techknowlogick
Copy link
Member

ping LG-TM

@techknowlogick techknowlogick merged commit 492b7d6 into go-gitea:master Jun 15, 2020
@CirnoT CirnoT deleted the resolved-align branch June 15, 2020 19:59
ydelafollye pushed a commit to ydelafollye/gitea that referenced this pull request Jul 31, 2020
…o-gitea#11881)

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. topic/ui Change the appearance of the Gitea UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants