zulip/static
YashRE42 ca57400771 stream_create: Always insert change-stream-privacy button.
Previously, if an admin created a private stream with shared history
or a private stream with protected history, they would see the general
tab for that stream in the right side of the subscriptions_overlay as
expected, but, they would not see the pencil button to change stream
privacy unless they clicked a different stream and came back.

The reason for this has to do with how we receive events when we
create a sub. We first get an event with type "stream" and op
"create", we then get an event with type "subscription" and op "add"
ie we create the stream and then sub ourselves to it. Now, we render
`stream_settings.hbs` while handling the "stream create" event, at
this time we pass `can_change_stream_permissions` as false since
`(!sub.invite_only || sub.subscribed)` is false because we're not
subscribed yet. This causes us to skip the insertion of the
"change-stream-privacy" block which is a problem because when we're
handling the "subscription add" event, we run
`stream_ui_updates.update_change_stream_privacy_settings(sub)` which
tries to show the element via `.show()` but can't since the element
does not exist and as a result the admin user does not see the pencil
edit button.

This commit fixes the above bug by changing the template such that we
always insert the button, but conditionally apply
`style="display:none"`.

Fixes: #20345.
2021-11-24 10:49:29 -08:00
..
assets icons: Set font-display: block for icon font. 2021-08-23 15:59:54 -07:00
audio notificaiton_sounds: Add some atonal sounds created by @stwime. 2021-02-05 12:28:20 -08:00
generated
html templates: Mark all void tags as self-closing. 2021-04-21 09:49:34 -07:00
images docs: Update the /help/ instructions for setting up OneLogin SAML. 2021-11-16 14:58:17 -08:00
js settings_data: Remove redundant check from user_can_edit_topic_of_any_message. 2021-11-24 10:37:51 -08:00
shared user_status: Fix status emoji handling of deactivated custom emoji. 2021-11-20 20:57:54 -08:00
styles stream_privacy_modal: Fix vertical alignment of radio inputs. 2021-11-24 10:39:23 -08:00
templates stream_create: Always insert change-stream-privacy button. 2021-11-24 10:49:29 -08:00
third lint: Fix typos found by codespell. 2021-10-19 16:51:13 -07:00
.gitignore dependencies: Replace moment.js with date-fns. 2021-02-05 11:04:32 -08:00