Commit Graph

70 Commits

Author SHA1 Message Date
Anders Kaseorg e172c717f7 webpack: Enable explicitPartialContext for handlebars-loader.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-15 20:41:59 -08:00
Sayam Samal 543a6c51dc bootstrap: Rename btn-* -> button-* classes.
This commit is a part of the efforts to rename btn-related classes
and variables to align with Zulip's no-abbreviations policy and
streamline the search results.
2024-11-14 12:03:36 -08:00
Sayam Samal 045efadab9 bootstrap-btn: Rename btn -> bootstrap-btn.
This commit is a part of the efforts to rename btn-related classes
and variables to align with Zulip's no-abbreviations policy and
streamline the search results.
2024-11-14 12:03:36 -08:00
Sayam Samal 39dd55e854 subscriptions: Rename btn -> button in CSS classes.
This commit is a part of the efforts to rename btn-related classes
and variables to align with Zulip's no-abbreviations policy and
streamline the search results.
2024-11-14 12:03:36 -08:00
Sahil Batra 067e5a46c3 settings: Show stream and group info in a banner at the top.
Instead of having information about streams and groups below the
create button, we show that in a banner at the top irrespective
of whether user has permission to create them or not.

Fixes part of #32212.
2024-11-05 11:14:02 -08:00
Sahil Batra 9a50fae25a group-settings: Update right pannel for user without creation permission.
This commit updates the right panel for groups to be same as we
have it for stream settings when the user does not have permission
to create groups.

Fixes part of #32212.
2024-11-05 11:14:02 -08:00
Sahil Batra 9b6cb5b9dc group-settings: Rename "Who can manage this group" setting label.
This makes the naming consistent with the realm setting for
managing all groups.
2024-11-05 11:14:02 -08:00
Sahil Batra 4a89fffd8a group-settings: Link to help center section for group permissions.
Fixes #25938.
2024-10-31 09:53:14 -07:00
Sahil Batra 5816dda2c9 user_group_create: Support adding subgroups while creating groups. 2024-10-22 10:23:36 -07:00
Sahil Batra 89d0ad1d60 user_group_edit: Add support to update subgroups of existing groups. 2024-10-22 10:23:36 -07:00
Shubham Padia ad11561d31 user_groups: Add users to members preview list without add button.
This makes the behaviour of this screen similar to the create channel
screen where the user does not need to click `Add` button to add users
to members preview. This follows most of the logic from that flow for
soft removal, syncing between members preview list and the input pills,
etc. The current user will have a pill in this case unlike channel
creation since a user can create a group without them in it.
2024-10-21 15:46:11 -07:00
Shubham Padia 5980f4a502 user_groups: Show not-allowed cursor on labels also.
Fixes part of #32007.
2024-10-16 13:43:03 -07:00
Shubham Padia 8055617900 user_groups: Use group picker for can_mention_group. 2024-10-16 13:43:03 -07:00
Shubham Padia 05a6d7f870 user_groups: Reorder group permission settings.
Fixes part of #32007.
2024-10-16 13:43:03 -07:00
Shubham Padia 5508acfbbd user_groups: Reword tooltip message when user cannot leave group.
Fixes part of #32007.
On the group left sidebar, when a user cannot leave a group, make the
tooltip message same as the leave group button on the right side panel.
2024-10-16 13:43:01 -07:00
Shubham Padia 5c357a7f84 user_groups: Reword tooltip message when user cannot join group.
Fixes part of #32007.
On the group left sidebar, when a user cannot join a group, make the
tooltip message same as the leave group button on the right side panel.
2024-10-16 13:42:47 -07:00
Shubham Padia 065703c779 help: Consistently name mention group setting.
Remove question mark.
See https://chat.zulip.org/#narrow/channel/101-design/topic/name.20permissions.20settings.20consistently/near/1959774
2024-10-14 13:30:01 -07:00
Shubham Padia 797438b0f7 user_groups: Allow setting and changing can_leave_group setting.
Fixes #31951.
2024-10-14 11:44:27 -07:00
Shubham Padia 8a2a8b64aa user_groups: Add can_add_members_group field to group create/edit. 2024-10-11 16:31:18 -07:00
Sahil Batra 7a1277ea95 user_groups: Allow setting and changing can_join_group setting.
Fixes part of #25938.
2024-10-08 12:18:13 -07:00
Sahil Batra 701e391def user_groups: Use can_join_group setting to check permisison.
This commit adds code to use can_join_group setting when
checking permission to join group in webapp.

Fixes part of #25938.
2024-10-08 12:18:13 -07:00
Sahil Batra f97da983cf user_groups: Handle inaccessible streams in group deactivation error.
If the user group being deactivated is used as a setting for a stream
which cannot be accessed by the user trying to deactivate the group,
we show "Unknown stream" in the banner mentioning where the group
is used.
2024-10-01 09:45:37 -07:00
Sahil Batra 58ab97a0b4 user_groups: Show details for group deactivation error.
This commit adds code to list the groups and streams
where the group is being used as settings in a banner.

The banner also mentions if the group is being used for
realm settings.
2024-10-01 09:45:37 -07:00
Sahil Batra 63a7c9061b settings: Use new pills UI for can_manage_group setting.
This UI enables the user to set can_manage_group setting to a
combination of users and groups, replacing the old dropdown UI
which just allowed setting user to a single system group.

Fixes part of #28808.
2024-09-19 09:08:33 -07:00
Sahil Batra 6a739e263f user_groups: Allow deactivating groups from webapp. 2024-09-18 13:41:13 -07:00
sujal shah 614caf111e user_groups: Add `creator` and `date_created` field in user groups.
This commit introduced 'creator' and 'date_created'
fields in user groups, allowing users to view who
created the groups and when.

Both fields can be null for groups without creator data.
2024-09-13 18:44:58 -07:00
Karl Stolley 554221e3c8 cleanup: Remove structural .new-style references. 2024-09-11 14:22:45 -07:00
Karl Stolley f98551f128 settings: Remove unnecessary .block from .new-style cluster. 2024-08-30 14:06:27 -07:00
Sahil Batra d2c7e7e94c user_groups: Fix live updating user groups UI.
This commit updates code to live update the groups UI if
realm or group level setting to manage groups is changed.

This commit also does some refactoring to better organize the
code in different functions.

And also, the code to hide/disable the UI if the user does not
have permission to manage the group in JS such that the same code
is used for live-updating as well.
2024-08-23 09:09:03 -07:00
Ujjawal Modi d32f30cedc user_groups: Add function for determining group creation permissions.
Earlier in frontend there was a single function to determine whether
user can create and edit user groups.
This commit adds a separate function for determining group creation
permissions.
2024-08-20 09:28:05 -07:00
Ujjawal Modi 3f24dd1049 user_groups: Allow setting and changing can_manage_group.
This commit adds a group level setting can_manage_group in
`#groups` overlay. This setting can be set while creating a
new user_group and can be changed for existing groups.
2024-08-20 09:28:05 -07:00
evykassirer a243191539 settings css: Use selector for empty option text instead of span. 2024-07-26 14:42:24 -07:00
evykassirer 9824f76e7d css: Use a classname instead of span for overlay plus button. 2024-07-26 14:41:08 -07:00
sujal shah fa16f7720f settings: Drop email column on narrow screens.
Since we access email through pills,to improve the
visibility on a narrow screen, if the screen width
goes below 'lg_min' or 992px drop the email column from users,
deactivated users, bots, channels, groups using a new classname
'settings-email-column'.
2024-07-16 14:52:29 -07:00
Shubham Padia 43eebbf9c6 scroll: Set tabIndex to -1 for simplebar content wrapper.
Fixes #30403.
Having tabIndex set to 0 led to keyboard focus being put on
a scrollbar container, which led to users having to tab twice
to skip a container.
This commit also removes instances of tabIndex being set to
-1 programatically for certain cases, since it is -1 by default now.
This commit also removes `outline: none` for simplebar since
that property is not needed anymore because the wrapper is
not focusable anymore.
2024-06-20 10:25:51 -07:00
sujal shah 967f99779a user_group: Move "Choose members" into a separate second panel.
Break the current user group creation panel into two panel
"Create user group: configure settings" and
"Create user group: add members".
2024-06-17 16:20:06 -07:00
Sahil Batra 040486776c modals: Add bottom margin to label elements.
This commit adds bottom margin to label elements of
different inputs by adding "modal-field-label" class
to the label elements. Some of them already have the
margin due to having dropdown-title class.
2024-05-03 09:51:36 -07:00
Sahil Batra 8c6e71a195 settings: Add bottom margin to label elements.
This commit adds bottom margin to label elements of
settings inputs in personal, organization, stream
and group settings using the recently added
"settings-field-label" class.

Most of the settings are dropdown settings, so the
label for them already had a margin as they use
"dropdown-title" class.
2024-05-03 09:51:36 -07:00
Lauryn Menard 4dcb0258a5 web-i18n: Update frontend translated strings for stream rename channel.
Updates translated strings in web/ that do not need updates to any
tests. The majority of these strings are also unique to the file/
template that they are in. A few have overlap with one other file.

Some changes here update placeholders/variables in these strings to
no longer use stream so that all the translation updates for this
rename happen at the same time.

The exception to this are cases of "<z-stream>" placeholders in
these translated strings.

Part of the stream to channel rename project.
2024-04-24 14:35:04 -07:00
Sahil Batra 79975ae27e group_settings: Refactor code to handle tabs in right section.
We now use "data-group-section" attribute to set the "key" for
toggler in right section of groups overlay.

This change is preparatory work for showing the section opened
in right side in the url hash as we would use the "key" value
in url hash as well and the existing "group_general_settings"
and "group_member_settings" toggler key values were too long to
be used in the url. We previously used toggler key value as
class name and then used that class as selector to show the
relevant section but we now use "data-group-setting" section
to avoid using common class names like "general" and "members".
2024-02-22 13:09:33 -08:00
Sahil Batra f84857959c user-groups: Hide "+" button if user is not allowed to create groups. 2023-11-30 12:33:44 -08:00
Sahil Batra d8b3c5581c settings: Fix "Actions" column width for subscribers and members list.
We reduced the width of "Actions" column too much in stream subscribers
and group members list when there were no users matching the text in
search input and it did not look good because of "Actions" heading
being shifted to extreme right.

This commit fixes it by removing the "actions" class on the heading,
which was used to set the width to "1%" which is needed for tables
with only icons in buttons to avoid unused space but not here.

As a result of removing this class, the CSS of "min-width: 100px"
is being applied to the column, but that's fine atleast for stream
subscribers list as it did not look good before due to scrollbar
overlapping the buttons and it looks better now.

For the group members list, we set min-width to 80px, as we do
not require 100px width and it is enough to avoid overlapping
scrollbars to an extent.

The overlapping scrollbars problem is still not fixed completely
but that will handled in a separate commit. This commit was
just to make the heading row look better when there are no users
in the list.
2023-11-30 12:33:44 -08:00
Sahil Batra 5ece914377 settings: Update empty message for subscribers and members list.
This commit updates the message shown for empty group members
list to use "members" instead of "subscribers" and also updates
the wording of messages in both stream subscribers and group
members list to match with the one shown in right sidebar users
list.

We also show different message when there are no subscribers or
members matching the filter text.
2023-11-29 10:58:04 -08:00
Sahil Batra 2968eb2b04 user_groups: Add UI to set and update can_mention_group setting.
This commit adds support to set can_mention_group setting
when creating user group and also update the setting for
existing user groups.
2023-11-29 10:58:04 -08:00
Sahil Batra db0476622a user_groups: Disable "Add" button for members list if input is empty.
This commit adds code to disable "Add" button in the members list
if the input is empty by adding a common class to "Add" button
for stream subscribers in group members and using the existing
code in add_subscribers_pill.js.
2023-11-29 10:58:04 -08:00
Sahil Batra 3b5bbbc5ee user_groups: Show text when there are no groups in the list.
We now show some text when there are no groups in the left
section, both in "Your groups" and "All groups" list like
we do for streams.
2023-11-29 10:58:04 -08:00
Sahil Batra 9b958b2634 user_groups: Allow joining and leaving groups from left section.
This commit adds support to join and leave buttons from the
left section using the plus/checkmark icon present towards
left in each group row.

Fixes part of #25538.
2023-11-29 10:58:04 -08:00
Sahil Batra a2da85631c user_groups: Add button to join or leave a group.
This commit adds a button to join or leave a user group
in the right section of stream settings overlay to the
right of tabs like we have for streams.

Fixes part of #25538.
2023-11-29 10:58:04 -08:00
Sahil Batra db99b3f7fe user_groups: Remove unnecessary "hide" class.
There is no need for "hide" class in ".user_group_settings_wrapper"
element as we hide the ".right .settings" element in JS using jquery
"hide" and we also do not remove the "hide" class while showing the
group settings because we use the jquery "show" function for it.
2023-11-29 10:58:04 -08:00
Sahil Batra e7dffc7cbe user_groups: Rename sub_unsub_button.
This commit renames sub_unsub_button class and related
variables to join_leave_button in new groups UI.
2023-11-29 10:58:04 -08:00