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
settings_org: Use settings_checkbox in Authentication Methods UI. #22369
base: main
Are you sure you want to change the base?
settings_org: Use settings_checkbox in Authentication Methods UI. #22369
Conversation
Per review feedback in zulip#21002, replace HTML table with a series of settings_checkbox components for Authentication Methods UI. Also adjust relevant JS function naming accordingly, to avoid confusion. Fixes zulip#21001.
|
Hello @zulip/server-settings members, this pull request was labeled with the "area: settings (admin/org)" label, so you may want to check it out! |
|
It works as it was claimed. I have tested this on current Firefox, Firefox Dev and Chrome. |
|
Thanks @sov-j! Just to make it clear for folks looking at it - this PR is ready for review. |
Thanks for working on this @alex-ter. Posted one inline comment.
We should keep ids unique. We can add method name to the id I think.
And also I think currently the vertical space between two options is too much especially when the label is not too long. But I am not sure. Will wait for feedback from others on this.
| @@ -418,7 +418,7 @@ export function populate_auth_methods(auth_methods) { | |||
| if (!meta.loaded) { | |||
| return; | |||
| } | |||
| const $auth_methods_table = $("#id_realm_authentication_methods").expectOne(); | |||
| const $auth_methods_list = $("#id_realm_authentication_methods").expectOne(); | |||
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.
I think it would be better if these variable name changes are done in a separate commit.
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.
My underlying idea here was that those variable/function name changes are directly related to that component change, therefore making a logically whole one. Don't you think they would be more confusing when standing alone? I can change that no problem, just to make sure :)
|
Yeah, I think I agree we probably want some special CSS for this page to reduce the spacing between options to make the visuals look a bit nicer. (It's possible a better solution would be extending the option labels to have a bit more detail about what these authentication methods are). So put that CSS in its own commit, so it's easy to drop/revert if we change our minds. |
|
Thanks Sahil, Tim - appreciate your feedback!
Yeah, I've considered a couple of approaches, and in the simplest case of minimum changes, we'd need to use the As for the CSS - ack, will add one in a separate commit. |
Per review feedback in #21002 (direct link to the comment), replace HTML table with a series of
settings_checkboxcomponents for Authentication Methods UI.Fixes #21001.
Notable points:
settings_checkboxis currently implemented, its instances for respective Auth Methods all get the sameid,nameandclass. That doesn't seem to break anything (both automated and my manual testing), as those aren't used anywhere, but I'm open to suggestions if that's a problem.<div>I've introduced instead, as it doesn't seem to be necessary - but I'm open to other ideas, too.Screenshots and screen captures:

Before (logged in as Owner)
After (logged in as owner)

Self-review checklist
(variable names, code reuse, readability, etc.).
Communicate decisions, questions, and potential concerns.
Individual commits are ready for review (see commit discipline).
Completed manual review and testing of the following: