Show extension download counts with thousands separators (#12857)

This PR adjusts the extension download counts to be displayed using
thousands separators.

Release Notes:

- Adjusted extension download counts to display with thousands
separators (e.g., `1,000,000`).
This commit is contained in:
Marshall Bowers 2024-06-10 14:19:17 -04:00 committed by GitHub
parent 0d5485bd6c
commit 57c40299a5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 19 additions and 2 deletions

View file

@ -24,6 +24,7 @@ fs.workspace = true
fuzzy.workspace = true
gpui.workspace = true
language.workspace = true
num-format.workspace = true
picker.workspace = true
project.workspace = true
release_channel.workspace = true

View file

@ -16,6 +16,7 @@ use gpui::{
InteractiveElement, KeyContext, ParentElement, Render, Styled, Task, TextStyle,
UniformListScrollHandle, View, ViewContext, VisualContext, WeakView, WhiteSpace, WindowContext,
};
use num_format::{Locale, ToFormattedString};
use release_channel::ReleaseChannel;
use settings::Settings;
use std::ops::DerefMut;
@ -487,8 +488,11 @@ impl ExtensionsPage {
.size(LabelSize::Small),
)
.child(
Label::new(format!("Downloads: {}", extension.download_count))
.size(LabelSize::Small),
Label::new(format!(
"Downloads: {}",
extension.download_count.to_formatted_string(&Locale::en)
))
.size(LabelSize::Small),
),
)
.child(