Commit Graph

1236 Commits

Author SHA1 Message Date
evykassirer 471d042a11 message_notifications: Convert module to typescript. 2024-09-30 12:07:27 -07:00
evykassirer 6c390551de unread: Remove useless message_unread function. 2024-09-30 12:07:27 -07:00
evykassirer 76a602842d message_list: Make data required in the constructor. 2024-09-24 17:16:15 -07:00
evykassirer 3da3661a34 message_view: Access window.history.state through browser_history. 2024-09-24 15:43:27 -07:00
Sahil Batra c4026615ae user_group_pill: Accept setting_type as parameter in typeahead_source.
We currently use the pills UI only for can_manage_group setting so
it is fine to pass setting type as "group" directly to
get_realm_user_groups_for_setting, but it would be better to just
accept setting_type as parameter in typeahead_source and pass that
to get_realm_user_groups_for_setting as other settings will also
use the pills UI in future.
2024-09-24 14:36:45 -07:00
tnmkr ddecba4e1c custom_profile_fields: Add "editable_by_user" setting.
This new property allows organization administrators to specify whether
users can modify the custom profile field value on their own account.
This property is configurable for individual fields.

By default, existing and newly created fields have this property set to
true, that is, they allow users to edit the value of the fields.

Fixes part of #22883.

Co-Authored-By: Ujjawal Modi <umodi2003@gmail.com>
2024-09-23 18:09:38 -07:00
evykassirer 5c6e3a7aac buddy_list: Refactor render code for readability. 2024-09-23 15:41:00 -07:00
evykassirer cd5a61eb52 buddy_list: Rename list element to not be named container.
This was confusing because there are other elements named
e.g. "#buddy-list-users-matching-view-container", which are
distinct from "#buddy-list-users-matching-view", and the
elements with the latter id should not be named with container
in the variable name.
2024-09-23 15:41:00 -07:00
Anders Kaseorg d18959b1b6 tests: Remove unused sloppy_$ flag.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-09-20 16:47:12 -07:00
Pratik Chanda bc623369c3 compose_recipient: Remove own user pill if other recipients are added.
This commit removes own user pill from recipient box if other
recipients are added.

Fixes part of zulip#31629.
2024-09-20 15:31:09 -07:00
Pratik Chanda 967243b2db composebox_typeahead: Move wildcard string to secondary in @-mention.
Earlier, in typeahead suggestions for wildcard mention, we rendered
wildcard string as primary text inside parentheses.

This commit separates the wildcard string as secondary_text to
be rendered without parentheses using styles like channel description.

Fixes: zulip#31245.
2024-09-20 15:16:21 -07:00
Pratik Chanda c84ff59dc9 composebox_typeahead: Add info field to slash command as secondary text.
Earlier, in typeahead suggestions for slash command, we render
supplementary info as primary text inside parentheses.

This commit separates the supplementary info as secondary text to
be rendered without parentheses using styles like channel description.

Fixes part of zulip#31245.
2024-09-20 15:16:21 -07:00
Anders Kaseorg 203315958b test-js-with-node: Keep running after some tests fail.
This lets us collect all failures rather than the first failure in
each process.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-09-20 15:13:26 -07:00
Aman Agrawal ea4e48afa7 filter: Add function to check if we can show the next unread button.
These function will be used when we add `Next unread conversation`
button below message list.
2024-09-20 11:54:18 -07:00
Aman Agrawal 56d4bad92b filter: Fix filter variable not updated as per new terms. 2024-09-20 11:54:18 -07:00
evykassirer 3e2efc736c stream_data: Add test cases for getting stream id from slug. 2024-09-19 19:52:18 -07:00
evykassirer 5ddcbb8516 buddy_list: Show offline subscribed users for small channels in big orgs.
Previously, for big orgs, we hid all offline users in the buddy list to cut down
its size. But this can be weird for small channels where you might want to see
who's in the channel. This commit makes a tweak to show offline users in big
orgs for channels of size <= 50.
2024-09-19 15:43:28 -07:00
evykassirer deb5d90941 message_list: Convert module to typescript. 2024-09-19 15:31:16 -07:00
Alex Vandiver 94dad72b75 upload: Use @uppy/tus to upload files through tusd.
Replace the XHRUpload plugin for Uppy with the Tus plugin, to make use
of the new tusd endpoint.  This allows for resumable files, as well as
files which are larger than comfortably fit in memory (the source of
the old 25MB limit).

MAX_FILE_UPLOAD_SIZE is still applied, but can safely be raised above
25MB.

Fixes: #9391.

Co-authored-by: Brijmohan Siyag <brijsiyag@gmail.com>
2024-09-19 11:37:29 -07:00
Sahil Batra 8068b6e55e group_setting_pill: Add code for showing typeahead.
This commit adds code to show typeahead for group setting
pill container. We add a separate function as we only
want to show groups and users in the typeahead and the
options are also sorted in a different order compared
to other typeaheads.
2024-09-19 09:08:33 -07:00
Sahil Batra 053686669a composebox_typeahead: Use query_matches_group_name to match group.
Though we can use query_matches_name for groups as we do not allow
system groups in the composebox typeahead and the other groups have
same display_name and name values, but still would be better for
consistency.

And with this change, query_matches_name function is only used for
streams, so updated that accordingly.
2024-09-19 09:08:33 -07:00
Sahil Batra def78ddf09 user_groups: Do not show "role:" prefix for system groups.
Instead of showing the actual names like "role:everyone",
"role:moderators", etc. for system groups, we show
"Everyone", "Moderators", etc. for system user group in
pills, typeaheads and popovers.

Though system groups are not shown in typeahead as of
this commit, we update the typeahead code as well to
not conside "role:" prefix while matching with the
query as we would soon show system groups in typeahead
when we would add new UI for group-based settings.

Previously, only "role:everyone" group was shown as
"Everyone" in popover and pills but for other system
groups their original names for shown and this commit
changes that behavior to be same for all system groups.

The original display_name field for
settings_config.system_user_groups_list objects, which
was used for dropdown widgets, is also renamed so that
we can use display_name field for the names to be used
in other places.
2024-09-19 09:08:33 -07:00
Anders Kaseorg 97ffccb45f reload: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-09-18 15:31:41 -07:00
Anders Kaseorg 16d37eb80a tests: Call reload.is_stale_refresh_token correctly.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-09-18 15:31:41 -07:00
Sahil Batra 5f3a8334be user_groups: Do not allow deleting user groups. 2024-09-18 13:41:13 -07:00
Sahil Batra 6a739e263f user_groups: Allow deactivating groups from webapp. 2024-09-18 13:41:13 -07:00
Sahil Batra c53563d0e7 user_groups: Handle deactivated groups in webapp. 2024-09-18 13:41:13 -07:00
evykassirer dba1af84e0 filter: Use stream id instead of stream name. 2024-09-18 13:08:14 -07:00
Sahil Batra 7a6135371e settings: Handle guests separately for group-based settings.
This commit adds code to handle guests separately for group
based settings, where guest will only have permission if
that particular setting can be set to "role:everyone" group
even if the guest user is part of the group which is used
for that setting. This is to make sure that guests do not
get permissions for actions that we generally do not want
guests to have.

Currently the guests do not have permission for most of them
except for "Who can delete any message", where guest could
delete a message if the setting was set to a user defined
group with guest being its member. But this commit still
update the code to use the new function for all the settings
as we want to have a consistent pattern of how to check whether
a user has permission for group-based settings.
2024-09-18 11:51:11 -07:00
Sahil Batra 6482f0c2ea user_groups: Pass correct group object for adding new group to UI.
We previously passed the UserGroupRaw type object received in
the user group creation event to user_group_edit.add_group_to_table
instead of the UserGroup type object.

The add_group_to_table function is called after receiving creation
event only, but other functions called later in the flow are called
at other times as well like when opening edit panel for a particular
group and they expect UserGroup type object, so this commit fixes it.
2024-09-16 16:28:52 -07:00
Sahil Batra f3fafc719f settings: Add function to check permission for anonymous setting group. 2024-09-16 16:28:52 -07:00
sujal shah 614caf111e user_groups: Add `creator` and `date_created` field in user groups.
This commit introduced 'creator' and 'date_created'
fields in user groups, allowing users to view who
created the groups and when.

Both fields can be null for groups without creator data.
2024-09-13 18:44:58 -07:00
Vector73 0cd51f2fea settings: Remove `delete_own_message_policy` realm property.
Removed `delete_own_message_policy` realm property as the permission
to delete own messages is controlled by `can_delete_own_message_group`
setting.
2024-09-12 09:36:02 -07:00
Vector73 28c7a04734 settings: Add `can_delete_own_message_group` realm setting.
Added `can_delete_message_group` realm setting to replace
`delete_own_message_policy` property.
2024-09-12 09:36:02 -07:00
evykassirer c19b3b0826 message_list_view: Simplify type of mention_classname. 2024-09-12 09:34:29 -07:00
evykassirer 93d8db11bf message_list_view: Change moved and modified to pure booleans, not optional. 2024-09-12 09:34:29 -07:00
Sahil Batra e1cfe61452 user_groups: Add API support for deactivating user groups. 2024-09-11 09:43:56 -07:00
Alex Vandiver 38053e9c7c emoji: Convert spritesheets to webp.
This provides significant size savings:

| Emoji set   | png size | webp size | webp/png percent |
| ----------- | -------- | --------- | ---------------- |
| google-blob |  1968954 |   1373350 |           69.75% |
| twitter     |  2972820 |   2149672 |           72.31% |
| google      |  3455270 |   2327834 |           67.37% |

Since these are the largest assets that we ship to clients, it is
worth shaving off every byte we can.
2024-09-11 09:03:47 -07:00
evykassirer 05e58de3f5 stream_data: Get stream id instead of name from slug.
This more closely matches the mobile code.
https://github.com/zulip/zulip/pull/31299#discussion_r1719556337

This shouldn't have any functional changes.
2024-09-10 17:51:39 -07:00
evykassirer b6830ff5df narrow_state: Remove unused search_string function. 2024-09-10 17:51:39 -07:00
Aman Agrawal 8763d55911 message_events: Fix live update for views based on message property.
Fixes #31208
Fixes #14510
2024-09-10 17:28:04 -07:00
evykassirer c02f4ff941 message_list_view: Calculate message_container_variables without the container.
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-09-10 17:20:00 -07:00
evykassirer df6d592d1c message_list_view: Calculate message_edited_vars from just the 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-09-10 17:20:00 -07:00
evykassirer b387ad24fa timerender: Move util.the into render_date. 2024-09-10 17:20:00 -07:00
roanster007 bc384094d3 narrow: Make `with` operator behaviour consistent with API behaviour.
Previously, in presence of `dm` operators, the `with` operator
behaviour in the web client was not consistent with that of
the API. For instance, when `with` points to a stream message,
in presence of a `dm` term, then rather than narrowing to the
corresponding channel of `with` operand, the `with` term simply
used to be ignored, and narrowed to the corresponding `dm`
narrow.

Also, in cases when the `with` used to point to a direct message,
in presence of a `channel` term, then after correcting to the
right narrow, the `with` term used to be removed. The `with`
term would still be needed after correcting the narrow to
maintain consistency between channel and dm conversations.

This commit removes these inconsistencies of `with` in case
of `dm` operators, and makes it consistent to those mentioned
in the api documentation.
2024-09-10 16:29:49 -07:00
opmkumar 719518baba popovers: Add stream-info-popover when channel pill is clicked.
Shows a stream info popover whenever a channel pill is clicked (such
as in the pill widgets for adding subscribers to a channel or
invitations). The stream info popover contains channel icon and name,
channel description and a link to channel settings.

Fixes #30567.
2024-09-10 16:16:53 -07:00
Varun Singh d6c34f64dd tests: Use `make_user` & `make_bot` to create test user & bot. 2024-09-10 16:02:35 -07:00
Varun Singh f9f2c32d21 example_user: Add helper functions to create user. 2024-09-10 16:02:35 -07:00
Varun Singh 4c2bb4dbe3 tests: Rename `test_stream.js` to `example_stream.js`. 2024-09-10 16:02:35 -07:00
Aman Agrawal 21b6bb9887 message_list_data_cache: Update when receiving new messages.
If we receive a message that we can add to the data cache without
talking to the server, we do that, otherwise we remove it from the
cache to avoid us having wrong filter status cached.
2024-09-10 15:58:15 -07:00
Aman Agrawal 5b9a2584c5 message_list_data_cache: Cache MessageListData objects.
We start caching MessageListData objects for the narrows which
user has visited. We restore the cached objects if the filters
match. Also, the cached objects are updated based on events. One
major piece is update path the is pending implementation is the
message move code path.
2024-09-10 15:58:15 -07:00
adnan-td eaaf26e182 buddy_list: Remove deactivated users from right sidebar.
Filter out inactive people from the buddy list in the right
sidebar.
2024-09-10 14:04:26 -07:00
Mateusz Mandera a36f906d1a presence: Add history_limit_days param to the API.
This param allows clients to specify how much presence history they want
to fetch. Previously, the server always returned 14 days of history.
With the recent migration of the presence API to the much more efficient
system relying on incremental fetches via the last_update_id param added
in #29999, we can now afford to provide much more history to clients
that request it - as all that historical data will only be fetched once.

There are three endpoints involved:
- `/register` - this is the main useful endpoint for this, used by API
clients to fetch initial data and register an events queue. Clients can
pass the `presence_history_limit_days` param here.
- `/users/me/presence` - this endpoint is currently used by clients to
update their presence status and fetch incremental data, making the new
functionality not particularly useful here. However, we still add the
new `history_limit_days` param here, in case in the future clients
transition to using this also for the initial presence data fetch.
- `/` - used when opening the webapp. Naturally, params aren't passed
here, so the server just assumes a value from
`settings.PRESENCE_HISTORY_LIMIT_DAYS_FOR_WEB_APP` and returns
information about this default value in page_params.
2024-09-10 13:15:35 -07:00
Prakhar Pratyush 00fb8f3014 settings: Move the user-privacy settings related code at one place.
This commit makes small refactoring to place all the user-privacy
settings code in 'server_events_dispatch.js' at one place and use
a common function 'settings_account.update_privacy_settings_box' to
update the UI.

This also helps in early return instead of executing a lot
of `if` statements related to user-preferences settings.
2024-09-10 09:34:24 -07:00
Alex Vandiver 8bd94b82bf upload: Name the link based on the uploaded filename.
We previously parsed the filename as stored on disk, which is rather
sanitized.  Use as close to the original filename as possible.
2024-09-09 12:40:17 -07:00
Alex Vandiver 8e5cdcc174 upload: Remove impossible undefined-url test and code.
This came in during the initial conversion to Uppy in 5bab2a3762,
but it tests a case which should not be possible according to Uppy's
API, and ours.
2024-09-09 12:40:17 -07:00
roanster007 519614ffbb narrow: Fix last unread when narrowed to a `dm` message using `with`.
Previously, on narrowing to a direct message using the `with`
operator, we used to end up at the last message rather than
the last unread message.

This was because while correcting the narrow using the `with`
operand, we used to consider all the users of `display_recipient`.
This would also include the `current_user`. This is not right because
the unread messages for direct messages are bucketed with a
`user_ids_string`, that does not include the user id of the current
user. Hence, when looked up for the last unread id by the `with`
operator, it used to return undefined.

This is fixed by removing the current user's user id from the user ids
string if current user is not the only display recipient to the
direct message.
2024-09-03 16:35:35 -07:00
evykassirer 58bc98afb5 util: Use blueslip error for util.the instead of an assert. 2024-09-03 13:49:30 -07:00
Shubham Padia 4a7983fad3 css: Use a class for spoiler header text.
Having the :not() rule there affected the performance, see
https://chat.zulip.org/#narrow/stream/6-frontend/topic/CSS.20selector.20performance/near/1920156
for more details.
2024-09-03 10:24:40 -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
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 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
opmkumar b9425d4d10 left sidebar: Improve how starred message count is hidden.
Fixes #30898.
2024-08-27 13:08:29 -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
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
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
Karl Stolley 562e6d6802 global_times: Allow global times to display inline. 2024-08-21 16:02:33 -07:00
evykassirer d9f25d01a1 web: Use util.the for accessing element of single-item lists. 2024-08-20 09:48:15 -07:00
Ujjawal Modi 2e67d88a20 user_groups: Update code to check whether user can edit a user group.
Earlier there was only a realm level setting for configuring
who can edit user groups. A new group level setting is also added
for configuring who can manage that particular group.
Now, a user group can be edited by a user if it is allowed from
realm level setting or group level setting.

This commit make changes in frontend to also use group level setting
in determining whether a group can be edited by user or not and disables
changing the group settings when group cannot be edited by user.
2024-08-20 09:28:05 -07:00
Ujjawal Modi d32f30cedc user_groups: Add function for determining group creation permissions.
Earlier in frontend there was a single function to determine whether
user can create and edit user groups.
This commit adds a separate function for determining group creation
permissions.
2024-08-20 09:28:05 -07:00
Ujjawal Modi 20229d0d3d user_groups: Add can_manage_group field to user_group object.
This commit adds can_manage_group field in user_group
object in frontend and also adds code to update the field
value from server events.
2024-08-20 09:28:05 -07:00
Ujjawal Modi 2505813359 user_groups: Add can_manage_group field to UserGroup objects.
This commit make changes in code to include can_manage_group
field to UserGroup objects passed with response of various endpoints
including "/register" endpoint and also in the group object
send with user group creation event.
2024-08-20 09:28:05 -07:00
evykassirer b1198785be message_edit: Convert module to typescript. 2024-08-19 16:33:04 -07:00
Alex Vandiver 2f2803431d thumbnails: Mark images as lazy-loaded.
Setting `loading=lazy`[^1] tells the browser to defer loading the
image until it is near enough to the viewport to merit loading.  This
can save a great deal of image fetching.

[^1]: https://html.spec.whatwg.org/multipage/urls-and-fetching.html#lazy-loading-attributes
2024-08-16 14:33:25 -07:00
Tim Abbott 8c6d61f4a6 node tests: Improve documentation for message_list_view test. 2024-08-15 18:24:43 -07:00
evykassirer 9b78cc3240 message_list: Reduce _RENDER_WINDOW_SIZE to 250.
The message feed can take long enough to render that
users are locked out of clicking things for a second
or so. This has become especially an issue since we
updated the search bar logic to refresh the message
feed as search terms are added to the search bar.

More details on CZO here:
https://chat.zulip.org/#narrow/stream/101-design/topic/search.20narrow.20live.20update
2024-08-15 18:15:51 -07:00
evykassirer 5607d840e5 message_list_view: Add test helper to calculate move ranges. 2024-08-15 18:15:50 -07:00
evykassirer 6f4b009c90 topic_generator: Use stream id instead of stream name. 2024-08-15 17:16:22 -07:00
evykassirer 5cc5659010 stream_data: Remove unused home_view_stream_names. 2024-08-15 17:16:22 -07:00
evykassirer 90cced31af stream_data: Remove is_stream_muted_by_name to favor stream ids. 2024-08-15 17:16:22 -07:00
evykassirer fd5112fbb2 message_list: Use stream id instead of name in update_trailing_bookend. 2024-08-15 17:16:22 -07:00
evykassirer 9dab566d10 filter: Canonicalize operator before creating parsed term.
We decide what operators are valid when parsing a term by
calling `operator_to_prefix`, but `operator_to_prefix` calls
`canonicalize_operator`, so we need to call `canonicalize_operator`
on the operand we return from `parse`, or else we might end up
with an invalid operator in a parsed term.

Fixes this bug:
https://chat.zulip.org/#narrow/stream/9-issues/topic/valid.20search.20terms.20in.20uppercase.20followed.20by.20.3A.20throwing.20error
2024-08-15 17:13:36 -07:00
Shubham Padia 2b3a41be58 user_card_popover: Show popover on all .messagebox user mention.
Show user card popover for scheduled messages overlay, compose box
preview, message edit preview, message edit history.

`.messagebox` was chosen as the selector since that was the nearest
parent class that was common for all of the above.

`@all` does not have a popover and that's why it will have the same
pointer as its parent element. We also introduce a new class called
`.user-mention-all` for managing css rules specific to that mention.
2024-08-15 16:28:08 -07:00
Prakhar Pratyush ee806c49b9 ui_init: Use OnboardingStep for narrowing on first web app load.
We plan to remove the 'tutorial_status' field from UserProfile
table as it is no longer used to show tutorial.

The field is also used to narrow a new user in DM with
welcome bot on the first load.

This prep commit updates the logic to use a new OnboardingStep
for the narrowing behaviour on the first load. This will help
in removing the 'tutorial_status' field.
2024-08-15 13:31:40 -07:00
Vector73 80969a62e6 settings: Add `can_delete_any_message_group` setting.
Fixes #30717.
2024-08-15 12:03:49 -07:00
roanster007 e104fed6ef echo: Extract the waiting for id and ack into separate module.
This commit extracts the "waiting_for_id" and "waiting_for_ack"
data structures of "echo.js" into a separate module in "echo_state".

This is a preparatory commit so as to be able to use them for
"stream_topic_history" module, without causing import cycles.
2024-08-14 18:24:56 -07:00
Prakhar Pratyush 39c5bb9fa5 user_topics_ui: Fix 'toggle_topic_visibility_policy' behavior.
This commit updates the stale logic in 'toggle_topic_visibility_policy'
function. It was not updated after the addition of 'follow' visibility
policy resulting in buggy behavior.
2024-08-14 13:20:58 -07:00
Prakhar Pratyush cbc3f84be4 hotkey: Fix 'Shift + M' to not work in unsubscribed channel.
Earlier, 'Shift + M' hotkey was working in unsubscribed channels.

This commit updates the logic to make it non-functional. This
helps to keep the UI consistent as we don't offer a way to
change visibility_policy in unsubscribed channels via
recipient_bar_controls or other UI elements.

Note: We don't implement this restriction in server because
we don't delete the user-topic states in db when a channel is
unsubscribed as it helps to retain those states when re-subscribed.
And implementing this restriction at server level can create
a confusion of why such states exists in db when API doesn't allow.
2024-08-14 13:20:58 -07:00
Varun Singh 3dd8a4c6d5 echo: Fix incorrect check for message `topic`.
The actual check should be for `falsy` (to handle empty string)
and not undefined, since topic is an empty string for
private messages.
2024-08-13 09:37:35 -07:00
Varun Singh 2e12d3cd25 user: Drop `is_mirror_dummy` field from 'user' object. 2024-08-13 09:37:35 -07:00
Varun Singh 126d4fb137 echo: Remove support for zephyr mirroring. 2024-08-13 09:37:35 -07:00
Varun Singh 3d01ccbbd5 server_events: Parse `message` recieved from server. 2024-08-13 09:37:35 -07:00
evykassirer 8b19726b82 stream_pill: Use stream id instead of stream name. 2024-08-13 09:04:59 -07:00
Alex Vandiver b89d47a147 avatar: Stop adding &s=50 to Gravatar and Zulip avatar requests.
This parameter is unused for Zulip avatars, and results in a smaller
(pixel-wise) Gravatar than we use for Zulip "small" avatars.  Omitting
the `s=50` parameter results in a 80x80 image, which is closer to the
100x100 image that Zulip thumbnails avatars to.  Ironically, using the
default (larger) Gravatar dimensions also results in _smaller_
responses (in bytes) from Gravatar.
2024-08-13 08:57:08 -07:00
Aman Agrawal 970dd30f96 compose: Fix restoring big drafts freezes the app.
We are using `.val` to set compose box content which is very fast vs
`setFieldText` which is very slow due to it doing a lot of
forced repaints. The major downside of using `val` here is that
user will not able to perform `undo` operation on this which doesn't
seem something user would want to do here.

Note that this effects compose content restored from drafts,
scheduled messages and on reload.
2024-08-13 07:53:30 -07:00
evykassirer 00e74d0de2 search: Move group user remove logic out of input_pill. 2024-08-12 11:37:31 -07:00
Sahil Batra 506ead4468 settings: Use new group setting to check web-public stream creation.
This commit updates code in webapp to use new group-based setting
for checking web-public stream creation permission.
2024-08-01 22:49:33 -07:00
Sahil Batra e71c3007f6 tests: Refactor group settings test in settings_data.test.ts.
This commit refactors the common function used for test in
such a way that we can test more cases for a group setting
along with the ones tested by the common function.
2024-08-01 22:49:33 -07:00
evykassirer 271efb70fa input_pill: Remove InputPillItem now that details are handled elsewhere. 2024-08-01 17:31:59 -07:00