Opened 5 months ago
Last modified 5 months ago
#18913 new enhancement
[AboutSystem] Labels should be just labels
Reported by: | matyalatte | Owned by: | nobody |
---|---|---|---|
Priority: | low | Milestone: | Unscheduled |
Component: | Applications/AboutSystem | Version: | |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
Hi. Recently, I tried to add a command-line utility to the AboutSystem app.
https://discuss.haiku-os.org/t/official-command-to-get-the-version-of-haiku/15100/5
Then, I noticed that the labels were inconsistent in its GUI. (I mean, "labels" are the bold strings in the left part of the window.)
---
Version: hrev57755
Walter (x86_64)
2 Processors:
Intel Core i7-7700 @ 3.60 GHz
2048 Mib Memory:
321 MiB used (16%)
Kernel:
June 10, 2024 at 6:14:45 AM
Time running:
3 minutes, 24 seconds
---
Personally, I don't think they should contain the actual information. Especially, the label "2 Processors" is unnatural for me. They should be like this.
---
Version:
Walter hrev57755 (x86_64)
Processor:
Intel Core i7-7700 @ 3.60 GHz x 2
Memory:
2048 Mib total, 321 Mib used (16%)
Kernel:
June 10, 2024 at 6:14:45 AM
Time running:
3 minute, 24 seconds
---
Change History (9)
follow-up: 2 comment:1 by , 5 months ago
comment:2 by , 5 months ago
Replying to waddlesplash:
Thank you for the fast reply.
What exactly is "inconsistent" about this?
The first label is of the form Version: xxx
. It contains another string after a colon.
The second one is x Processor(s):
. The label name contains the actual information (about the number of processors.)
Only Kernel:
and Time running:
are the true labels. I mean, they are constants (for each language.)
I prefer to use constants for all labels.
Also, if you add command-line utilities to the app in the future, these changes will be more desirable.
When accessing specific information via the terminal (e.g. AboutSystem --memory
), it needs to output a little bit different string than the one in the GUI, because labeling with a colon is unnecessary when you specify a label.
Of course, you can make other functions to generate strings for CLI. But if the labels and the actual information are completely separated, you can use the same functions for both GUI and CLI.
follow-up: 4 comment:3 by , 5 months ago
Well, there isn't anything saying that labels always have to be constants, so far as I know. Thought it does look like BeOS actually did have them be constant, interestingly enough.
comment:4 by , 5 months ago
Replying to waddlesplash:
Well, there isn't anything saying that labels always have to be constants, so far as I know. Thought it does look like BeOS actually did have them be constant, interestingly enough.
True. It's just a matter of preference. and it's just a suggestion.
I know you guys are busy with other issues, so it's ok if you are fine with the current implementation. If you don't mind making changes, I can make a commit for it.
comment:5 by , 5 months ago
I'm just a simple user (and occasional small time contributor), but...
I like matyalatte suggestion here. I think you should submit a patch to gerrit.
Maybe using "Processor(s):", and placing the number of CPUs as a prefix, e.g.: "2x - Intel Core i7-7700 @ 3.60 GHz"?
follow-up: 7 comment:6 by , 5 months ago
For memory, it is a recent change in hrev57426. Before that it was indeed just "Memory:" in the header.
For processors, it was this way for a long time.
I think we should revert the memory to how it was before, it makes more sense that the label is just a label.
For processors, I'm not sure, the current way to display it seems more readable to me than what's suggested here?
Also, if you add command-line utilities to the app in the future, these changes will be more desirable.
Let's not make up reasons for this. There are already command line tools to get this information, and there is no reason to add that into AboutSystem.
comment:7 by , 5 months ago
Replying to pulkomandy:
For processors, I'm not sure, the current way to display it seems more readable to me than what's suggested here?
If you want the word "processor", you can just append it at the end. (That's what Windows does.)
Processor(s): Intel Core i7-7700 @ 3.60 GHz 2 processors
If you don't want to display "processor" multiple times, you can use another word for the label like "Chip" or "CPU." (macOS uses "Chip" for it.)
CPU: Intel Core i7-7700 @ 3.60 GHz 2 processors
Let's not make up reasons for this. There are already command line tools to get this information, and there is no reason to add that into AboutSystem.
You can see here for the reason.
https://discuss.haiku-os.org/t/official-command-to-get-the-version-of-haiku/15100
The main purpose of the command-line utilities is to provide an easier way to get the ABI version.
Also, commands such as AboutSystem --all
and AboutSystem --credit
are worth implementing, I think. Because not all users use GUI.
(At least, I use Haiku in the headless mode via ssh to test my C library.)
follow-up: 9 comment:8 by , 5 months ago
The main purpose of the command-line utilities is to provide an easier way to get the ABI version.
This would not be accomplished here. The abi version is Haiku R1. We don‘t change the ABI between beta releases, or nightlies. Atleast we try very hard not to.
Normally we don‘t implement any commandline options to GUI applications since there is not a 1:1 mapping between them. For the commandline the normal tool is uname, but there is no gui-uname. Other unices have also implemented more flags to posix there if anything is missing.
Other than that, I still think sysctl would be a better interface if we want to querry severall different things about the installation.
comment:9 by , 5 months ago
Replying to nephele:
This would not be accomplished here. The abi version is Haiku R1. We don‘t change the ABI between beta releases, or nightlies. Atleast we try very hard not to.
Strictly speaking, what I want is a version string in the official form like "R1/beta4."
I just said "ABI version" just because AboutSystem.cpp
calls it "ABI version."
Normally we don‘t implement any commandline options to GUI applications since there is not a 1:1 mapping between them. For the commandline the normal tool is uname, but there is no gui-uname. Other unices have also implemented more flags to posix there if anything is missing.
Fair point. Surely, you can consider adding a new flag to a command-line tool.
But AboutSystem is essentially an application for displaying strings. I mean, its functionality is not much different from command-line tools like uname.
And functions to retrieve the strings are already implemented.
I don't think it is abnormal to add command-line utilities to it.
Other than that, I still think sysctl would be a better interface if we want to querry severall different things about the installation.
I don't see why you are arguing "which is better."
If you want sysctl, you can implement it later.
There are already several ways to get the system information. Duplication of functionality is not a problem.
However, since my original goal is to get a command to get "R1/beta4", it is not really that important whether I should add the command to AboutSystem or not.
If you don't want me to do, I'm not going to do.
What exactly is "inconsistent" about this? Sure, other OSes don't do it this way, but it's perfectly understandable.