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

Replace unstyled meter with progress #19968

Merged
merged 2 commits into from
Jun 15, 2022
Merged

Conversation

silverwind
Copy link
Member

Replace the only <meter> element in use with a <progress> which is styled properly. Also slightly adjust colors on it for better contrast.

Before:

Screen Shot 2022-06-14 at 22 34 59

After:

Screen Shot 2022-06-14 at 22 38 14

Screen Shot 2022-06-14 at 22 38 25

Replace the only `<meter>` element in use with a `<progress>` which is
styled properly. Also slightly adjust colors on it for better contrast.
@silverwind silverwind added the topic/ui Change the appearance of the Gitea UI label Jun 14, 2022
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Jun 15, 2022
@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 15, 2022
@wxiaoguang wxiaoguang merged commit b4d420d into go-gitea:main Jun 15, 2022
@silverwind silverwind deleted the meter branch June 15, 2022 06:01
@delvh
Copy link
Member

delvh commented Jun 15, 2022

Interesting. I originally used the meter because according to the docs, it seemed to be the modern alternative for displaying interval progress.
What exactly is the benefit of this PR except for the additional styling?

@wxiaoguang
Copy link
Contributor

According to this one: https://stackoverflow.com/questions/6552100/a-good-usage-of-html5s-progress-or-meter

the progress tag is best used to display the progress of a specific task at hand. meter is best used for task-unrelated guages, such as disk space or memory usage.

And Gitea already has CSS styles for progress.

@silverwind
Copy link
Member Author

<meter> only makes sense if you need a min value other than 0 which was not the case here. And yes, the second reason for the change is that we already have <progress> styles.

zjjhot added a commit to zjjhot/gitea that referenced this pull request Jun 16, 2022
* giteaofficial/main:
  Allow render HTML with css/js external links (go-gitea#19017)
  Use correct count for `NumOpenIssues` (go-gitea#19980)
  In code search, get code unit accessible repos in one (main) query (go-gitea#19764)
  [skip ci] Updated translations via Crowdin
  Always try to fetch repo for mirrors (go-gitea#19975)
  Remove tab/TabName usage where it's not needed (go-gitea#19973)
  Fix cli command restore-repo: "units" should be parsed as StringSlice (go-gitea#19953)
  Uppercase first languages letters (go-gitea#19965)
  Move tests as seperate sub packages to reduce duplicated file names (go-gitea#19951)
  Replace unstyled meter with progress (go-gitea#19968)
  [skip ci] Updated translations via Crowdin
  [skip ci] Updated translations via Crowdin
  Remove singuliere from MAINTAINERS (go-gitea#19883)
  Fix aria for logo (go-gitea#19955)
  Fix mirror template bug (go-gitea#19959)
AbdulrhmnGhanem pushed a commit to kitspace/gitea that referenced this pull request Aug 24, 2022
Replace the only `<meter>` element in use with a `<progress>` which is
styled properly. Also slightly adjust colors on it for better contrast.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
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.

5 participants