"stream-advanced-configurations" was being used as ID for
advanced configurations section in both stream edit and
creation UI, which is not correct as ID should be unique.
This commit fixes it by removing the ID and instead using
class in selectors. Also, there was some unused CSS, as
we do not have dropdown widget buttons in advanced
configurations section, written using the duplicate ID so
removed that as well.
This commit fixes the use of "stream_permission_settings"
as ID for "Channel permissions" subsection in both
stream edit and creation UI, which was not correct since
ID should be unique.
To fix this ID was removed from the element and following
changes are done -
- $("#stream_settings") element is now used as a container
for live update functions for stream edit UI.
- "stream-permissions" class is used to access the element
instead of ID.
- Advanced configurations container also had "stream-permissions"
class before, and that was removed in this commit so that
"Channel permissions" container can be identified uniquely
and thus some CSS changes were needed.
- Also, fixed "update_stream_privacy_choices" function to
not use ":visible" in selectors.
This commit adds support for unarchiving archived channels
by introducing the `is_archived` parameter to the
`PATCH /streams/{stream_id}` API endpoint. Sending a PATCH
request with `is_archived: false` will unarchive the specified
channel.
This commit fixes the toggleable area of the advanced configurations
subsection in the channel settings, preventing the toggle action from
interfering with the save discard widget.
Work towards #34244.
Now that we're supporting partial subscriber data, we might need
to fetch the full list of subscribers when opening the subscribers
tab of the edit channel modal.
This commit handles a slow load with a loading spinner while we fetch
the data, and also makes sure to ignore the data if it's received after
it stops being relevant (in case the user has another stream's data open).
We need this height to be flexible based on if the subheader has
overflowed into two rows or not, and our method of doing this
(with existing examples in the buddy list and stream list) is to
calculate what the height should be when a window is loaded or
resized.
Previously, stream archive button was only shown to realm admins.
Now button is shown to all the users who can administer the
channel.
Fixes part of #33379.
Replaced `data-dismiss="modal"` attributes with class/ID-based event
handling to align with Micromodal usage. Also removed an unused CSS
rule which was defined.
There are cases where the placeholder text overflows outside of the
input box. In the settings panels, all these filter boxes are on the
same row as a subheading on the left side. So the x in `Filter x` is
usually the subheading title, making it redundant to mention the x part.
We have not modified the aria-labels since it might still be helpful for
assistive technologies to have the whole `Filter x` part.
https://chat.zulip.org/#narrow/channel/101-design/topic/setting.20filter.20width
Clicking the "Channel color" label in the stream settings did not
open the color picker, unlike other settings where clicking the label
triggers the same action as clicking the value. This commit adds an
event listener to the label that triggers the associated button's
click event, ensuring consistent behavior across all settings.
Fixes#33446.
Earlier, it was not possible to configure the user that the forwarded
email will be sent by.
This commit updates the 'Generate channel email address' modal to
make sender configurable when generating channel email.
Fixes#31566.
Previously, the button to generate channel email address was removed
for users without post permissions. Now, it is disabled and includes
a tooltip: "You do not have permission to post in this channel."
Disable privacy settings and can_add_subscriber_group when an admin does
not have content access to the channel.
We are going to add `can_subscriber_group` in the future which will also
require content access to change and that's why we have used
`stream_group_permission_settings_requiring_content_access` to keep the
list of such group settings.
We only show the warning banner now if the user cannot edit any of the
channel properties. For more details, see
https://chat.zulip.org/#narrow/channel/101-design/topic/Warning.20for.20settings.20that.20cannot.20be.20changed.2E
Fixes#33156.
If the stream is set to on the private settings for privacy, we add a
parenthesis text `must be subscribed`.
We had to use JS to change the string since just having a conditional in
the handlebars template would not ensure that the parenthesis text
appears or disappears on changing the value.
We are just adding the ability to change the value of this setting in
this commit. It is not used for all possible permission checks on the
frontend yet. That will be done in future commits.
This commit replaces the spectrum color picker used in the stream
popover and stream settings with a custom color picker popover, which
contains a grid of predefined color swatches and a custom color option.
The custom color option uses the HTML5 <input type="color"> which shows
the native browser color picker UI.
Fixes#14961.
This temporary change allows us to preserve these old styles
while iteratively move all the close buttons to new styles.
Once the migration is complete, `old_clear_search_button` won't
exist anymore and there will be new styles for `clear_search_button`.