-
-
Notifications
You must be signed in to change notification settings - Fork 441
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
RowField class / module improvements #1295
Conversation
Both types are integer identifiers for fields. As the dynamic columns and process fields share the same identifier space, it makes no sense to split the types to two. This commit also frees up the 'Field' name so it can refer to an object or class rather than an ID in the future. Signed-off-by: Kang-Che Sung <[email protected]>
@@ -51,6 +51,6 @@ typedef enum ReservedFields_ { | |||
|
|||
/* Follow ReservedField entries with dynamic fields defined at runtime */ | |||
#define ROW_DYNAMIC_FIELDS LAST_RESERVED_FIELD | |||
typedef int32_t RowField; | |||
typedef int32_t FieldID; | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we were going to do this, the filename here would have to change.
But (as I said before you wrote this patch) - IMO "Field" is too generic a term. Conceptually, there are individual 'fields' within Meters for example.
So I don't think we should go this route.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. And I plan the next commit would be to rename RowField
to Field
for the entire module.
Speaking of meters, the current code base refer to what you called 'fields' as 'items', so there is no confusion.
If you would complain that name being too generic, I would argue the same for the Table
and Row
class names.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is confusion here, for the reasons I've pointed out.
If we ask anyone what part of the htop UI relates to 'tables' and 'rows', they'll point out the exact right thing every time - trying to compare that to 'Fields' just doesn't work, sorry.
Its a NAK from me on this proposed naming change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@natoscott I think the 'Field' would refer to the table cell. And it's not weird to call it a 'Field' anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I understand where you're coming from - but it is quite ambiguous even within htop. Definitely not "wierd" though - 'too generic' was the phrase used.
|
My current plan:
|
Will likely get the PR rejected instantly. Both @natoscott and I object to this change.
Make that both |
@BenBE How about the name |
Closing this one temporarily as I don't know how to improve the naming with the current state of |
No description provided.