Commit Graph

2301 Commits

Author SHA1 Message Date
Aman Agrawal 7d1a6c7388 gear_menu: Extract context data to popover_menus_data. 2023-10-18 22:02:38 -07:00
Aman Agrawal a5e60f47b6 gear_menu: Move from TS to normal JS module.
Need to convert gear menu to popover.
2023-10-18 22:02:38 -07:00
Aman Agrawal f91236f917 gear_menu: Extract version_display_string into a util library.
This will keep changes to a minimum when we migrate gear menu
to use tippy module.
2023-10-18 22:02:38 -07:00
Anders Kaseorg 8d42fa3960 stream_edit: Fix set_stream_property usage.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-18 16:26:36 -07:00
Sahil Batra 08e5e29054 user_profile: Show subscribe widget for others to non-admins.
We now show subscribe widget in user profile modal for others
to non-admins if user is allowed to subscribe others to streams.
2023-10-18 15:28:46 -07:00
Sahil Batra 180ed2e50f user_profile: Show streams to subscribe for user's own profile.
We did not show the streams to subscribe in dropdown in user
profile modal when user is not allowed to subscribe others
even in the user's own profile modal which is not correct.

This commit fixes it to show the streams in dropdown for
user's own profile irrespective of whether user is allowed
to subscribe others or not.
2023-10-18 15:28:46 -07:00
Sahil Batra 8c45e1dfed user_profile: Remove unnecessary filter call.
There is no need to filter down the streams returned
by get_streams_for_user to the streams for which
stream_data.can_subscribe_others is true, as
get_streams_for_user(user_id).can_subscribe only includes
the streams for which stream_data.can_subscribe_others
is true.

This commit removes the unnecessary filter call.
2023-10-18 15:28:46 -07:00
Karl Stolley 9458497ad2 settings: Reference 'Call provider' in settings. 2023-10-18 14:04:00 -07:00
Karl Stolley 383466eaff compose_box: Change 'audio' references to 'voice'. 2023-10-18 14:04:00 -07:00
Sahil Batra 760d793d6b settings: Rename "default" views to "home" views in settings and docs.
This commit renames "default" views to "home" views in the setting
labels, keyboard shortcuts list, help documentation and its urls.

This commit does not do changes in variable and class names, setting
field in database, API docs and changelog.

Fixes part of #27251.
2023-10-18 11:25:20 -07:00
Prakhar Pratyush 5e3b8f5393 css: Improve the css of icon-based tab picker used in topic popover.
Remove the solid outline around hovered tabs.

Minor tweaks in height and padding for tabs.
2023-10-17 16:21:06 -07:00
Prakhar Pratyush 2d979fbf0e css: Use CSS variables for the color values of tab-picker.
Use CSS variables for the color values of left sidebar
topic popover, tab-picker widget to change the visibility
policy.
2023-10-17 16:21:06 -07:00
Prakhar Pratyush 9b3306acf2 icon: Update the icon for 'Follow'. 2023-10-17 16:21:06 -07:00
Tim Abbott 401c8bbb21 user topics: Delay rerendering all messages.
Rerendering of "all messages" is slow, and by definition, not visible
to the user, so make sure the browser gets an opportunity to rerender
the content that is visible before starting that expensive
computation.
2023-10-17 16:19:53 -07:00
Aman Agrawal 0c649ff2aa message_fetch: Avoid non-contiguous conversations in recent view.
Fixes #27208. Fixes #27207.

We only process messages from all_messages_data and special data
fetched for recent view only.

This avoids us having a conversation present in recent view which is
not contiguous due to loading a random old conversation.

Also, to ensure displayed conversations are contiguous while we are
loading data, we don't show message list data until we have found the
newest message in the list.
2023-10-17 13:03:49 -07:00
Tim Abbott 2ac443dd2f Partially revert "compose: Ensure cursor is scrolled into view after content is inserted."
This reverts the typeahead library part of commit
0cdb54cf65.

The extra refocusing was breaking the `>` typeahead acceptance logic.

Further, generally typeahead acceptance won't introduce block syntax
or newlines, so I'm not sure whether the original motivation for doing
this in other code paths applies to typeahead.
2023-10-17 12:26:33 -07:00
Aman Agrawal 0dd8e40e84 inbox: Use new empty-list-message style and center the text. 2023-10-17 11:55:41 -07:00
Aman Agrawal 4db331ed21 empty_list_widget: Use class instead of id.
We were using id before to increase their specificity, but
since it is possible for multiple empty_list_widget_for_list/table
to be in DOM at the same time, we should use a class here. Used
`!important` here so that we can force our padding where these
classes are used.
2023-10-17 11:55:41 -07:00
Aman Agrawal 62c78d5ad5 inbox: Remove side borders. 2023-10-17 10:34:48 -07:00
Aman Agrawal 742b985de0 compose_actions: Warn callers if msg_type is not defined. 2023-10-17 10:34:48 -07:00
Aman Agrawal c54e84cb9b compose_reply: Fix msg_type being not defined triggering errors.
When focused on filters, `r` keypress to open compose had
`msg_type` set to undefined which shouldn't be the case ever as
we always expect msg_type to be defined when compose is open.
2023-10-17 10:34:48 -07:00
Aman Agrawal a814b4f320 inbox: Use app background color.
Search input still has the same background color.
2023-10-17 10:34:48 -07:00
Aman Agrawal c152cb55a5 inbox: Fix empty text visible with visible unread rows.
If the last returned value of `insert_stream` was false, `has_topics_post_filter`
was false and hence this empty text was visible.

We only need one of the inserted streams to visible to hide the empty text.

Reproducer:

* Mark all messages as read.
* mark one message in denmark as unread.
* mute #support (any stream that would come later to denmak alphabetically)
* sent a message support from a different user while inbox is open.
2023-10-17 10:29:45 -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 0c146d21e3 overlays: Rename "modal-bg" class to "overlay-container".
This commit renames "modal-bg" class to "overlay-container"
since we use this class only for overlays and this seems a
better name.
2023-10-17 10:28:50 -07:00
Sahil Batra b3d9f5a419 overlays: Rename "modal-body" class.
We use "modal-body" class in informational overlays and
"About Zulip" overlay. For informational overlays, the
class is used on the element acting as scroll container
so we just rename the class to "overlay-scroll-container".

For "About Zulip" overlay, we do not support scrolling
so "overlay-body" seems a better class name.
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
Anders Kaseorg 858f8f1e48 settings_profile_fields: Remove wrong $ prefix for non-jQuery variable.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-16 17:03:53 -07:00
Anders Kaseorg 8a837320a9 e2e-tests: Remove now-unnecessary StackFrame cast.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-16 15:00:55 -07:00
Anders Kaseorg ccb492a75a e2e-tests: Fix stack traces from Puppeteer page errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-16 15:00:55 -07:00
Anders Kaseorg 8ebcaddfd9 Revert "recent_view_ui: Avoid non-contiguous rows in recent view."
This reverts commit 2348d6f1f9.
2023-10-16 13:57:02 -07:00
Sahil Batra effc9c366a user_profile: Show tooltip when removing last user from private stream.
We now show tooltip on "Unsubscribe" button in user profile modal
if the stream is private and the user is last user in the stream
mentioning that user should use stream settings to unsubscribe.
2023-10-16 13:37:23 -07:00
Akarsh Jain 545c4caa05 stream: Show warning when admin removes last user from a private stream.
This commit adds a confirmation modal that appears when an administrator
attempts to unsubscribe the only user currently subscribed to a private
stream. The modal includes a warning message explaining that the private
stream will be automatically archived after unsubscription.

Fixes #24025.
2023-10-16 13:37:23 -07:00
Sahil Batra 052299f056 streams: Update modals shown on removing user from private stream.
This commit adds "?" to the heading of modal shown when unsubscribing
user from private stream and adds a link to help documentation for
archiving streams. This commit also refactors the code such that we
can use the same template to show modal when unsubscribing others
from private streams.
2023-10-16 13:37:23 -07:00
Aman Agrawal 03ea1ce528 recent_view_ui: Fix quick multiple page downs resulting in errors.
Fixes #27209

Since post_scroll__pre_render_callback is called to set
the correct focus, we don't need to set focus again here.

This was happening because `set_table_focus` relies on rows
being already rendered in the DOM which is not the case with
page down since rows are still being rendered by list widget
as we scroll down.

This code was the source of the error:
```
    if (new_scrollTop >= table_height) {
        row_focus = topics_widget.get_current_list().length - 1;
    }
```

row_focus set here is not rendered yet, hence making set focus
on search box.

But, since we set focus on table if user is scrolling, this
sets focus back on the table.
2023-10-16 13:25:16 -07:00
Aman Agrawal 2348d6f1f9 recent_view_ui: Avoid non-contiguous rows in recent view.
Fixes #27207

The recent view's data sources are mainly all_messages_data,
but if you click into a stream via the left sidebar that has
no recent conversation history, one can reliably reproduce that
some of those conversations will end up being displayed in the
recent view, despite not being temporally contiguous with what
it has data for.

To avoid it, we only process messages fetched for all message data.
2023-10-16 13:25:15 -07:00
Aman Agrawal 2d4d4b86eb left_sidebar: Fix click handler selector for all private messages.
The previous logic did not correctly handle clicks that were in the
tiny spaces inside the link tag but outside the icon element.

Fixes #25647.
2023-10-16 13:13:19 -07:00
Bhavesh Vasnani eb81a4f21f left_sidebar: Make toggle DM section keyboard accessible. 2023-10-16 13:11:42 -07:00
Anders Kaseorg b86b91f96d global: Remove type stub for Bootstrap modal.
Commit 747b62d050 (#27124) removed the
code.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-16 13:07:47 -07:00
Anders Kaseorg d8dcec6853 user_deactivation_ui: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-16 13:06:54 -07:00
Anders Kaseorg 4d6a36ecec people: Sharpen User type.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-16 13:06:54 -07:00
Anders Kaseorg 94934f49f9 webpack_public_path: Replace with webpack 5 publicPath: "auto" setting.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-16 10:36:27 -07:00
Aman Agrawal b605042312 compose_setup: Hide compose formatting popover clicking an option.
Fixes #27015
2023-10-15 19:51:04 -07:00
evykassirer 34ceafadd5 recent view: Add button to fetch more conversations.
We add a new timerender format for this context, where there's plenty
of space.

Fixes: #18461
2023-10-13 16:14:55 -07:00
Prakhar Pratyush e01ffba143 settings: Add default typing indicator user settings.
This commit adds two settings to 'SETTINGS / DEFAULT USER SETTINGS':
* Let recipients see when a user is typing direct messages
* Let recipients see when a user is typing stream messages
2023-10-13 15:30:49 -07:00
Sahil Batra 0c357f990d stream_settings: Fix tooltip behavior on subscription button.
The tooltip was shown on the "Unsubscribe" button even after
closing the modal without unsubscribing when trying to
unsubscribe from a private stream. This commit fixes it by
setting the trigger to "mouseenter".

We fixed similar issue in #25381.
2023-10-13 11:08:54 -07:00
m-e-l-u-h-a-n 69b2c1143a stream settings: Fix tooltip for sub_unsub_button on right pane.
There was no tooltip shown for toggle subscription button
when it was disabled.

A tooltip with appropriate message is added to this button
when it is disabled in case of private streams and user
cannot use it to toggle subscription.
2023-10-13 11:08:54 -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
Ganesh Pawar 4491756845 stream_edit: Disable add button when input field is empty.
Fixes #19507.
2023-10-12 18:24:05 -07:00