-
-
Notifications
You must be signed in to change notification settings - Fork 945
Fix position of gem count in stats graph #5646
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
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5646 +/- ##
==========================================
- Coverage 97.12% 94.34% -2.78%
==========================================
Files 454 454
Lines 9459 9518 +59
==========================================
- Hits 9187 8980 -207
- Misses 272 538 +266 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@@ -188,7 +188,7 @@ | |||
|
|||
.stats__graph__gem__count { | |||
position: absolute; | |||
right: 12px; } | |||
left: 12px; } |
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.
Thanks for submitting a PR to fix this! Would you be able to set this rule to only be applied to mobile devices, or whatever screen width makes sense (see below)? we should leave the original behaviour for laptops/desktops.
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.
Certainly! I have reverted the previous changes and applied the modifications detailed below. With these adjustments, left: 12px
will be applied to devices with a screen width of 709px or less.
diff --git a/app/assets/stylesheets/modules/stats.css b/app/assets/stylesheets/modules/stats.css
index c9f416900..8f6e8a85a 100644
--- a/app/assets/stylesheets/modules/stats.css
+++ b/app/assets/stylesheets/modules/stats.css
@@ -197,7 +197,9 @@
font-size: 13px; } }
@media (max-width: 709px) {
.stats__graph__gem__count {
- top: 7px; } }
+ top: 7px;
+ right: auto;
+ left: 12px; } }
@media (min-width: 710px) {
.stats__graph__gem__count {
top: 5px;
However, I encountered an issue where an overlap occurs even on larger screens if the meter element (stats__graph__gem__meter
) is short. I've attached a video demonstrating this behavior.
Screen.Recording.2025-05-07.at.22.46.37.mov
Given this experience, I'd suggest applying left: 12px
for this element across all screen sizes, rather than limiting it to specific media queries. This might be a more robust solution to the overlap.
@yykamei what kind of screen that it? It seems bellow 300px width. 🤔 |
@simi Thank you for your reply. I'm experiencing this issue with my Google Pixel 7a. According to What is my screen size?, the width of my phone seems to be 411px. screen-20250506-160129.mp4 |
On smaller devices, the gem count value could overlap the gem name. This overlap prevented users from clicking the link associated with the gem name. Using the `left` property for positioning the count ensures that the gem name remains clickable, resolving the usability issue on small screens.
On smaller devices, the gem count value could overlap the gem name. This overlap prevented users from clicking the link associated with the gem name.
Using the
left
property for positioning the count ensures that the gem name remains clickable, resolving the usability issue on small screens.