-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Rework and fix stopwatch #30732
Rework and fix stopwatch #30732
Conversation
Doing some more tweaks... |
Yeah I guess chinese might work in the limited space available with disabled wrapping but we are probably better off not translating in this case because some languages might get too long. |
Could we simply fix the bug and backport, instead of introducing too many unrelated changes? Or use a separate (simple, pure-css) fix for backporting? |
I see this as a low-risk backport still. I did test all the other tippy instances. |
But I can still see bugs |
I still do not think it is safe to backport. |
Even if there are issues, they would not world-breaking and I'm sure we can fix them quickly. |
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.
Still I believe it should avoid unnecessary changes.
Fixes go-gitea#30721 and overhauls the stopwatch. Time is now shown inside the "dot" icon and on both mobile and desktop. All rendering is now done by `<relative-time>`, the `pretty-ms` dependency is dropped. Desktop: <img width="557" alt="Screenshot 2024-04-29 at 22 33 27" src="https://github.com/go-gitea/gitea/assets/115237/3a46cdbf-6af2-4bf9-b07f-021348badaac"> Mobile: <img width="640" alt="Screenshot 2024-04-29 at 22 34 19" src="https://github.com/go-gitea/gitea/assets/115237/8a2beea7-bd5d-473f-8fff-66f63fd50877"> Note for tippy: Previously, tippy instances defaulted to "menu" theme, but that theme is really only meant for `.ui.menu`, so it was not optimal for the stopwatch popover. This introduces a unopinionated `default` theme that has no padding and should be suitable for all content. I reviewed all existing uses and explicitely set the desired `theme` on all of them.
Backport #30732 by @silverwind Fixes #30721 and overhauls the stopwatch. Time is now shown inside the "dot" icon and on both mobile and desktop. All rendering is now done by `<relative-time>`, the `pretty-ms` dependency is dropped. Desktop: <img width="557" alt="Screenshot 2024-04-29 at 22 33 27" src="https://github.com/go-gitea/gitea/assets/115237/3a46cdbf-6af2-4bf9-b07f-021348badaac"> Mobile: <img width="640" alt="Screenshot 2024-04-29 at 22 34 19" src="https://github.com/go-gitea/gitea/assets/115237/8a2beea7-bd5d-473f-8fff-66f63fd50877"> Note for tippy: Previously, tippy instances defaulted to "menu" theme, but that theme is really only meant for `.ui.menu`, so it was not optimal for the stopwatch popover. This introduces a unopinionated `default` theme that has no padding and should be suitable for all content. I reviewed all existing uses and explicitely set the desired `theme` on all of them. Co-authored-by: silverwind <[email protected]>
Fixes #30721 and overhauls the stopwatch. Time is now shown inside the "dot" icon and on both mobile and desktop. All rendering is now done by
<relative-time>
, thepretty-ms
dependency is dropped.Desktop:
![Screenshot 2024-04-29 at 22 33 27](https://private-user-images.githubusercontent.com/115237/326579320-3a46cdbf-6af2-4bf9-b07f-021348badaac.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg4NTY3NTksIm5iZiI6MTczODg1NjQ1OSwicGF0aCI6Ii8xMTUyMzcvMzI2NTc5MzIwLTNhNDZjZGJmLTZhZjItNGJmOS1iMDdmLTAyMTM0OGJhZGFhYy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjA2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIwNlQxNTQwNTlaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0xNDQ0ZTljNWIwMzcyMjZhMjJlMTlkMDc2OGIxY2JiYzY0NDUzMzJjNjdmYjcxODlmOTJlMjZiYjZiNmNjMzgwJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.uf-nyNIM1sCAC5CqtjUGk0EZVy91ldDC19fb4BnEQZ0)
Mobile:
![Screenshot 2024-04-29 at 22 34 19](https://private-user-images.githubusercontent.com/115237/326579413-8a2beea7-bd5d-473f-8fff-66f63fd50877.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg4NTY3NTksIm5iZiI6MTczODg1NjQ1OSwicGF0aCI6Ii8xMTUyMzcvMzI2NTc5NDEzLThhMmJlZWE3LWJkNWQtNDczZi04ZmZmLTY2ZjYzZmQ1MDg3Ny5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjA2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIwNlQxNTQwNTlaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0xNzEzMjFlODE4YTE3M2E5NDdjNmIyY2NiOTY1MjNmZmQ4MmE4YTQxMmJlYTZkMzRmOWE1ZDRiYjcyMDU2NjkyJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.xHS01bFsgvpbvfSq9DhS3PkAg5RJtfZEHu0AIUeRCjo)
Note for tippy:
Previously, tippy instances defaulted to "menu" theme, but that theme is really only meant for
.ui.menu
, so it was not optimal for the stopwatch popover.This introduces a unopinionated
default
theme that has no padding and should be suitable for all content. I reviewed all existing uses and explicitely set the desiredtheme
on all of them.