Commit Graph

6477 Commits

Author SHA1 Message Date
Lauryn Menard cadc8f4d46 portico: Use CSS class for styling of find accounts tip text. 2024-11-01 09:34:26 -07:00
Lauryn Menard 7e0ef8429c portico: Remove unused CSS rules for h3 elements.
The h3 elements were removed from these templates in
commit 58d00af6c3.
2024-11-01 09:34:26 -07:00
evykassirer ebe15dcf25 buddy_data: Don't filter out inactive participants.
This was filtering out users that were marked as
inactive for more than a year, but we want to show
all participants, including inactive ones.

More discussion on this here:
https://chat.zulip.org/#narrow/channel/9-issues/topic/In.20this.20conversation.20and.20invisible.20mode/near/197309
2024-10-31 23:23:56 -07:00
evykassirer b7b2930760 buddy_list: Redesign top of right sidebar.
Fixes #31974.
2024-10-31 16:29:49 -07:00
evykassirer 68c06c0f47 buddy_list: Remove unnecesssary right padding from header.
It isn't needed because the scrollbar doesn't go that high.
2024-10-31 16:29:49 -07:00
evykassirer 205b20e7df buddy_list: Rename 'Search people' to 'Filter users' for consistancy.
This is part of #31974.
2024-10-31 16:29:49 -07:00
Karl Stolley ea26be590f left_sidebar: Open up grid for topic filter box. 2024-10-31 11:01:30 -07:00
Aditya Kumar Kasaudhan d1ff871523 webhooks: Support filtering GitHub activity from private repositories.
Currently, the GitHub webhook sends activity from both public and private
repositories, which could lead to unintended disclosure of sensitive
information from private repositories.

This commit introduces a ignore_private_repositories parameter to the
webhook URL. When set to true, the webhook ignore processing activity from
private repositories, ensuring that such activities are not posted to
Zulip streams. By default, if the parameter is omitted or set to false,
activities from both public and private repositories are processed
normally. This provides users with the flexibility to control the
visibility of private repository activities without altering the default
behavior.

More importantly, this introduces a cleaner mechanism for individual
incoming webhooks to declare support for settings not common to all
webhook integrations.

Fixes #31638.
2024-10-31 10:40:28 -07:00
Sahil Batra 50674a7a28 user_groups: Do not enable "Add" button if input is empty.
This makes sure that the "Add" button in members panel is
not enabled if the pill input is empty, in two cases - when
the members panel is opened and also when the members panel
is live-updated due to change in permission.
2024-10-31 09:53:14 -07:00
Sahil Batra aed8ac9672 settings: Fix disabled look for group settings pills UI.
We now have a grey-ish background color for the pill container
with opacity also reduced like we do for the disabled select
elements in settings.

Needed to adjust the selectors so that the CSS for disabled
state correctly overrides the CSS for enabled state.
2024-10-31 09:53:14 -07:00
Sahil Batra 9a6ef9db93 user_group_popover: Show members count if there are empty subgroups.
We show "0 members" text when a group has no direct members but
has subgroups which are all empty.

The behavior for when a group has neither direct members nor
subgroups is same where we show "This group has no members".
2024-10-31 09:53:14 -07: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 9b0e26e954 settings: Refactor code for handling group settings UI.
This commit updates code to just use permission settings
list from server_supported_permission_settings data
instead of calling create_realm_group_setting_widget
individually for each setting.

Also, updated the code to create dropdown widgets to check
if only system groups are allowed or not for a setting
instead of using a hardcoded list.
2024-10-30 12:03:36 -07:00
Sahil Batra 8e0a8dfa32 settings: Use new pills UI for message delete permissions. 2024-10-30 12:03:36 -07:00
Sahil Batra b8bc20e87c settings: Use new pills UI for move message permission settings. 2024-10-30 12:03:36 -07:00
Sahil Batra d9f4c473fb settings: Do not disable time limit settings.
Previously we disabled time limit settings for moving
messages when non-admin and non-moderators users were
not allowed move messages as the time limit does not
apply to admins and moderators. And the time limit
setting to delete messages was disabled when all the
users who were allowed to delete their own message also
had permission to delete any message since time limit
does not apply to users who were allowed to delete any
message.

Now, as we use the new UI and allow the permission
settings to be set to anonymous groups, we just do
not disable the time limit setting to avoid complexity
and we anyways mention about cases when time limit is
not applicable.
2024-10-30 12:03:36 -07:00
Sahil Batra fb1c7fffa2 settings: Use new UI for can_add_custom_emoji_group setting. 2024-10-30 12:03:36 -07:00
Sahil Batra dce229ba17 settings: Use new pills UI for DM permission settings.
We now use pills UI for direct_message_initiator_group
and direct_message_permission_group setting.
2024-10-30 12:03:36 -07:00
Sahil Batra 5fbc46f82c settings: Fix banner shown on custom emoji panel.
Previously the banner was always shown to admins and to users who
cannot add emoji with the banner mentioning who can add emoji.

This commit updates the code to only show the banners who cannot
add emoji irrespective of their role, and just mention that they
do not have permission without any detail about who can add.
2024-10-30 12:03:36 -07:00
Sahil Batra 891e58bb1a settings: Fix live-update of setting elements.
Some of the group setting elements were not live-updated
correctly since they were not present in realm_settings
dict and sync_realm_settings is only called for settings
present in that dict.
2024-10-30 12:03:36 -07:00
Sahil Batra 072da3b0d3 settings: Extract template file for group setting pill UI.
This helps in writing same code again and again for different
settings.

Can also update group settings to use this template in further
commits.
2024-10-30 12:03:36 -07:00
Sahil Batra a7e6d5d770 settings: Remove unused fields passed to settings template.
There is no need to pass the value of group settings to
template as rendering the UI is handled in JS. This was
probably added due to the old enum value setting being
passed to the template.
2024-10-30 12:03:36 -07:00
Karl Stolley 0cab8df681 compose: Extend 4px border-radius to topic box.
All similar elements in the compose box--the channel/DM widget, the
pill container on DMs, and the compose textarea--all use a 4px
border-radius, correcting the topic box's outlier status.
2024-10-30 11:23:22 -07:00
Karl Stolley 17561d09a1 compose: Give tab-focused widget wrapper sensible border. 2024-10-30 11:23:22 -07:00
Karl Stolley 9231c97454 compose: Bring colors into variablized concord. 2024-10-30 11:23:22 -07:00
Aman Agrawal 3fe1e554a6 echo: Fix send messages not visible when auto narrowed to recipient.
We simply forgot to `add_to_narrow` locally echoed messages if
the current narrow changed before we received confirmation from
server.
2024-10-30 10:03:30 -07:00
Vector73 ed5638ec3c settings: Add `can_move_messages_between_topics_group` realm setting.
Added `can_move_messages_between_topics_group` realm setting to replace
`edit_topic_policy`.
2024-10-29 16:27:04 -07:00
evykassirer 1edf507be9 buddy_list: Show all sections (uncollapse) when searching. 2024-10-29 16:06:41 -07:00
evykassirer b826143537 buddy_list: Fix bug where header didn't show correct participant count. 2024-10-29 16:06:41 -07:00
evykassirer 3db32f1416 buddy_list: Rename all_participant_ids.
This helps avoid confusion with `participant_user_ids`
which is a property of the buddy list and describes
the currently visible participants, whereas
`all_participant_ids` describes all participants,
even those hidden due to search.
2024-10-29 16:06:41 -07:00
evykassirer 2b168a9936 buddy_list: Show empty placeholder for participants section in search.
This was overlooked when we added this section because it usually
can't have an empty placeholder, but it actually still can in search.
2024-10-29 16:06:41 -07:00
evykassirer f157bfe181 buddy_list: Simplify logic to update empty list placeholders.
Because we regularly change what we want the placeholder
text to be, as the user enters and exits search, it's simpler
to just not use `data-search-results-empty` and set up the
placeholder from the buddy list code directly. Previously we
were trying to sometimes use `data-search-results-empty` and
sometimes set it directly, which is more confusing and complex.
2024-10-29 16:06:41 -07:00
evykassirer d0dc33d8da buddy_list: Move fill_screen call to the end of populate().
Sometimes we might want to re-fill the screen after collapsing
or uncollapsing a section, so it's better to fill the screen
just once after determining if we should collapse the "other
users" section. Also, this commit removes a call to
`render_section_headers()` because that's always called at the
end of `fill_screen_with_content()`.
2024-10-29 16:06:41 -07:00
evykassirer b335c19d1c buddy_list: Refactor section collapse logic to be shared. 2024-10-29 16:06:41 -07:00
evykassirer ec1b265ff8 buddy_list: Refactor section toggle to not need custom classname. 2024-10-29 16:06:41 -07:00
Sahil Batra f29083f2ef settings: Disable save button if nobody group is not allowed.
This commit adds code to disable the save button if there no
pills selected for the setting and the setting cannot be set
to "Nobody" group.
2024-10-29 15:06:16 -07:00
Sahil Batra 8fa225d885 settings: Use new pills UI for group related realm settings.
This commit updates the code to use new UI for can_create_groups
and can_manage_all_groups settings.
2024-10-29 15:06:16 -07:00
Sahil Batra c8e906d49e settings: Use pills UI for channel creation settings.
We now use new pills UI for public and private channel
creation settings. The UI for web-public channel
creation setting is still a dropdown as we allow only
system groups for that.
2024-10-29 15:06:16 -07:00
Sahil Batra 60b12367cc settings: Use new settings UI for create_multiuse_invite_group. 2024-10-29 15:06:16 -07:00
Sahil Batra d370499557 settings: Refactor create_group_setting_widget.
This commit updates create_group_setting_widget code
to not accept setting type as a a parameter as we
would use separate function for realm settings.
2024-10-29 15:06:16 -07:00
evykassirer 35424adcc3 settings_account: Convert module to typescript. 2024-10-29 14:50:25 -07:00
evykassirer 8eb0ca3a7c settings_account: Move async call into ui_init. 2024-10-29 14:50:25 -07:00
evykassirer 7431d87d0c settings_account: Fix type for failure_msg_html (undefined). 2024-10-29 14:50:25 -07:00
evykassirer a6850410a8 settings_account: Use `this` instead of event target.
The first two are equivalent because they call `closest`
and the last one is directly equivalent. We're making these
changes to aid with the conversion to typescript.
2024-10-29 14:50:25 -07:00
evykassirer adf3280f1e settings_acount: Standardize type passed to update custom fields. 2024-10-29 14:50:25 -07:00
Sahil Batra caf919fca2 user_groups: Don't allow adding deactivated groups as subgroups in UI.
We already have the code to ignore the deactivated groups before
sending the request and show appropriate message. This commit
just adds code to not show them in the typeahead and also not
create its pill if user types the full group name.
2024-10-29 11:02:03 -07:00
Sahil Batra 69c0a772cc user_groups: Do not allow manually entering pills of invalid subgroups.
Even though we do not show groups that cannot be used as subgroups
in typeahead, user can still type the complete to get the pill
and make the request to the server which currently returns not so
good error message. This commit fixes it to not create the pill for
such cases and hence not making any request to server.
2024-10-29 11:02:03 -07:00
Sahil Batra 98ed8d8f49 add_subscribers_pill: Extract function for enabling/disabling the button.
This function will be used to handle the add button in group members
UI as well.
2024-10-29 11:02:03 -07:00
Sahil Batra 98255677d7 user_groups: Extract function to check if group can be used as subgroup.
We would use the same function in further commit to not add pills
for invalid subgroups by typing the full group name.
2024-10-29 11:02:03 -07:00
Aman Agrawal 5cdd17a7f1 unread_ops: Fix channel narrow not marked unread.
Mark as unread from here was not working in a channel feed when
we don't have all the messages fetched locally since the
channel ID was incorrectly passed as a string.

Copied the correction code from bulk_update_read_flags_for_narrow.
2024-10-29 10:48:48 -07:00
Aman Agrawal 4e00fb1d67 unread_ops: Remove unused parameters. 2024-10-29 10:48:48 -07:00
Karl Stolley eb31fdbe3c buttons: Shore up styles on a.button instances. 2024-10-29 10:41:32 -07:00
Karl Stolley aaaa52c5c0 buttons: Ensure active buttons take .button:active background color. 2024-10-29 10:41:32 -07:00
Alya Abbott de5a9d13c1 channel settings: Remove extraneous channel name from modal. 2024-10-27 22:03:30 -07:00
Aman Agrawal 1de1570a0c narrow_state: Extract cannot compute response. 2024-10-25 16:33:00 -07:00
sanchi-t 1577d45575 compose_validate: Show error banner for archived streams. 2024-10-25 16:06:43 -07:00
Sanchit Sharma 795b2ba14e do_deactivate_stream: Remove unnecessary mutations.
Streams should not be marked as private, and subscribers
of the deactivated stream should not be removed.

Update the confirmation message when archiving a stream.
2024-10-25 16:06:42 -07:00
sanchi-t f04fb937a3 narrow: Remove blueslip error code line.
When clicking on a message from an archived
stream, the `adjusted_terms` may be null since
archived streams are not sent back to the client.
This results in an error for the user.
2024-10-25 16:06:42 -07:00
sanchi-t e60711f871 stream_create: Add functionality to rename archived streams.
Users with appropriate permissions will now have the option
to rename archived streams.
2024-10-25 16:06:42 -07:00
sanchi-t 5dfa8ac9fe popover_menus_data: Hide actions user can't take for archived channels. 2024-10-25 16:06:42 -07:00
sanchi-t e8bb9e2de1 get_invite_stream_data: Do not display archived channels.
User should not be able to sent invite for archived channels.
2024-10-25 16:06:42 -07:00
sanchi-t dbc90ba2e5 stream_list: Prevent archived channels to show up in left sidebar. 2024-10-25 16:06:42 -07:00
sanchi-t 4b90741f91 can_post_messages_in_stream: Add condition check for archived streams.
Prevents users from sending any message in an archived stream.
2024-10-25 16:06:42 -07:00
sanchi-t f257188ab5 sub_store: Remove unused function `delete_sub`.
Function `delete_sub` was exclusively called by `stream_data.delete_sub`.
With the change in the approach where we no longer remove subscriptions
from `stream_info` and `subs_by_stream_id`, the `delete_sub` function is no
longer needed.
2024-10-25 16:06:42 -07:00
sanchi-t 5ce2b307c4 stream_info: Remove now-unused function `delete`.
Previously, when archiving a stream `delete` function was used to
remove stream from `stream_info`. However, with the current
approach, we don't remove stream instead  we use the `set_false`
function to mark streams as false, making the `delete`
function unnecessary.
2024-10-25 16:06:42 -07:00
sanchi-t a29b6485d6 delete_sub: Do not remove archived stream when deactivated.
Stream is simply marked as `archived: true` instead of removing
the stream from `sub_store` and `stream_info`.

A check in `subscribe_myself` is added before subscribing to a
stream.
2024-10-25 16:06:42 -07:00
sanchi-t fa268877d3 stream: Show `(archived)` at the end of deactivated stream names.
When a stream is deactivated the title area and messages are
re-rendered to update the stream name with `(archived)` suffix.
2024-10-25 16:06:42 -07:00
sanchi-t 616e39c290 stream_data: Make `Subscribe` button not visible for archived streams. 2024-10-25 16:06:42 -07:00
sanchi-t a917215292 get_subs_for_settings: Exclude archived streams from `All Streams` menu.
Don't display stream settings for archived channels.
2024-10-25 16:06:42 -07:00
sanchi-t ca9ac293f3 sub_store: Add `is_archived` field to `Stream` type. 2024-10-25 16:06:42 -07:00
Karl Stolley 40da0e44fb squash: Experiment with less intense modal border colors. 2024-10-25 15:39:13 -07:00
Karl Stolley 2c78efc3c5 settings: Improve layout and appearance of Organization logo area. 2024-10-25 15:39:13 -07:00
Karl Stolley 8c90c9d68d modals: Set new background, border colors. 2024-10-25 15:39:13 -07:00
Karl Stolley cd1f58080b left_sidebar: Put the New DM button to the right of All DMs. 2024-10-25 15:24:20 -07:00
Karl Stolley 9e8d908a37 left_sidebar: Show Direct Messages controls on DM area hover. 2024-10-25 15:24:20 -07:00
Pratik Chanda 34ff1de338 left_sidebar: Hide new topic button on restricted compose permission.
Earlier, in left stream sidebar, new topic button was shown for all
stream rows irrespective of compose permission of the user for
individual streams.

This commit changes the behaviour by hiding the new topic button if
user doesn't have appropriate compose permission for individual
streams.

Fixes: zulip#31800.
2024-10-25 16:32:44 -05:00
Sahil Batra 2109d3d1ab user_group_popover: Remove period after members count. 2024-10-25 08:23:14 -07:00
Shubham Padia 1f0906aef7 groups: Remove list specifying group settings with new API format.
All the groups are now following the new API format, making the list
redundant.
2024-10-24 14:42:21 -07:00
Shubham Padia 9f9d5b2f98 groups: Accept anonymous groups for can_access_all_users_group.
On the frontend, the selection is still a dropdown of system groups but
on the API level, we have started accepting anonymous groups similar to
other settings
We've kept require system groups true for now until we switch to group
picker on the frontend.
2024-10-24 14:42:19 -07:00
Shubham Padia ceb0197c1b groups: Accept anonymous groups for create_multiuse_invite_group.
On the frontend, the selection is still a dropdown of system groups but
on the API level, we have started accepting anonymous groups similar to
other settings.
We've kept require system groups true for now until we switch to group
picker on the frontend.
2024-10-24 14:41:09 -07:00
Karl Stolley 8e85972a03 empty_titles: Set line-height to match font size. 2024-10-24 12:40:43 -07:00
Karl Stolley 5b96769739 right_sidebar: Correct line-height by decoupling .filters class. 2024-10-24 12:39:49 -07:00
sanchi-t aa48a0e3ee css: Refactor theme colors for `input_pill`.
This change moves the light and dark theme colors for
`input_pill` to CSS variables.
2024-10-24 11:09:39 -07:00
sanchi-t 9b5accdb43 css: Refactor theme color for kbd. 2024-10-24 11:09:39 -07:00
Kislay Udbhav Verma 327647f4f8 copy_and_paste: Paste fallback md link if syntax link will be broken.
If we paste a stream-topic URL that can be formatted as per #29302,
we now generate a normal markdown link if the stream topic syntax
could result in a broken link.

Fixes #31904
2024-10-24 11:07:31 -07:00
Sahil Batra b593f6a881 user_group_popover: Fix icon alignment.
This commit fixes alignment of icons for the group members
and subgroups list shown in the popover.
2024-10-24 08:24:14 -07:00
Sahil Batra 7fe927c61b user_group: Show subgroups in popover.
Previously, all members of the group, including members of
recursive groups, were shown in the the popover. Now only
direct members are shown along with the direct subgroups
of the group.

Fixes #32088.
2024-10-24 08:24:14 -07:00
Sahil Batra f6db00bfb5 user_group_popover: Show members count in popover.
This count includes direct members as well as members of
all the recursive subgroups.
2024-10-24 08:24:14 -07:00
Prakhar Pratyush 30ada20ece dialog_widget: Fix stale comment.
The 'settings_user_groups' file which the comment refers
to no longer exists.

This commit updates the comment.
2024-10-24 08:22:08 -07:00
Prakhar Pratyush fd66c08221 onboarding_steps: Fix blueslip error message.
This commit fixes the blueslip error message displayed
when marking an onboarding step as read fails.
2024-10-24 08:22:08 -07:00
Prakhar Pratyush 3e13914f4a attachments_ui: Remove unused 'id' from 'Delete file' dialog widget.
The 'id' field in a dialog widget is used to add custom id to
the container element to modify styles.

We were not using this id anywhere, so this commit removes it.
2024-10-24 08:22:08 -07:00
klarabratteby ab03c74314 user_topic_popover: Convert module to TypeScript. 2024-10-23 15:26:46 -07:00
klarabratteby a601715e37 user_topic_popover: Remove all occurrences of instance.context. 2024-10-23 15:26:46 -07:00
Aditya Chaudhary ac652ffab6
stream_settings: Place the cursor automatically in channel name.
When the user opens channel create settings from left sidebar, now the focus
is set on the channel name input.

The logic was already there, but not properly placed inside the overlay code path.

Fixes #32034.
2024-10-23 15:06:21 -07:00
Aditya Chaudhary c1fc8e6331 channel_feed: Configure click event for channel name.
This commit configures the click event on the channel name so that
when the user is narrowed to a topic within a channel, clicking the
same channel will navigate the user to the general channel feed. This
improves the user experience by allowing easy access to the full
channel feed when a user is focused on a specific topic.

Fixes #32032.
2024-10-23 15:03:39 -07:00
Anders Kaseorg 2671a5c32c stylelint: Enable stylelint-high-performance-animation.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-10-23 14:56:39 -07:00
Anders Kaseorg f023fa6fc0 styles: Be specific about which properties are transitioned.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-10-23 14:56:39 -07:00
Anders Kaseorg 7878b80934 comparison_table: Remove dead CSS for th.sticky.
We do not have a "sticky" class.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-10-23 14:56:39 -07:00
Anders Kaseorg f8f511aded footer: Remove unused CSS transition for #footer li.
This doesn’t transition anything.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-10-23 14:56:39 -07:00
Anders Kaseorg dfc311ae96 landing_page: Remove CSS transition from .for-education-pricing-model.
If this was doing anything, it was probably just slowing down page
resizes.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-10-23 14:56:39 -07:00
Anders Kaseorg 75d834dcc3 styles: Remove ineffective animation of display.
It’s not possible to animate or transition the `display` property, at
least until `transition-behavior: allow-discrete` lands in all
browsers.  We already take care of applying `display: none` in a
JavaScript setTimeout (see alert_popup.ts, hide_error in
ui_report.ts).

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-10-23 14:56:39 -07:00
Aman Agrawal eab9a3e552 message_events: Refresh `is-followed` narrow on topic visibility update.
This adds live update support for `is-followed` narrow. We need
to render the narrow again instead of just adding the relevant
messages from the updated topic since it not easy to determine
which message we need to add based on the selected message of the
user and which messages to ask from the server.
2024-10-23 11:50:25 -07:00
Tim Abbott 29aad5c940 user_groups: Clean up members field comment. 2024-10-23 11:24:02 -07:00
Sahil Batra 9a72d6e72e user_groups: Do not show invalid subgroups in typeahead.
We do not show groups that will break the DAG constraint
on being added to a group as subgroups in the typeahead
shown in the members edit UI.

Fixes #32087.
2024-10-23 11:24:02 -07:00
Karl Stolley 625245af50 left_sidebar: Maintain Channels hover state while showing popover. 2024-10-23 11:01:25 -07:00
Aman Agrawal 70d9d8c09e message_scroll: Remove unnecessary `setTimeout` call.
Since `scroll_finished` is already called post render and we
don't have to wait for anything rendering before calling
`unread_ops.process_visible`, we can just directly call it.
2024-10-23 10:56:11 -07:00
Kislay Udbhav Verma 81c4e45d01 topic_link_util: Use different escape sequence for backticks.
Instead of "&grave;", we use "&#96;" to prevent an lxml parsing bug.
2024-10-22 17:36:59 -07:00
Kislay Udbhav Verma 6956947a73 topic_link_util: Add `&` as a character which can produce broken links.
`&` in topic names like `&copy;` can result in broken stream topic
links. So we generate fallback markdown links for them too.

This is a follow up to #30071.
2024-10-22 17:36:59 -07:00
Sayam Samal f7750a07a2 modals: Fix focus advancement in move topic modal.
Previously, when selecting a new channel in the "move topic" modal using
the keyboard, focus failed to advance to the topic input automatically.
Users had to press the tab key an extra time to move focus to the topic
input, which was not the intended behavior.

This commit modifies the `move_topic_on_update` function in
`web/src/stream_popover.js` to explicitly set focus on the topic input
field after a channel is selected.
2024-10-22 17:34:01 -07:00
evykassirer 8e9c592ce3 search: Only move cursor to end of selection if cursor is there already.
Fixes bug reported here:
https://chat.zulip.org/#narrow/channel/9-issues/topic/Broken.20links.20to.20previous.20messages.3F/near/196462
2024-10-22 16:25:26 -07:00
bedo 5686233699 message_header: Add date on every recipient bar in search_results.
Fixes #31958
2024-10-22 15:24:21 -07:00
Aman Agrawal 3ff6a89fe6 message_scroll: Fix last message not marked as read on `end` keypress.
Since we removed `unread_ops.process_visible` on system initiated
scrolling in #32038, this is important to take care of separately.

Reproducer: Go to a topic with a lot of unread messages and press
`end` key. Last message is not marked as read.
2024-10-22 12:21:45 -07:00
Aman Agrawal 49c2836605 message_scroll: Mark message as read after blue box moves past it.
Fixes #31833

Quoting from the issue:

Some of the reasoning behind that proposal was:

We want the first unread message to be what gets highlighted by the
blue box, since that's what you should read first.
It's bad to eat one unread message when entering a
message feed via N or otherwise.
A consistent algorithm would be that messages get marked as read when
you move the blue box past them ... except that there'd be no way to
mark the last message that way.
Because the bottom being visible marks things as read, it should be
fine to make this change now, even though there wouldn't currently
be a way to use the location of the blue box to mark the last message
in the current view as read.
2024-10-22 12:21:45 -07:00
Varun Singh ee52a7b155 scheduled_messages_overlay_ui: Convert module to TypeScript. 2024-10-22 10:43:58 -07:00
Varun Singh 9aa897b8e2 scheduled_messages_overlay_ui: Return early if msg-id is undefined. 2024-10-22 10:43:58 -07:00
Varun Singh f7f6f8703e scheduled_messages_overlay_ui: Refactor function to not mutate object.
Instead of mutating `message_render_context` object with fields,
we declare the object once depending on msg_type. This is a
prep-commit for migrating the module to TS.
2024-10-22 10:43:58 -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
Sahil Batra a3b7d956bc user_groups: Allow adding users who are members of subgroups.
This commit updates the code, which checks if user is member of
the group before adding them to the group, to consider only
direct members and now allows members of subgroups to be added
as direct members of the group.
2024-10-22 10:23:36 -07:00
Sahil Batra aa2c7bf1d1 user_group_create_members: Remove buggy code.
Having this code resulted in pills being deleted on
clicking enter in the pill container as this was
needed before ad11561d31, when we cleared the pill
container after adding users to the list of members.
2024-10-22 10:23:36 -07:00
Sahil Batra 330aa25647 user_groups: Remove unused html_selector passed to ListWidget.create.
html_selector is only used when rendering a single item in the list
using insert_rendered_row and render_item, which are not used for
group members list in group creation form.
2024-10-22 10:23:36 -07:00
Sahil Batra 006ac58a4b stream_edit: Fix code being called for wrong subsection.
"update_default_stream_and_stream_privacy_state" function
should be called only when changing or discarding settings
in "Stream permissions" subsections and not when changing
settings in "Advanced configurations" subsection, since
the behavior of stream privacy and default stream options
does not depend on settings in "Advanced configurations".

This also fixes the bug of trying to access "checked"
property on undefined value of $default_stream.find("input"),
since there is no such input in "Advanced configurations"
section.
2024-10-22 10:02:07 -07:00
Maneesh Shukla 81836303d4 settings: Fix email notification permission.
Added `message_content_in_email_notifications` to the
`disabled_notification_settings` object to keep track of the setting.
Also added a tooltip message to display when the checkbox is disabled,
indicating that the setting is controlled by the organization.

Fixes: #27262.
2024-10-22 09:55:40 -07:00
Maneesh Shukla 9771528e28 settings: Rename show_push_notifications_tooltip.
This commits renames the `show_push_notifications_tooltip` object to
`disabled_notification_settings` as mentioned in the
https://github.com/zulip/zulip/pull/27543/files#r1438156860 review.

Fixes part of #27262.
2024-10-22 09:55:40 -07:00
Saubhagya Patel 34de7b7839 settings: Update confirmation modals(invite) to show server errors.
This commit includes the following changes:
 - Errors returned from the server when resending or
   revoking invitations are now shown inside the
   confirmation modal, keeping the modal open.
 - We no longer display errors in place of the Resend
   and Revoke buttons (in case of server errors), as
   they are now handled within the confirmation modal.
 - The "Working..." button text is no longer displayed
   for the Resend and Revoke buttons, which was displayed
   while the request was being processed.
 - The confirmation modals now show a loading spinner,
   while request is being processed.

Fixes part of #31395.
2024-10-22 09:52:09 -07:00
Saubhagya Patel 57f2194a1c settings: Update confirm modals(invite) to show unequal field errors.
This commit includes the following changes:
 - Display errors due to non-matching fields encountered
   during resending or revoking invitations within
   the confirmation modal, keeping the modal open.
 - Each modal is now associated with a specific ID.
 - Modify the error text for the above-mentioned errors.
 - Stop the process of revoking or resending invitations
   if an error due to non-matching fields occurs.

Fixes: #31395.
2024-10-22 09:52:09 -07:00
Vishesh Singh 7e1962dea5 compose: Show bot icon after bot name in recipient picker.
Bot icon shown in the typeahead recipient list which pops up
in the compose box while typing.
On typeahead hover, bot icon takes the color of the font
for better contrast.
2024-10-21 18:09:50 -07:00
Prakhar Pratyush d1be8f9b50 realm_export: Fix '#allow_private_data_export_stats' not live-updated.
Earlier, the count of total users and users who consented in the
'#allow_private_data_export_stats' text were not being live updated.

This commit fixes that behavior.

The counts are now live-updated when:
* a new user joins
* a user is removed
* a user is deactivated
* a user is reactivated
* a user toggles their 'allow_private_data_export' personal setting.

Fixes #31201.
2024-10-21 17:42:52 -07:00
Prakhar Pratyush b8e0e08f01 realm_export: Add 'Export permissions' table.
This commit adds a "Export permissions" table
in the 'Data exports' setting panel.

The table lists the active human users and their
configuration of 'allow_private_data_export' setting.

Fixes part of #31201.
2024-10-21 17:42:52 -07:00
Aman Agrawal a1aa52cff4 message_scroll: Don't mark message read on system animated scroll.
This avoids us marking new messages as read when they arrive without
user activity. Specifically, we don't mark all messages in the narrow
as read when the last message is visible and the scroll was
initiated without user input.
2024-10-21 15:53:28 -07:00
Aman Agrawal 32030a7548 activity: Don't read new messages without user activity.
We have a bug where we can mark messages as read as a result of a
desktop left open with the Zulip window focused. To avoid it,
we only mark new messages as read if there is some user activity.

Note that we scroll to bring new messages into view which can
mark them as read.
2024-10-21 15:53:28 -07:00
Aman Agrawal 72caf5641e activity: Use the defined function to set `new_user_input` value.
This helps us call additional functions when `new_user_input` value
is modified.
2024-10-21 15:53:28 -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
Aman Agrawal 4768294bc0 navbar: Remove `:visited` color effect on button text.
The `:visited` color effect doesn't look good is not intentional.
2024-10-21 15:44:43 -07:00
Alya Abbott 18dc503865 portico: Add buttons to Why Zulip hero bar. 2024-10-21 15:44:43 -07:00
Shubham Padia 97bd0e6f3f user_groups: Fix incorrect nesting for .pill-container.
5980f4a502 moved the
`group_setting_disabled` class from pill container to its parent input
group without changing the nesting for the other css properties
properly. This commit fixes that.
2024-10-21 15:41:30 -07:00
Prakhar Pratyush aa667f8df1 settings_users: Remove the extra 'list_widget.hard_redraw' call.
For ListWidget, 'replace_list_data' makes a call to 'hard_redraw'
by default. There is no need to make a separate call to 'hard_redraw'
when using 'replace_list_data'.

In 'settings_users.js', we were making that separate call.
This commit removes that extra unnecesssary call.
2024-10-21 15:39:44 -07:00
Aman Agrawal 8aca0a7776 narrow_history: Save narrow state after we have scrolled to the msg.
Saving narrow state before we have scrolled to the message results
in view scroll position being different from where the message
is displayed.
2024-10-21 08:54:14 -07:00
Aman Agrawal b895e9dc6f realm_creation: Let user choose their org type. 2024-10-20 18:17:04 -07:00
Aman Agrawal 1cc9947786 message_events: Don't update msg if we don't have it cached locally.
This fixes a bug where we try to rerender the anchor message even
if we don't have it locally cached which results in error.

The bug was introduced in #31942.
2024-10-18 14:46:59 -07:00
Sahil Batra 70b6e46516 stream_create: Do not show banner if the current user is subscribed.
There is no need to show the banner if the user creating the channel
is subscribed to it because user will eventually be narrowed to
channel narrow and seeing the banner flash doesn't look good.
2024-10-18 10:20:32 -07:00
Sahil Batra 77c1204d45 stream_create: Remove banner shown on successful API request.
There was a banner showed on channel creation page on successful
completion of the API request, but we do not need that now since
we anyways move to a different UI, either the settings for the
created channel or to the message view narrowed to the new channel.
2024-10-18 10:20:32 -07:00
evykassirer 7a53db8498 stream_create: Convert module to typescript. 2024-10-17 10:56:59 -07:00
evykassirer b27ce42f6d stream_create: Don't return anything from create_stream.
The return value is not being used anywhere.
2024-10-17 10:56:59 -07:00
Lauryn Menard fa36c7ffde todo-widget: Add TODO for inbound/outbound data schema refactor. 2024-10-17 10:53:26 -07:00
Sahil Batra fde8b2d2e0 stream_creation: Fix subscriber pills being too long.
The CSS for setting min-width was added in 63a7c9061b
to set the width of pill containers used for group
settings, but that also applied to pill containers of
subscribers in stream creation form.

This commit updates the CSS to be applied only for
settings in groups UI.
2024-10-17 10:52:58 -07:00
Karl Stolley 746042915a portico: Align mobile subhead colors with desktop. 2024-10-16 16:20:56 -07:00
Lauryn Menard be3ac06cf4 invite-user-modal: Add validation on custom time input.
Disables the submit button on the invite user modal if the custom
time input value is a negative number or if the number is not an
integer.

Also updates the text for when the invite expires so say that the
custom time value is invalid.
2024-10-16 15:21:40 -07:00
Lauryn Menard 7d5a715ddf settings-input: Move time input check helper to web/src/util.
Moves the helper function for converting a time input into a
number so that it can be reused in both modals and settings
components.
2024-10-16 15:21:40 -07:00
Lauryn Menard 8e3317d15a invite-user-modal: Update invitate expiration text once post render. 2024-10-16 15:21:40 -07:00