Skip to content

Show network bandwidth in bits not bytes per second - #541

Merged
stsdc merged 14 commits into
mainfrom
vishal/network-use-bits-option
Sep 15, 2026
Merged

stsdc merged 14 commits into
mainfrom
vishal/network-use-bits-option

Conversation

@vjr

@vjr vjr commented Aug 25, 2026

Copy link
Copy Markdown
Member

Display network speeds in bits-per-second instead of bytes.

Option to display network speeds in bits-per-second instead of bytes.
@vjr vjr self-assigned this Aug 25, 2026
@vjr
vjr requested review from a team and stsdc August 25, 2026 03:35
@vjr vjr mentioned this pull request Aug 25, 2026
@vjr
vjr requested a review from danirabbit August 25, 2026 03:49

@danirabbit danirabbit left a comment

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.

Format size takes flags so you don't need to create a new util for this https://valadoc.org/glib-2.0/GLib.FormatSizeFlags.html

Does this also really need to be an option? Is this a case where this would just be the better way to format it?

@vjr

vjr commented Aug 25, 2026

Copy link
Copy Markdown
Member Author

Format size takes flags so you don't need to create a new util for this https://valadoc.org/glib-2.0/GLib.FormatSizeFlags.html

Does this also really need to be an option? Is this a case where this would just be the better way to format it?

I added the util because glib only returns the size without the "per second" (actually abbreviated to just "ps") portion, eg. "123 bytes" or "123 MB" while this util shows "123 bps" or "123 MBps". It's intended mainly for file sizes I guess? Can we keep this new util?

I see your localization comment in the other PR - can we leave this for another PR?

I'm in favour of just defaulting to "bits per second" and remove the option/checkbox because network bandwidth is usually seen this way, advertised by ISPs this way etc. but I remember when I sent a PR to KDE there was some user contention from those who prefer bytes, maybe it's a local/regional thing?

CC @stsdc looking forward to your feedback too.

@vjr
vjr requested a review from danirabbit August 25, 2026 05:02
@danirabbit

Copy link
Copy Markdown
Member

I think maybe we should just switch it to bits and see if anyone complains before adding a setting

But I think we need to do proper localization here and not regress on that

@vjr

vjr commented Sep 14, 2026

Copy link
Copy Markdown
Member Author

Format size takes flags so you don't need to create a new util for this https://valadoc.org/glib-2.0/GLib.FormatSizeFlags.html

Does this also really need to be an option? Is this a case where this would just be the better way to format it?

@danirabbit @stsdc I've switch back to use the glib format function and attempted to handle RTL/LTR in cb5438f can revert this commit if it's not good but it's not regressing any current localisation - there is the existing /s non localised string segment in the "%s/s" format string. Asking @ryonakano too if this looks ok?

@vjr
vjr requested review from a team and ryonakano September 14, 2026 04:28
@vjr vjr changed the title Add use-bits option for network bandwidth Show network bandwidth in bits not bytes per second Sep 14, 2026
@vjr
vjr dismissed danirabbit’s stale review September 14, 2026 05:23

Addressed in latest commits/comments.

Comment thread src/Utils.vala Outdated
Comment thread src/Utils.vala Outdated
@vjr
vjr requested a review from ryonakano September 15, 2026 12:51
@stsdc

stsdc commented Sep 15, 2026

Copy link
Copy Markdown
Member

I don't have any objections and Ryo has approved.
Good job and thank you!

@stsdc
stsdc merged commit 75b472a into main Sep 15, 2026
3 of 7 checks passed
@stsdc
stsdc deleted the vishal/network-use-bits-option branch September 15, 2026 13:38
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.

4 participants