Skip to content

Change dashboard to short number notation#11847

Merged
Gargron merged 6 commits intomastodon:masterfrom
fedibird:feature-dashboard-short-number
Sep 16, 2019
Merged

Change dashboard to short number notation#11847
Gargron merged 6 commits intomastodon:masterfrom
fedibird:feature-dashboard-short-number

Conversation

@noellabo
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Comment thread app/helpers/admin/dashboard_helper.rb Outdated
end

def short_number_format(number)
number_to_human number, units: { unit: '', thousand: 'K', million: 'M', billion: 'B' }
Copy link
Copy Markdown
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
Copy Markdown
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