Commit Graph

168 Commits

Author SHA1 Message Date
Sahil Batra
72e2605b98 stream-settings: Fix duplicate IDs.
"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.
2025-05-20 10:40:19 -07:00
Sahil Batra
bc89d96893 stream-settings: Fix duplicate IDs.
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.
2025-05-20 10:40:19 -07:00
whilstsomebody
2780360b00 unarchive: Add support for unarchiving archived channels.
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.
2025-05-16 11:39:40 -07:00
Sayam Samal
46c568cace channel_settings: Fix advanced configurations subsection toggle area.
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.
2025-05-15 11:16:59 -07:00
Evy Kassirer
44b87c72dc stream_edit: Fetch subscribers before showing subscriber tab.
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).
2025-05-14 15:00:45 -07:00
Evy Kassirer
a327278a73 stream_settings: Remove can_access_subscribers from template.
`can_access_subscribers` is true for every stream which the user has
metadata access to and we only show the streams in overlay if user
has metadata access to it.

Discussion here:
https://github.com/zulip/zulip/pull/34543#discussion_r2087949980
2025-05-14 15:00:45 -07:00
Evy Kassirer
d82bd57cef two_pane_settings: Calculate body height from resize instead of fiddly CSS.
Having a set height is necessary for simplebar to work, and the height
will change depending on whether the header is one or two lines.
2025-05-13 12:06:47 -07:00
Maneesh Shukla
5b1ddf35ba buttons: Modify the styles of buttons in stream settings. 2025-05-08 09:40:51 -07:00
Maneesh Shukla
67631225c4 tooltips: Show tooltip on disabled "Add" button in group and channel settings.
Fixes: #34325.
2025-05-07 16:51:51 -07:00
Maneesh Shukla
46cd38d1b0 settings: Redesign buttons in channel and group settings.
Fixes: #34253.
2025-05-06 13:34:59 -07:00
Karl Stolley
1c55004cda decorated_channels: Rename partial as 'decorated_channel'. 2025-04-22 11:26:12 -07:00
evykassirer
a09dab5eaf settings: Calculate height of create modal through javascript.
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.
2025-04-10 10:01:57 -07:00
evykassirer
a16bc0e5b1 settings: Add a generic classname for two pane overlays. 2025-04-07 18:18:47 -07:00
evykassirer
8ee4554499 settings: Replace some two pane plus sign classnames with a generic one. 2025-04-07 18:18:47 -07:00
evykassirer
1abd3332a6 settings: Replace two pane header classnames with a generic one. 2025-04-07 18:18:47 -07:00
evykassirer
23b8ac0eab settings: Replace two pane container classnames with a generic one. 2025-04-07 18:18:47 -07:00
Shubham Padia
b2108404e7 channels: Remove Add all users button from channel creation screen. 2025-04-07 16:26:30 -07:00
Shubham Padia
81ba1bcb61 channels: Add subtitle when adding subscribers to new channel.
Also modify the placeholder text.
2025-04-07 16:26:30 -07:00
Sayam Samal
91549cfba0 settings: Update remove/unsubscribe buttons to action button component.
This commit updates the remove and unsubscribe buttons in channel
settings and user group settings to use the action button component.
2025-04-04 12:26:36 -07:00
Sayam Samal
47419fbfc3 settings: Update add/remove buttons on channel/group creation.
This commit updates the "Add" and "Remove" buttons in the channel/group
creation modal to use the action button component.

Fixes part of #33027.
2025-04-03 17:33:09 -07:00
Karl Stolley
ede630a6dd settings: Add new sort arrows to all settings tables. 2025-04-02 13:14:07 -07:00
Evy Kassirer
8adb46867b stream_settings: Move muted channels help text to below header. 2025-03-27 11:55:04 -07:00
Aman Agrawal
c7364fafe5 subscriptions: Fix wrapping of channel name above 18px font size.
We limit the width of the channel title and show ellipsis for
overflowing channel name.
2025-03-24 12:24:48 -07:00
Sahil Batra
526b46828c stream-settings: Show archive button to channel admins.
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.
2025-03-17 11:02:55 -07:00
sanchi-t
43932cd6aa stream_edit: Update channel row in settings when channel is archived. 2025-03-14 11:29:51 -07:00
Maneesh Shukla
37ec0a7c03 button_migration: Restyle buttons in channel and group settings.
Fixes part of #33130.
2025-03-11 14:08:34 -07:00
Vector73
158fd58cde settings: Add "can_manage_billing_group" realm setting.
Added "can_manage_billing_group" realm group permission setting
to control who can manage billing and plans in the organization.

Fixes #32745.
2025-03-10 09:36:30 -07:00
sanchi-t
423ee27a23 stream_privacy: Add archive icon for archived channels.
Archived channels are now displayed with an archived
icon.
2025-03-07 18:08:41 -08:00
sanchi-t
1aef79078c stream_settings: Display archived channels.
By default, archived channels will be hidden.
2025-03-07 18:08:41 -08:00
Maneesh Shukla
d2a9b5dda5 modals: Remove data-dismiss usage and update cancel actions.
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.
2025-03-07 09:10:47 -08:00
Shubham Padia
d18593b5be settings: Rename Filter x to Filter for channel and group settings. 2025-02-25 22:02:07 -08:00
Sahil Batra
d29ac45b99 streams: Remove unused code for can_add_subscribers_group label.
Text shown in parentheses with label for can_add_subscribers_group
was removed in befe49c293.
2025-02-25 13:17:15 -08:00
Sahil Batra
166d9282b8 streams: Use can_subscribe_group setting for checking permission.
This commit adds code to use can_subscribe_group setting in webapp.

Fixes part of #33417.
2025-02-25 13:17:15 -08:00
Shubham Padia
2972d97a92 settings: Use only Filter as the placeholder text.
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
2025-02-14 09:40:57 -08:00
Kartikay5849
6edbca981d settings: Make clicking "Channel color" label open color picker.
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.
2025-02-13 11:33:33 -08:00
Alya Abbott
befe49c293 channel settings: Clarify channel permission settings.
- Explain how content access works.
- Label settings more accurately, and remove incorrect notes.
2025-02-12 17:23:26 -08:00
evykassirer
ee3660ae19 settings: Use new icon for plus (stream/usergroup) button. 2025-02-12 16:03:44 -08:00
Prakhar Pratyush
1aa048df35 channel_email: Make sender configurable when generating channel email.
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.
2025-02-12 15:08:32 -08:00
Prakhar Pratyush
a639bc03a5 stream_settings: Disable "Generate Channel Email" button with a tooltip.
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."
2025-02-12 15:08:32 -08:00
Shubham Padia
d82f595e51 stream: Disable permissions that require content access.
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
2025-02-11 15:09:16 -08:00
Shubham Padia
41c68fad2c stream: Allow non-admins to create channel without subscribing to it.
Fixes #33125.
We now add a creator pill on the channel create screen. For the rule to
not allow non admins to create a channel without subscribing to it, the
rule was most probably introduced to prevent creating a private channel
that you can't access and creating a public channel and then not being
able to find it. Those concerns aren't valid anymore with the new group
permissions system and UX changes respectively.
See
https://chat.zulip.org/#narrow/channel/101-design/topic/Rework.20UX.20for.20adding.20everyone.20to.20a.20channel.20or.20group.20.2333127/near/2064926
for more details.
2025-01-29 12:36:10 -08:00
Maneesh Shukla
faa8b0d4a5 user_groups: Allow adding a user to groups via user profile.
Fixes: #32488.
2025-01-28 15:19:21 -08:00
Sahil Batra
4ae45763b4 settings: Use a common object for all group setting labels. 2025-01-24 14:51:51 -08:00
Shubham Padia
2fdb4fe53c stream: Add conditional note to can_add_subscribers_group.
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.
2025-01-23 15:57:16 -08:00
Shubham Padia
82c04ebe9e stream_types: Add admin permissions note below advanced configurations.
We've also removed the label_parens_text of `in addition to organization
administrators` wherever applicable.
2025-01-23 15:57:16 -08:00
Shubham Padia
a8dd4d8fb9 streams: Add the ability to modify can_add_subcribers_group.
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.
2025-01-22 14:27:06 -08:00
Sayam Samal
6557cd74cd stream_color: Replace spectrum color picker with native color picker.
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.
2025-01-07 17:27:23 -08:00
Harsh
4bf1ce7c5e settings: Use 'zulip-icon-close' instead of 'fa-remove' in search box.
fixes #32598
2025-01-07 17:22:47 -08:00
Harsh
4b5e578b9f Rename "clear_search_button" to "old_clear_search_button".
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`.
2025-01-07 17:22:47 -08:00
Sahil Batra
bbf43a2866 stream-settings: Use new "can_send_message_group" setting. 2025-01-07 12:17:36 -08:00