-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
stream_settings: Restructure stream creation panel. #29433
base: main
Are you sure you want to change the base?
Conversation
93995bd
to
0df3503
Compare
Is this ready for review? |
@timabbott as i have mentioned above last part that is Change how adding users works this is part is still remaining for that part i still not don't know how to implement this |
Let's just move the "Change how adding users work" part to a separate issue; this already has enough going on as it is. @sujalshah-bit can you do a careful pass to make sure you've got the right strings? "Advance configuration" in your screenshot looks like a typo, "Advanced" is the word you want. |
I will make the update soon. |
0df3503
to
efe56e1
Compare
@sahil839 can you review this one? |
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.
Posted a comment.
A note on commit message, the first commit should have "Fixes part of .." to make sure we do not close the issue if we merge a part of this PR initially. The commit should have "Fixes .." only in the commit which completes the said issue.
Also, the current changes also results in the "Advanced configuration" expandable view in the stream edit form as same template is used for both the places. The issue does not mention anything about changing it. @alya do we want that change in stream edit UI as well? |
The section label should be "Advanced configurations", as noted in the issue. |
Currently, I can click "Continue to add subscribers" without filling out required info on the first page (channel name). We should make sure to catch that before the user gets to the next page. Similarly, it shouldn't be possible to continue to the next page if you use a channel name that's already taken, or there's some other error. |
Good idea! We might want to make it more clear that this is a "back" button, but the current state on this PR is probably OK for now. |
Good question! I wasn't thinking about that, but it feels reasonable to me. |
Clicking anywhere on the "Advanced configuration" section name should expand/collapse it, with an appropriate pointer cursor. |
That's all I've got for now. I didn't read @sahil839 's feedback carefully, so there may be some duplication. |
e1b0c48
to
77a974d
Compare
bandicam.2024-05-17.08-59-18-129.mp4
Other than that I think I have covers all feedbacks kindly review @sahil839 @alya. |
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.
Posted few comments.
I can reproduce this. I just opened the stream creation form, did nothing and simply clicked on "Continue to add subscribers" button.
This is because there are two elements with same ID "toggle-advanced-configurations-icon" once the user clicks on a stream - one for stream creation form and one for the stream settings edit form. The correct solution here would be to use a class for that element and then update the JS code to make sure the class is changed for the correct element. |
14b8108
to
1f1cd4a
Compare
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.
Posted some comments.
web/src/stream_create.js
Outdated
e.stopPropagation(); | ||
|
||
const stream_name = $("#create_stream_name").val().trim(); | ||
const name_ok = stream_name_error.validate_for_submit(stream_name); |
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.
A better variable name could be is_stream_name_valid
.
web/src/stream_create.js
Outdated
if (name_ok) { | ||
stream_settings_components.show_subs_pane.create_stream("subscribers_container"); | ||
} else { | ||
stream_settings_components.show_subs_pane.create_stream("configure_channel_settings"); |
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.
Can we just do nothing in case the name is not valid?
}, | ||
}; | ||
|
||
export function update_footer_buttons(container_name = "configure_channel_settings") { |
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 there is no need for a default value as the caller will pass container name always.
web/src/user_group_components.ts
Outdated
}, | ||
}; | ||
|
||
export function update_footer_buttons(container_name = "configure_user_group_settings"): void { |
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.
Here also, we can remove the default value.
web/src/user_group_create.js
Outdated
e.stopPropagation(); | ||
|
||
const group_name = $("#create_user_group_name").val().trim(); | ||
const name_ok = user_group_name_error.validate_for_submit(group_name); |
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.
This variable can be named similar to how we would have it for streams.
Since we now collapse settings like "Who can post to stream", "Message retention", etc. in the stream edit view as well, do we want to show the "Save changes" button on "Advanced configurations" heading? @alya FYI. |
Removed the "Stream permissions" heading to simplify the panel. Moved the "Announce new stream in {stream}" option just above "Default stream for new users". Implement a collapsible "Advanced configurations" section, collapsed by default, to accommodate less commonly changed settings. This allows for future expansion of stream permission configurations. Fixes part of zulip#29403.
Update the descriptions of Web-public, Public, Private, shared history and Private, protected history.
Changed the title of the first panel to "Create channel: configure settings" and title of second panel to "Create channel: add subscribers". Implement logic in stream_create.js to show and hide both the panels. Add two buttons to facilitate switching between the tabs or panels. Added new descriptions to 'stream type descriptions'.
Extract `show_user_group_settings_pane` with related functions and variable.
Break the current user group creation panel into two panel "Create user group: configure settings" and "Create user group: add subscribers".
1f1cd4a
to
cf29396
Compare
User group section
Channel creation section
Advance configuration:
Notes
The issue description doesn't include a mention of a "Configure Settings" button. While implementing these changes, I realized that users might need to revisit the configuration settings to modify certain details, such as the stream name. Therefore, I added a button for navigating back to the configuration settings when needed.
Also the color of the button should be different I guess please provide feedback on both of this.
Fixes part of #29403.
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: