Before sending typing notifications to the server, if the realm
requires topics for channel messages, make sure that the topic
string is not an empty string in the compose box.
Previously, when the guest role was selected in the Invite modal and
guests were restricted from viewing all other users, there was no
indication of how many users the invited guests would be able to see
once they joined.
This commit resolves that issue by adding a note in the Invite modal
that dynamically informs users of the number of visible users.
Fixes#31159.
Previously, these were only shown for Mac OS users and replaced
the "Home", "End", "PgUp" and "PgDn" shortcuts. But as this really
depends on the keyboard the user is using (there are Mac keyboards
with the above keys), we instead show both options in our web app
and help center documentation on keyboard shortcuts.
The tooltip for the "Scroll to bottom" button will now always show
"End" for all users. Previously, it showed a "Fn" key option for
Mac users.
Fixes#31815.
'realm_upload_quota_mib` is updated when `plan_type` changes.
Earlier, we were including 'upload_quota' to update
`realm_upload_quota_mib` in extra_data field of 'realm op: update'
event format when property='plan_type'.
This commit migrate those two parameters to `realm op: update_dict`
event format.
* None of the clients processes these fields, so no compatibility
code required.
* Renamed `upload_quota` to `upload_quota_mib` as it better aligns
with our goal to encode units in the client-facing API names.
Also, it helps to avoid extra code to update 'realm_upload_quota_mib`
in web client, web client simply aligns with
'realm["realm_" + key] = value'.
Earlier we use to restrict admins, moderators or members of a group to
manage that group if they were part of the realm wide
`can_manage_all_groups`. We will not do that anymore and even
non-members of a group regardless of role can manage a group if they are
part of `can_manage_all_groups`.
See
https://chat.zulip.org/#narrow/stream/101-design/topic/Group.20add.20members.20dropdown/near/1952902
to check more about the migration plan for which this is the last step.
Fixes#25942.
Users with permission to manage the group (either on the group level or
realm level) should be able to add members to the group without being
present in can_add_members_group.
Earlier, only public data export was possible via `POST /export/realm`
endpoint. This commit adds support to create full data export with
member consent via that endpoint.
Also, this adds a 'export_type' parameter to the dictionaries
in `realm_export` event type and `GET /export/realm` response.
Fixes part of #31201.
`$(".buddy-list-subsection-header").children()` has length more often
than I had thought. Using the narrow filter is more direct way of
managing this state.
We previously auto-mocked this out of expediency, but that made it
impossible to test anything that uses the Zod schemata in the same
module.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This should work because all the events are either `change` events or
`click` events on elements without children. This change is being made
to make typescript migration easier, ecause we can type `this` more
easily than `e.target`.
On a fresh render of a narrow if the view doesn't scroll,
`update_sticky_recipient_headers` is not called. So, we need call
it after we have scrolled to the message we want to select.
Previously, only spaces were used as word separators when searching
for topics. This meant that searching for "support" would not find a
topic named "topic_support" or "topic/support," which could lead to
unexpected results.
To address this, hyphen (-), underscore (_), colon (:), and slash (/)
have been added as additional word separators for topic filtering in
the left sidebar, as these characters are commonly used as separators
in topic names.
Fixes: #31844
Before, the message reactions section along with the add reaction button
was being rendered for every message even when there were no reactions
present - this led to additional DOM cost.
This commit adds the message reactions section only when there is
at least a single reaction on the message, and follows up with a cleanup
of the message reactions section when there are no reactions.
Fixes#31137.
Co-authored-by: Anmol-dev45 <basnetanmol2020@gmail.com>
Previously [{operator: "topic", operand: "one\xa0two"}] would be
unparsed to "topic:one\xa0two" which parses as [{operator: "topic",
operand: "one"}, {operator: "search", operand: "two"}], leading to
exceptions in the search pill system.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
Previously, the "stream_topic_history" used to store unacked float
message ids as well in its "max_message_id" of stream and
"message_id" of topic histories.
This commit updates it to rather store only the acked message ids
here, and rather use the "echo_state" module so as to look up
for unacked messages in case of looking for recent topics, or
max message id in functions.
Previously, when `insert_local_message` was called, the
data structures in the `echo_state` are updated with the new
local messages after calling `insert_new_message`. This would
update the stream sidebar before even updating the `echo_state`
with the new local messages.
This commit introduces `track_local_message`, which basically
updates the `echo_state` data structures with the local
message before actually updating the stream sidebar.
This is a preparatory commit to update stream_topic_history
to only contain acked message ids.
This commit refactors the `ensure_channel_topic_terms` of filter.ts.
Previously, this method used to add channel and topic terms, with
operands as placeholders in case the `with` narrow doesn't have
channel-topic terms.
This commit updates it to rather correct the narrow with the right
terms in case the channel-topic terms are missing in the `with`
narrow, but leave it as it is in case the channel-topic terms are
present, so that it can later be corrected if the channel-topic
terms are not pointing to the right conversation.
This was causing a bug where the participants weren't necessarily
all getting rendered, specifically when there were many subscribers
to a channel, because we render users in batches as buddy list
scrolls, and those users would only show up after some scrolling.
This fix makes sure we always load the participants first.
We create an unnamed user group with just the group creator as it's
member when trying to set the default. The pattern I've followed across
most of the acting_user additions is to just put the user declared
somewhere before the check_add_user_group and see if the test passes.
If it does not, then I'll look at what kind of user it needs to be set
to `acting_user`.
We also add the exception for the group creator to be able to edit their
group in this commit. This exception was added in the backend in earlier
commits.
This is helpful for when a user wants to delete multiple pills
in a row, now that a pill needs to be highlighted before it can
be deleted.
It makes more sense intuitively for the previous pill to be selected
after backspace, since the direction of deletion is backwards. We
still potentially focus next() if there is no previous pill, which
is most helpful when the input element has no more pills left, since
this focuses the text field.
Select the pill on the first backspace and delete the whole pill on
the second backspace. If the pill is already highlighted from
left-pressing, then backspace would delete it right away.
We're making this change because it can be quite annoying to
re-type out a pill that's accidentally deleted, and users might
think pills are editable and accidentally delete the whole thing
with a backspace stroke.
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.
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>
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.
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.
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.
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.
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>
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.