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

Changed achievements cell UI #231

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

Jcheng777
Copy link

@Jcheng777 Jcheng777 commented Nov 6, 2024

…e numbers

  • Adjusted progress bar width to dynamically scale based on the number of digits in total points, achievements, etc., providing better visual alignment.
  • Implemented formatting to shorten large numbers (e.g., 1500 becomes 1.5K) for improved readability.

Summary

This pull request is the first step towards implementing achievement cell UI

  • changed progress bar width
  • created function to shorten digits >1000

Test Plan

  • Test on different simulators
  • Test different point values

…e numbers

- Adjusted progress bar width to dynamically scale based on the number of digits in total points, achievements, etc., providing better visual alignment.
- Implemented formatting to shorten large numbers (e.g., 1500 becomes 1.5K) for improved readability.
@CLAassistant
Copy link

CLAassistant commented Nov 6, 2024

CLA assistant check
All committers have signed the CLA.

@dti-github-bot
Copy link
Member

dti-github-bot commented Nov 6, 2024

[diff-counting] Significant lines: 114.

Copy link
Collaborator

@Shengle-Dai Shengle-Dai left a comment

Choose a reason for hiding this comment

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

Nice try to shorten the number if it is greater than 1000 and make the width to have dynamic width!

However, I think it'll be better to make the progress bar length consistent for all achievements (maybe keep the 0.43 as the multiplier). Also, remember to follow the PR template and remove the unused PR template sections!

@Jcheng777 Jcheng777 changed the title Make progress bar width dynamic based on digit count and shorten larg… Changed achievements cell UI Nov 17, 2024
Copy link
Contributor

@BrianLa0616 BrianLa0616 left a comment

Choose a reason for hiding this comment

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

When I have achievements as 100,000 points, there's a number format exception that occurs.

image

I also think that the points are center here. It should be closer to the right.
Screenshot 2024-11-18 at 3 02 29 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants