Commit Graph

5746 Commits

Author SHA1 Message Date
Sayam Samal e4f1156bea condense: Dynamically render content for message length toggle.
This moves the content inside `message_length_controller` to a new
handlerbars template `message_length_toggle.hbs`, and dynamically
renders the content based on the message length.

Since the majority of the messages aren't collapsed/condensed, this
change should improve the initial rendering of the message list.

Fixes #31133.
2024-08-29 15:52:08 -07:00
Prakhar Pratyush 656c65c74c edit_history: Remove 'prev_rendered_content_version' field.
This commit removes the 'prev_rendered_content_version'
field from:

* the 'edit_history' object within message objects in the
API response of `GET /messages`, `GET /messages/{message_id}`
and `POST /zulip-outgoing-webhook`.
* the 'update_message' event type

as it is an internal server implementation detail not used
by any client.

Note: The field is still stored in the 'edit_history' column
of the 'Message' table as it will be helpful when making
major changes to the markup rendering process.
2024-08-29 15:37:12 -07:00
Sayam Samal c51bd1eab8 message_list: Conditionally render message edit form container element.
This commit moves the placeholder elements for the message edit form,
to `message_edit_form.hbs`, so they are conditionally rendered only
when a message is being edited, rather than being present for every
message in the list.

Fixes #31134.
2024-08-29 13:32:28 -07:00
Alex Vandiver b8e4bdccd8 postprocess_content: Un-URI-escape filename in title.
The filename contains URI-escaped characters, which do not need to be
escaped for safety -- they only make the filename in the tooltip less
readable.
2024-08-29 13:29:33 -07:00
sujal shah 333eedb351 stream_settings: Add text in the left panel.
Display "No channels match your filter" in the left panel
when no matches are found for filter queries in
"Subscribed", "All channels" and "Not subscribed" tabs.

Fixes #18332.
2024-08-28 14:23:46 -07:00
sujal aafcd43038 stream_settings: Show disabled create stream button and text.
Now user who don't have permission can see disabled stream create
button with message.
2024-08-28 14:23:46 -07:00
Lauryn Menard d54ca85de2 activity: Add view to see the ledger entries for a customer plan.
Adds a link to the plan ledger view in the current plan information
shown in the support views. Link is not shown if the plan is 100%
sponsored, e.g., the Community plan.

Adds a formatted header area to the activity table template so
that it's easy to add useful information to these activity views.
2024-08-28 14:12:36 -07:00
Varun Singh 3d6dcf8fe5 compose_fade: Remove duplicate `AllVisibilityPolicies` type. 2024-08-28 11:02:26 -07:00
Varun Singh 51ff57f1bf settings_config: Rename type`ColorSchemeDetails` to `ColorSchemaValues`. 2024-08-28 11:02:26 -07:00
Jaimin Godhani 243b57154b settings: Rename user_display_settings to user_preferences.
Fixes part of zulip#26874.
2024-08-28 11:01:02 -07:00
adnan-td e23d863981 narrow_banner: Fix message view banner for dm with deactivated user.
Previously the empty view banner for DM with any recipients
contained "Why not start the conversation".

For deactivated users/bots, we are now not displaying it.
2024-08-27 15:58:29 -07:00
adnan-td 120cfa8987 narrow_banner: Refactor recipient_user in direct message. 2024-08-27 15:58:29 -07:00
Sayam Samal ccb65795d9 user_card_popover: Display bot role conditionally in user card. 2024-08-27 15:52:39 -07:00
Sayam Samal 96a105b315 bots: Display bot role in lowercase in user card and user profile modal. 2024-08-27 15:52:39 -07:00
Sayam Samal 051221002a user_profile_modal: Display detailed bot role in the "Role" field.
The "Role" field previously only displayed "Bot" for the  non-system
bot users, this commit adds the detailed bot role to the "Role" field
in the format "Bot ({role})".
2024-08-27 15:52:39 -07:00
Sayam Samal 4cdd484755 user_card_popover: Display bot owner user card popover as an overlay.
This commit displays the bot owner card as an overlay in the middle of
the screen, like we do for mobile screen sizes where the reference
elements are hidden.

This also hides the bot user card when it's bot owner card is opened.
2024-08-27 15:52:39 -07:00
Sayam Samal adbfb35bb7 user_card_popover: Display bot's role in bot user card popover.
As a follow-up to the previous commit which repositions the bot owner
field, this commit adds the bot's role in the format "Bot ({role})" to
the previous position of the bot owner field in the bot user card.
2024-08-27 15:52:39 -07:00
Sayam Samal 5590c704ca user_card_popover: Reposition bot owner field and display as user pill.
This commit repositions the bot owner field from below the bot’s name to
align with the user fields, providing more space for the newly added
bot owner user pill.
2024-08-27 15:52:39 -07:00
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