Skip to content

Fix arc theme label backgrounds #13267

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

Merged

Conversation

ivanvc
Copy link
Contributor

@ivanvc ivanvc commented Oct 22, 2020

I introduced this bug with #13181, and this was reported in #13263, sorry about that. I didn't realize that the style was shared with the user-defined labels and the yellow label was hard to read as the default background color is white.

  • Add specific style to yellow labels (background + border color)
  • Remove !important from the label's background rule to avoid breaking user-defined labels. Make the rule more specific to override Fomantic UI's default white background

Screenshots:

Yellow label style, added to match existent green, red and blue

Screenshot from 2020-10-22 08-55-32

Background for default basic labels

Screenshot from 2020-10-22 08-55-45

Outdated label

Screenshot from 2020-10-22 08-55-52

User-defined labels

Screenshot from 2020-10-22 08-59-10
Screenshot from 2020-10-22 08-59-30
Screenshot from 2020-10-22 08-59-35
Screenshot from 2020-10-22 08-56-02

Other places where the label class is used (adding to make sure this issue is not breaking them)

Screenshot from 2020-10-22 09-02-16
Screenshot from 2020-10-22 09-06-14

Adding even more screenshots

Screenshot from 2020-10-22 10-11-29
Screenshot from 2020-10-22 10-11-23
Screenshot from 2020-10-22 10-09-16
Screenshot from 2020-10-22 10-09-12
Screenshot from 2020-10-22 10-07-19
Screenshot from 2020-10-22 10-05-20
Screenshot from 2020-10-22 10-04-12
Screenshot from 2020-10-22 10-01-57
Screenshot from 2020-10-22 10-01-43
Screenshot from 2020-10-22 09-59-56
Screenshot from 2020-10-22 09-58-23
Screenshot from 2020-10-22 09-56-04

Fixes #13263

* Add specific style to yellow labels (background + border color)
* Remove !important from label's background rule to avoid breaking user
  defined labels. Make the rule more specific to override fomantic UI
  default white background
@6543 6543 added type/bug skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. labels Oct 22, 2020
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Oct 22, 2020
@6543
Copy link
Member

6543 commented Oct 22, 2020

@wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf ☝️

@6543 6543 added this to the 1.14.0 milestone Oct 22, 2020
@@ -614,10 +620,11 @@ footer {
}

.ui.label,
.ui.label.basic {
.ui.label.basic,
.theme-arc-green .ui.label.basic {
Copy link
Member

@silverwind silverwind Oct 22, 2020

Choose a reason for hiding this comment

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

I think this selector may be unnecessary. You generally always want to match the selector used in the light theme (so it overrules by CSS rule order) and this file is only included if theme is set to arc-green.

Copy link
Contributor Author

@ivanvc ivanvc Oct 22, 2020

Choose a reason for hiding this comment

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

You're right it's not necessary, I was trying to avoid the precending rule from Fomantic UI, but all of those .ui.ui.ui make it more specific and override even having the .theme-arc-green selector:

Screenshot from 2020-10-22 11-07-04

Result:
image

Which forces the white background, and it makes it hard to read bright colors.

Would a good be to specify each of the possible background colors for the Fomantic UI base colors?
Screenshot from 2020-10-22 11-11-45 (reference: https://fomantic-ui.com/elements/label.html, removing the inverted class from the labels)

Or would that be out of the scope of the theme, as seems like those colors are not being used at all?

Copy link
Member

@silverwind silverwind Oct 22, 2020

Choose a reason for hiding this comment

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

Those white backgrounds are bugs and should be overridden with the exact same selector fomantic uses, even if it has all those .ui. Feel free to do that in another PR.

@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 Oct 22, 2020
@codecov-io
Copy link

Codecov Report

Merging #13267 into master will increase coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #13267   +/-   ##
=======================================
  Coverage   42.16%   42.16%           
=======================================
  Files         684      684           
  Lines       75536    75536           
=======================================
+ Hits        31847    31849    +2     
+ Misses      38466    38463    -3     
- Partials     5223     5224    +1     
Impacted Files Coverage Δ
services/pull/pull.go 40.78% <0.00%> (-0.50%) ⬇️
modules/log/file.go 75.20% <0.00%> (+1.60%) ⬆️
models/unit.go 49.31% <0.00%> (+2.73%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1989fe2...081cde4. Read the comment docs.

@6543
Copy link
Member

6543 commented Oct 22, 2020

🚀

@techknowlogick techknowlogick merged commit 26d6c15 into go-gitea:master Oct 22, 2020
@ivanvc ivanvc deleted the fix-arc-theme-background-labels branch October 22, 2020 20:21
@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. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issue/PR labels arc-green contrast issue introduced by #13181
7 participants