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

Change dashboard to short number notation #11847

Merged
merged 6 commits into from
Sep 16, 2019

Conversation

noellabo
Copy link
Contributor

The number on the dashboard overflows on the smartphone.

It is especially useful if the number of digits in interactions this week is large and you can switch to a short notation.

@Gargron
Copy link
Member

Gargron commented Sep 15, 2019

I think you can skip the setting part. Make it always use short notation with full notation in title.

@noellabo
Copy link
Contributor Author

I agree. Let's make a simple change.

@noellabo noellabo changed the title Add short numeric notation to the dashboard Change dashboard to short number notation Sep 15, 2019
@@ -7,4 +7,8 @@ def feature_hint(feature, enabled)

safe_join([feature, content_tag(:span, indicator, class: class_names)])
end

def short_number_format(number)
number_to_human number, units: { unit: '', thousand: 'K', million: 'M', billion: 'B' }
Copy link
Member

Choose a reason for hiding this comment

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

Why is this necessary? Followers count on profile pages already uses short number format

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It existed for switching between short and full notation. Match the way you write your profile page.

@Gargron Gargron merged commit b7420b8 into mastodon:master Sep 16, 2019
hiyuki2578 pushed a commit to ProjectMyosotis/mastodon that referenced this pull request Oct 2, 2019
* Add short numeric notation to the dashboard

* Fix i18n

* Fix to embed units in code

* Remove settings and always use short notation

* Remove misplaced test lines

* Fit to other pages
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.

2 participants