Commit Graph

5728 Commits

Author SHA1 Message Date
sujal shah 8cc4252062 settings: Convert name to pills in custom emoji section.
previously, author names are displayed in plain text, now
they are converted to pills.

Fixes #30990.
2024-08-27 13:22:34 -07:00
Pratik Chanda 64a9f83473 compose_box: Fix order of group pm recipient pills on focus.
Earlier when compose box was opened or narrowed to pm, the recipient
pills were sorted according to user email strings instead of their
full names which was inconsistent with compose box placeholder text,
recipient row and message header.

This commit fixes the behaviour by introducing a `sort_email`
function to sort emails according to their full names and display
sorted pills.

Fixes: zulip#27375.

Co-authored-by: richardshaju <richardshaju66@gmail.com>
2024-08-27 13:21:16 -07:00
Pratik Chanda c180b25a68 drafts: Fix order of group pm recipients in draft overlay.
Earlier in drafts overlay, the order of pm recipients for the draft
was sorted differently to that of the pm group title.

This commit fixes the behaviour by sorting the drafts pm recipients
using `make_strcmp`.

Fixes part of zulip#27375.

Co-authored-by: richardshaju <richardshaju66@gmail.com>
2024-08-27 13:21:16 -07:00
Pratik Chanda eeae434625 left_sidebar: Fix order of group pm recipients in left sidebar.
Earlier in left sidebar, the recipient names were not sorted
consistently with the message header of the pm.

This commit fixes the behaviour by sorting the recipient names in
left sidebar with `make_strcmp`.

Fixes part of zulip#27375.

Co-authored-by: richardshaju <richardshaju66@gmail.com>
2024-08-27 13:21:16 -07:00
Pratik Chanda 54a7cefede message_store: Fix order of group full names of pm recipients.
Earlier, in group direct message, the full names of group pm recipients
were sorted incorrectly which is used for tooltip on hovering over
recipient row and text placeholder of collapsed compose box. That
resulted in different order of recipient names.

This commit fixes the behaviour by using the `make_strcmp` to sort
the names to show in the tooltip and collapsed compose box.

Fixes part of zulip#27375.

Co-authored-by: richardshaju <richardshaju66@gmail.com>
2024-08-27 13:21:16 -07:00
Pratik Chanda 465b40e7ae filter: Fix order of group direct message recipients on message title.
Earlier, when narrowed to a group direct message, the header title
was sorted with respect to its email instead of their names. This
would result in message header and recipient row having different
order of recipients.

This commit fixes the behaviour by changing the order of the names
passed for the group message header using `make_strcmp`.

Fixes part of zulip#27375.
2024-08-27 13:21:16 -07:00
Pratik Chanda 9f94e6c58d message_header: Fix order of group direct message recipients.
Earlier, the order of recipients in recipient row of group direct
message weren't in the same sorting pattern as that of message
title which would result in inconsistent order of recipient names.

This commit fixes the behaviour in `private_message_header` in
recipient row to sort the names using `strcmp`.

Fixes part of zulip#27375.

Co-authored-by: richardshaju <richardshaju66@gmail.com>
2024-08-27 13:21:16 -07:00
opmkumar b9425d4d10 left sidebar: Improve how starred message count is hidden.
Fixes #30898.
2024-08-27 13:08:29 -07:00
Karl Stolley cd88f4421b left_sidebar: Better handle bracket with resolved topics. 2024-08-27 13:03:55 -07:00
Karl Stolley de69424a81 left_sidebar: Extend bottom bracket for show all topics control. 2024-08-27 13:03:55 -07:00
Karl Stolley 2374c8a8c0 left_sidebar: Add grouping border to channel and topics. 2024-08-27 13:03:55 -07:00
Karl Stolley 65cd772e24 left_sidebar: Adjust gridded rows to match Vlad's design. 2024-08-27 13:03:55 -07:00
Karl Stolley a22aa41367 left_sidebar: Update left sidebar padding for new design.
This also moves the 2px of reduced lefthand padding to the overall
width of the left sidebar, which will keep the left sidebar at its
same width (in other words, the message area will not shift any
further to the left, either).

Fixes #27565
2024-08-27 13:03:55 -07:00
evykassirer 3dd0ef6bf9 message_list_view: Calculate date divider variables before assignment.
This is part of a bigger refactor to calculate message container
attributes just from the message, so that we can create the message
container all at once instead of piecewise, to be able to convert
to typescript.
2024-08-26 08:14:57 -07:00
evykassirer fa4d5bec2c message_list_view: Use clearer variable name for clear_message_date_divider. 2024-08-26 08:14:57 -07:00
evykassirer 3266eda3e9 message_list_view: Calculate group display date with a pure function.
Where "pure function" means that the group's value isn't changed
in this function.

This commit also modifies the function to just take a message.

This is part of a bigger refactor to calculate message list group
attributes and creating the group all at once instead of piecewise.
This is necessary to convert this module to typescript, since a
partially formed group is hard to type.
2024-08-26 08:14:57 -07:00
evykassirer b8bda635b7 message_list_view: Only pass message to same_day.
This is part of a bigger refactor to calculate message container
attributes just from the message, so that we can create the message
container all at once instead of piecewise, to be able to convert
to typescript.
2024-08-26 08:14:57 -07:00
evykassirer e815fbb499 message_list_view: Only pass message to get_timestr.
This is part of a bigger refactor to calculate message container
attributes just from the message, so that we can create the message
container all at once instead of piecewise, to be able to convert
to typescript.
2024-08-26 08:14:57 -07:00
evykassirer 79f8d2ed79 message_list_view: Calculate _get_msg_timestring with only message.
This is part of a bigger refactor to calculate message container
attributes just from the message, so that we can create the message
container all at once instead of piecewise, to be able to convert
to typescript.
2024-08-26 08:14:57 -07:00
evykassirer 017bca56e4 message_list_view: Refactor me message calculation for typescript.
We're going to need to be able to build the message list view
in pieces and put it all together in the end, instead of assigning
values directly to a half-formed object (which is hard to type).

This is part of the work towards that.
2024-08-26 08:14:57 -07:00
evykassirer 1a204ff554 message_list_view: Use util.the for converting JQuery to HTMLElement. 2024-08-26 08:14:57 -07:00
evykassirer 2f77463864 util: Fix same_sender type signature to allow undefined messages. 2024-08-26 08:14:57 -07:00
evykassirer fc0367ff0d message_container: Remove two unused class variables. 2024-08-26 08:14:57 -07:00
evykassirer 44522a6244 message_list_view: Standardize type of dom_updates.html_updates.
When we convert this module to typescript, the type of `rendered_date`
will need to be a valid input to `$element.html`. Elsewhere in this
file, the date is a string. Here it's a JQuery object, which isn't
a valid input, but HTMLElement is, so this commit converts it to that.

I tested this manually and it still renders correctly.
2024-08-26 08:14:57 -07:00
evykassirer 1a47a2ccaa message_list_view: Remove unused parameter to _rerender_header.
This param was added in 7d8d9c1bf9 but
never added to _rerender_header itself.
2024-08-26 08:14:57 -07:00
evykassirer 6c063f4974 message_list_view: Remove unused return statement. 2024-08-26 08:14:57 -07:00
Anders Kaseorg 892f988404 dependencies: Upgrade JavaScript dependencies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-08-26 07:44:14 -07:00
Anders Kaseorg 8196c4f63d eslint: Fix @typescript-eslint/prefer-regexp-exec.
https://typescript-eslint.io/rules/prefer-regexp-exec/

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-08-26 07:44:14 -07:00
Anders Kaseorg e6344bd1f5 debug-require-webpack-plugin: Add null check for TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-08-26 07:44:14 -07:00
opmkumar 8911347cdb hotkey: Add keyboard shortcut to navigate to starred messages view.
This commit adds '*' as a keyboard shortcut to navigate to the starred messages view and the shortcut is documented in various required locations accordingly.
Fixes #31397.
2024-08-23 15:49:31 -07:00
Aman Agrawal 5f6045c878 typeahead: Change icon for wildcard mentions. 2024-08-23 15:43:44 -07:00
afeefuddin f013eb1037 message_fetch: Convert module to TypeScript. 2024-08-23 13:34:13 -07:00
afeefuddin ec19a34089 message_fetch: Pass msg_list_data explicitly to load_messages. 2024-08-23 13:34:13 -07:00
afeefuddin afe405e0ab message_fetch: Avoid variable reuse in narrow transformation logic. 2024-08-23 13:34:13 -07:00
afeefuddin b41a17a1d0 message_lists: Add is_combined_feed_view to MessageList type. 2024-08-23 13:34:13 -07:00
afeefuddin 8741fe92be message_list_data: Update callback parameter types.
Correct the type annotations for the callback function parameter in
set_add_messages_callback.
2024-08-23 13:34:13 -07:00
afeefuddin 17e2d46760 message_store: Rewrite RawMessage type using Zod.
This commit rework RawMessage and it's related type to use
Zod for parsing the data received from the server.
2024-08-23 13:34:13 -07:00
Varun Singh f148a7a3ed popover_menus_data: Convert module to TypeScript. 2024-08-23 13:10:50 -07:00
Varun Singh d86e5eab78 user_topics: Add `AllVisibilityPolicies` to type. 2024-08-23 13:10:50 -07:00
Varun Singh 118c53dfc3 state_data: Type `realm_enable_read_receipts` field. 2024-08-23 13:10:50 -07:00
Varun Singh df395e99eb settings_config: Add type ColorSchemeDetails. 2024-08-23 13:10:50 -07:00
Varun Singh 1ce76e5fbd message_lists: Add field `message_containers` to `MessageListView` type. 2024-08-23 13:10:50 -07:00
Varun Singh 79dbb8dc79 base_page_params: Add `show_remote_billing` field to schema. 2024-08-23 13:10:50 -07:00
Varun Singh fcb9c7be26 widgetize: Fix type of `data` field. 2024-08-23 12:30:27 -07:00
Varun Singh 2cf09602df todo_widget: Convert module to TypeScript. 2024-08-23 12:30:27 -07:00
Varun Singh 9cd41e1c5b poll_widget: Amalgamate 'outbound_data' types for poll-widgets.
This will help in migration of downstream JS code.
2024-08-23 12:30:27 -07:00
Sahil Batra 5c7756e1ef user_profile: Update stream dropdown option value to be of "number" type.
It is better to have stream dropdown option value, which is the ID
of the stream, to be of "number" type.

This fixes the assertion error which occurred when someone tried to
subscribe the user to a stream from user profile modal.
2024-08-23 09:12:43 -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
Sahil Batra 03ec0e1f14 stream-settings: Live update subscribers list correctly.
This commit fixes the live update of subscribers list
on changing can_remove_subscribers_group setting.

Previously, whole members panel, including the pill container
to add subscriebrs, is re-rendered. But the click and input
handlers for the add subscribers UI is not added again after
re-rendering and thus they do not work.

This commit updates the code to just re-render the subscribers
list which is only needed to update the "Unsubscribe" button.
2024-08-23 09:09:03 -07:00
Karl Stolley 27bf68637b global_times: Correct malformed closing tags in overlay. 2024-08-22 09:12:20 -07:00