Skip to content
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

Added Enabled Column in the UserTable #28014

Closed
wants to merge 3 commits into from

Conversation

kaustubh-rh
Copy link
Contributor

This PR is continuation of the discussion PR 24569

As suggested by @xianli123 , added the enabled user column. CC : @stianst @ssilvert

Temporary Locked User

Disabled User

Signed-off-by: Kaustubh B <kbawanka@redhat.com>
Signed-off-by: Kaustubh B <kbawanka@redhat.com>
id={user.id}
aria-label="User when enabled"
isChecked={user.enabled}
hasCheckIcon
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We haven't been using the hasCheckIcon option. Please remove this to keep consistent with the rest of the app.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ssilvert ack , I've pushed the changes.

Signed-off-by: Kaustubh B <kbawanka@redhat.com>
Copy link
Contributor

@jonkoops jonkoops left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I though it was decided that we were not going to add a switch here, but rather go with @xianli123's design from the previous PR.

}
};

// eslint-disable-next-line react/no-unstable-nested-components
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This rule should not be violated, as it can create performance problems and bugs.

}),
);
refresh();
} catch (error) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Errors should be presented to the user, why are they being swallowed here?

@@ -391,6 +424,11 @@ export function UserDataTable() {
displayKey: "firstName",
cellFormatters: [emptyFormatter()],
},
{
name: "Enable",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name here should use the same casing as other entries.

Suggested change
name: "Enable",
name: "enable",

@@ -391,6 +424,11 @@ export function UserDataTable() {
displayKey: "firstName",
cellFormatters: [emptyFormatter()],
},
{
name: "Enable",
displayKey: "Enable",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to refer to a label's key, not a verbatim of what the displayed value should be. Make sure to add a label as well.

return (
<Switch
id={user.id}
aria-label="User when enabled"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be localized like other labels. I think we should actually wrap this in a tooltip.

@ssilvert
Copy link
Contributor

ssilvert commented Mar 20, 2024

I though it was decided that we were not going to add a switch here, but rather go with @xianli123's design from the previous PR.

You are right. We decided to remove the Enabled column and just use a label to indicate Disabled or Temporarily Locked.

@kaustubh-rh Can you make that change?

@kaustubh-rh
Copy link
Contributor Author

Hi @ssilvert @jonkoops thanks for the update. If the enabled column is not required, then i believe this PR need not be merged as label to indicate Disabled or Temporarily Locked has already been implemented. (See the above-attached screenshots)

@ssilvert
Copy link
Contributor

Hi @ssilvert @jonkoops thanks for the update. If the enabled column is not required, then i believe this PR need not be merged as label to indicate Disabled or Temporarily Locked has already been implemented. (See the above-attached screenshots)

@kaustubh-rh We still need to remove the enabled column. If I recall, the original complaint was that the dash in that column was ugly and kind of meaningless.

You can modify this PR to do that or we can just close for now. Which do you prefer?

@kaustubh-rh kaustubh-rh closed this by deleting the head repository Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants