Commit Graph

63 Commits

Author SHA1 Message Date
Shubham Padia e539d2226b stream_create: Move `Add all users` beside `Choose subscribers`.
Fixes part of #30690.
We also drop the `Do you want to add everyone?` text.
2024-07-02 12:54:52 -07:00
PieterCK b2515e8214 subscription css: Add new app variable for bottom border color.
This commit add a new css variable for subscription lists bottom
border color.

Fixes #30677.
2024-07-02 11:16:51 -07:00
PieterCK 7556414337 subscription css: Refactor subscriber list bottom border.
This commit refactors the css for subscriber list in channel
settings and group settings by moving the css rules that were
initially used to format the bottom border of the table to
the wrapper div (.subscriber_list_container) around the table.

On specific screen height, this wrapper div will overlap the
actual bottom border of the table and make it look like it's
cut-off. This commit makes it look like the table have consistent
bottom border accross all screen sizes.
2024-07-02 11:16:51 -07:00
Shubham Padia 87b3642b62 stream_create: Soft remove users on clicking the remove button.
Fixes #29825.
Clicking on remove button will not delete the row anymore. We will
add a strikethrough to the user pill and email text. `Remove` button
will change to `Add` on click to undo this action.
Re-adding a user explicitly should will not undo the soft remove on
their row. e.g If `Iago` was added as part of a group and crossed out.
Now, adding another group with Iago as part of it should not undo the
soft remove.
We maintain a seperate set of soft removed users, but we will not
remove those users from the main user list on clicking `Remove`.
That list can only be modified by actions with the input pills.
We will subtract the soft removed user ids from main user id list
when sending the request to add subscribers to the new channel.
I've not added extra puppetteer tests, since adding users was
not part of the existing tests.
2024-06-28 15:35:56 -07:00
Sahil Batra 1fac997338 settings: Refactor CSS for "control-label-disabled" class.
We previously had two CSS rules for control-label-disabled
class, one in settings.css and one in subscriptions.css
and the rule in subscriptions.css was being used by all
the elements with that class.

This commit refactors the code to have only single CSS rule
for that class with the value being set to the one used in
subscriptions.css, because that was the one being used and
that also looks better in terms of design, and the CSS is
defined in settings.css since it can be considered more
general file for writing CSS used in organization/personal
settings along with stream settings.

This commit also removes the unused code for
".control-label-disabled.enabled" selector since we no
longer use that selector.
2024-06-26 14:22:47 -07:00
sujal shah eb259780f7 stream_settings: Reduce vertical space between setttings.
There was previously an excessive margin between
the "default streams" and "announce streams" settings.
2024-06-18 14:20:17 -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
sujal 279e9d1dc3 stream_settings: Move "Choose subscribers" into a separate second panel.
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'.
2024-06-17 16:20:06 -07:00
tnmkr bc8e6a86b5 stream_settings: Add new "Stream details" section in General tab.
We want to make it easier to find stream details such as creator,
creation date and stream id. The commit replaces the "Email address"
section in General tab of stream overlay with a new section called
"Stream details", "Email address" is now a field in this section.

If the stream does not have a creator, we only show the stream creation
date in creation details.

Fixes: #25648.
2024-04-20 19:03:43 -07:00
tnmkr d934da7afe stream_settings: Remove custom styling from "Generate email" button.
This is so that it better matches existing buttons in this overlay. For
example the "Reset to default notifications" button in Personal tab.

This is a prep commit.
2024-04-20 19:03:43 -07:00
Aditya Bajaj 484ef17afc subscriptions: Fix broken UI for subscriber and member search.
Fix overlapping UI layout for stream subscribers search
on screens smaller than 320px. Break the search field
to a new row in the layout. Also fix the same issue in
the group settings > members panel.

Fixes #29368
2024-03-26 09:05:19 -07:00
somudas f00f4f95be stream_settings: Make stream name in right panel header a link.
The stream name in right side header is now a link to the stream
narrow.

Fixes #25171.
2024-02-14 11:27:41 -08:00
ayush amawate 071e93277f stream_settings: Fix overlapping Unsubscribe button with side scroll.
Fixes #26835.
2024-02-13 10:59:28 -08:00
Sayam Samal 35ddb994e9 stream_settings: Fix cursor not being disabled due to specificity issue. 2023-12-04 16:38:19 -08:00
Sayam Samal 68ccb022ca push_notifications: Add help links to mobile notifications options.
Fixes #27830.
2023-12-04 16:38:19 -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 355114c976 subscriptions: Add bottom border for subscribers table.
This commit adds bottom border for stream subscribers and
user group members table.
2023-11-29 10:58:04 -08:00
Sahil Batra 550fb3022b subscriptions: Fix border related CSS for subscribers table.
This commit removes unnecessary border related CSS for stream
subscribers and user group members table. The border properties
set on tr elements are not required as we set borders on td
elements and we also remove the border-radius set on table
element as we set border on the required th (and td elements
in further commits) elements and the border-radius was anyways
set to 6px when the border-radius on th element is set to 4px.
2023-11-29 10:58:04 -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 7bdafed635 user_groups: Show spinner on checkmark in left section.
This commit adds code to show spinner when joining or
leaving a group using plus or checkmark icon in the
group rows on left section.

Fixes #25538.
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 f9d2ab8bf3 subscriptions: Remove unused styles.
This CSS style was added to ".unsubscribed" selector inside
".stream-header" and ".group-header" elements but the
".unsubscribed" class is only added to the subscription
button which is not inside ".stream-header" element.
2023-11-29 10:58:04 -08:00
Sahil Batra 3c8701ee36 streams: Add API endpoint to get stream email.
This commit adds new API endpoint to get stream email which is
used by the web-app as well to get the email when a user tries
to open the stream email modal.

The stream email is returned only to the users who have access
to it. Specifically for private streams only subscribed users
have access to its email. And for public streams, all non-guest
users and only subscribed guests have access to its email.
All users can access email of web-public streams.
2023-11-16 13:25:33 -05:00
Pratik daa34685c3 stream_edit: Enable notification settings for muted streams.
This commit allows the user to change notification settings even though
the stream is muted and adds a line of text in stream settings and
notification settings.

Fixes #27272.
2023-11-02 13:57:56 -07:00
Sahil Batra 7b3fda696d css: Rename CSS variables for heights in subscriptions overlay.
The CSS variables for heights in subscriptions overlay uses
"modal" word but we actually use overlays for subscriptions
UI, so this commit renames those variables to better names.
2023-10-17 10:28:50 -07:00
Sahil Batra eeb3b5715f settings: Rename modal-footer class.
We only use "modal-footer" class in stream and user group
creation forms which is actually not a modal, so this commit
renames the class to a better name "settings-sticky-footer".
2023-10-17 10:28:50 -07:00
m-e-l-u-h-a-n 3d1b846d86 streams: Change color of the checkmark to blue.
This is a UI experiment which change the regular and on-hover
colors of the green checkmark in All Streams UI to match the send
button of the compose box.

Co-authored-by: Raghav Luthra <rluthra2002@gmail.com>
2023-10-13 11:08:54 -07:00
m-e-l-u-h-a-n 2585fe5c41 streams: Improve subscription toggle buttons on stream rows.
This commit changes the UI for subscribing to streams on stream rows
to be more like the mobile version (zulip/zulip-mobile#5333).
The current design made it hard to discover how to subscribe to
streams via left panel and is not very clear on the fact that
its not possible to subscribe to private streams.

To address this the following changes have been made:
- For unsubscribed streams, the on hover-checkmark is replaced by
a "+" which is always displayed and has on-hover highlighting.

- For unsubscribed private streams, the "+" is disabled.

- Tooltips with appropriate messages are added on the "+" sign for the
above 2 cases.

- A tooltip has also been for the on-hover checkmark for subscribed
streams.

Fixes: #22217.
Co-authored-by: Raghav Luthra <rluthra2002@gmail.com>
2023-10-13 11:08:54 -07:00
Aman Agrawal c16d727fd4 stream_settings_ui: Avoid two scrollbars.
Fixes #26823

Fixes user card not displayed on last item in the subscribers list.
This was happening because there wan not enough space below the
user name for the popover to be displayed (as far as I understand this).

Regardless of the fix above, this seems like a nice change.
2023-10-11 16:25:27 -07:00
Sahil Batra 5e263fc4ed subscriptions: Re-add bootstrap CSS for modal-footer elements.
We use "modal-footer" class in stream and user group creation form
and this commit adds bootstrap CSS rules for it to subscriptions.css
so that we can remove the CSS from bootstrap.css.
2023-10-09 11:25:26 -07:00
Sahil Batra 107ebc140b group_settings: Show "not-allowed" cursor when not allowed to add users.
This commit adds code to show the "not-allowed" cursor when hovering over
pill input in "Add members" section if a user is not allowed to add members
to the group like we do for "Add subscribers" section in stream settings.
Previously the "not-allowed" cursor was show only when hovering over "Add"
button.
2023-09-20 15:40:11 -07:00
Sahil Batra f6d3b2667f user_group_creation: Add simplebar to user group creation form.
This commit adds simplebar to user group creation form and makes
it consistent with stream creation form.

This also fixes transparency issue in footer of group creation
form dark theme.

Fixes #24443.
2023-09-20 15:40:11 -07:00
Sahil Batra 5a6a8a63e1 group_settings: Fix placeholder in pill input for members.
This commit fixes placeholder text in the pill input for user
group members UI in "#groups" overlay to mention members instead
of subscribers. For this we add a new template instead of using
add_subscribers_form.hbs and thus this commit also updates
the class names used in javascript code accordingly.
2023-09-20 15:40:11 -07:00
Sahil Batra a3124ddcb3 settings: Rename search-container class.
This commit renames search-container class used in stream and
user group settings overlay to list-toggler-container since
the element does not contain search UI and instead contains
the toggler for "Subscribed" and "All streams" and similarly
for "Your groups" and "All groups".
2023-09-20 15:40:11 -07:00
m-e-l-u-h-a-n e92aa2293d user groups: Add tabs for your/all groups in #groups overlay.
We add tabs to make distinction between the groups the user
is a member of and all groups in the realm. This is a preliminary
commit and there would be following immediate follow-ups to this:
* Persisting the active state of selected group in the left panel
  as the list updates with search and thorugh tab toggles.
* Updating the display of group in the left panel list on membership
  update events.
2023-09-18 16:09:31 -07:00
Hemant Umre a81715786c stream_settings: Add 'Default stream' option in edit stream UI.
This commit adds a 'Default stream for new users' checkbox in
the stream editing UI to allow admins to easily add or remove
a stream as the default stream for new users. Previously, this
functionality required navigating to separate menu.

Fixes a part of #24048.
2023-08-09 14:38:52 -07:00
Aman Agrawal 6efcb7a349 dropdown_widget: Refactor to use Class. 2023-07-27 14:10:08 -07:00
Sahil Batra b95d23bb07 bootstrap: Remove bootstrap CSS for input-append class.
We use input-append class only for some search elements
in the app and the CSS rules applied by bootstrap which
are really used are "white-space" and "margin-bottom"
for a couple of ".input-append" elements and "margin-left"
property on clear button which is re-added to the CSS for
specific elements in this commit.

Others are either redundant or overridden by the other CSS
for the specific elements.

The border-radius property for the clear button was applied
but since we use "x" for it, there is no border for that
button and hence it is redundant.
2023-07-23 15:44:58 -07:00
Aman Agrawal 1557c4d112 css: Use 400 font weight instead of 500.
500 font weight defaults to 400 which is what we support.
2023-07-06 17:57:37 -07:00
Aman Agrawal 98ee387197 css: Use 700 font weight for 800 since they default to it.
We don't have 800 font weight available, so the font weight defaults
to 700, so we use it directly here to avoid any changes when
we convert to variable font.
2023-07-06 17:57:37 -07:00
Karl Stolley 0c55fb7e89 stream_settings: Fix scroll at max-height.
Simplebar seems unaware of the `max-height: 1000px` on
`.subscriptions-container`, and therefore does not properly provide
a scrollbar when it's needed.

This commit adds a `max-height` to the stream Simplebar container,
ensuring that otherwise hidden content that Simplebar believes to
be visible can be scrolled to.

Finally, rather than rely on magic numbers or math done in comments,
this commit establishes CSS variables for all relevant modal-element
heights, doing the math inline using CSS calc().

Fixes #26107.
2023-06-29 11:19:01 -07:00
Sahil Batra b119ff68c3 stream_settings: Fix height of select elements.
Previously, we used to have top and bottom paddings of 4px to
the select elements but it was removed in a208da9c4d to make
sure that text for the selected option is aligned properly.

All other select elements have height set to 30px, but the
select elements in stream settings page had height set to
"fit-content" and so they looked ugly after removing the
padding.

This commit sets the height of select elements in stream
settings to 30px.
2023-06-23 11:04:19 -07:00
evykassirer 9427fb7230 settings: Fix narrow-screen background color, use color variable.
Fixes #25708.
2023-05-23 11:31:03 -07:00
Ujjawal Modi eda1ee555b streams: Properly disable add subscriber container for existing streams.
Earlier the field used for adding subscribers to existing
streams was not properly disabled.

This commit properly disables the field and also adds a new function
for enabling and disabling add subscribers container.
2023-05-14 11:19:05 -07:00
Hardik Dharmani ede1e547ee stream_settings: Fix bugs with #stream-creation .modal-footer.
This commit addresses `#stream-creation .modal-footer` becoming
transparent after an error in creating a stream due to overlapping
with `.stream-creation-body`. Instead of adding data-simplebar on
.stream-creation-body, added it to a new div
`stream-creation-simplebar-container` which contains 3 divs:
stream_create_info,stream_creating_indicator and stream-creation-body.

Additionally, fixed the border-radius of the modal footer on the
bottom left side for device width > $md_min.

Fixes #25526
2023-05-11 15:50:56 -07:00
m-e-l-u-h-a-n ae16787a25 css: Remove redundant css rule from streams/groups overlay. 2023-04-24 16:53:35 -07:00
m-e-l-u-h-a-n 4b5c073c05 user groups: Minor fixes in CSS common to #groups and #streams overlay.
This commit does following improvements in #streams and #groups overlay.
* Adds word break in the title in the right pane to handle long stream
  and group names.
* Fix positioning of edit (pencil) button to the right end and provide
  maximum available space for stream/group name.

Co-authored-by: Hardik Dharmani <Ddharmani99@gmail.com>
2023-04-24 16:53:35 -07:00