This commit changes the code in such a way that the
"Start new conversation" button open the compose box with the channel
picker open, as we do when no channels is selected.
Fixes#28410.
Co-authored-by: Kunal Sharma <v.shm.kunal@gmail.com>
We add a variable `browser_time_zone` to track the same
separately from `display_time_zone`.
This is used to check whether the user profile time zone matches
the browser's time zone, as a part of #16957, and will later be
used in #16958.
We also add methods to check whether a given timezone is the same
as that of the browser, making use of the browser's own
canonicalization process.
Tests are added to ensure that the time zone comparison
logic works for timezones observing DST.
Fixes part of #16957
Added a checkbox to toggle the option to automatically offer
to update the time zone with the browser time zone,
which is handled by the user profile field
"web_suggest_update_timezone".
A tooltip is also attached explaining the feature.
Fixes part of #16957
Removes deprecated `user` object from reactions objects returned by
the API as it is redundant because of the presence of `user_id` field in
the API and is not used by any clients now.
This commit prepares for a future change where the logic
will switch from returning "topic_jump" in
`tokenize_compose_str`, which causes the typeahead to close,
to returning the sliced token starting from '#'.
A test has been updated to validate the change.
To accommodate typeahead triggers for long stream and
topic names, the token limit is increased from 25 to 40
characters.
In the right side-bar, the popover states "Active x minutes ago",
even though the user could have been idle before going offline.
In that case we are stating something false, as the user was not
"Active x minutes ago", they were "Idle x minutes ago". Always
prioritizing the active_timestamp if possbile rather than taking
the max of active_timestamp and idle_timestamp fixes this issue.
* css: Extract invalid input outline and shadow colors to variables.
We will use these colors in future for input pills and it would be
convenient to have them in a variable.
* group_setting_pill: Show outline on invalid input.
We could have manipulate the class directly from user_group_pill. But
it felt better to have `show_outline_on_invalid_input` as a param for
the input_pill prototype since we can have a consistent error state for
other pill input boxes if we want to.
* input_pill: Widget should not show as pending after pill creation.
* group_settings: Disable save changes button if pill widget is pending.
This will disable the button for group, realm and stream group settings.
* user_group_create: Don't go to next step with pending group widget.
We just show the red outline and shaking animation as an indication that
a group widget setting is pending when the user tries to go to the add
members step.
* stream_create: Don't go to next step with pending group widget.
Fixes#32113.
We just show the red outline and shaking animation as an indication that
a group widget setting is pending when the user tries to go to the add
subscribers step.
This commit adds code to live update the membership status text
when a user is added or removed from a group that is subgroup
of the group opened in the right panel of groups UI.
We now mention if user is member of the group in the "Members"
tab, also including the details about whether the user is direct
member or is member by being direct member of one of the subgroups.
Forward message starts a new message with the quoted context
(message or selection).
The compose box opens with then channel picker open and no topic.
Also added documentation about this feature in the help center.
Fixes part 2 of #31953
'Quote message' is a more accurate decription, as this option inserts
the quoted text into whatever message you're composing or editing;
it does not necessarily start a new reply.
Fixes first part of #31953.
Adds a message length limit indicator similar to the one in the compose box.
The tooltip message for the disabled save button now appears dynamically
based on whether the message exceeds the length limit or the editing time
has expired.
Fixes#25271.
Refactors `check_overflow_text` and `validate_message_length` functions.
This commit ensures that there won't be any change in the existing UI
of the compose box with the refactoring of the above functions.
id_field_name was being used only to set the initial dummy
values for realm settings. We can directly add "_id" to the
setting name instead of having an extra id_field_name field.
As we now allow anonymous groups and settings can be set to any
set of users, there is no benefit in not allowing a setting to
be set to "Owners" group.
This is a followup to #31965 where we added
support for a new syntax for message links.
The frontend markdown processor didn't local
echo the syntax properly, resulting in a
rendering glitch in the messages.
If the user is not a direct member, but a member via a subgroup, we will
show the list of subgroups beloging to that group which the current user
is a direct member of in a tooltip. The cursor on the checkmark will be
default in this case instead of a pointer.
In `Group settings` -> `Your groups` and `User Profile Popover` -> `User
groups`, we only listed groups that a user was a direct member of. Now,
we will also list groups that a user is not a direct member of, but
associated via a subgroup.
Fixes#32486.
We already allow a user to join the group if they can add members
to that group in the API, but it was not allowed in the UI. This
commit fixes the UI.
Earlier, user groups with deactivated users or empty groups would
show up in the typeahead suggestion.
This commit removes empty user group while iterating over each group
items.
Fixes: zulip#30890.
This commit allows users to be assigned to custom groups when
inviting them to join Zulip, similar to how channels are handled.
The implementation follows a similar pattern for adding pills,
ensuring consistency, as user groups and channels are parallel
in nature.
Fixes#24365.
THere's only one call to this function, which should have
a defined `sub`, so we can enforce this through typescript
instead of doing an `undefined` check.
This helper function is only ever used to describe the current view,
so it might as well be in the module for such views.
Also added the test coverage for "is_search_view".
We do not allow realms on a limited plan to create groups. This commit
adds a banner to upgrade to the can_create_groups org setting and
disables editing it on the backend.
This commit also adds a new method called
`disable_group_permission_setting` to easily disable similar settings.
Dropdown widget in compose box and in message move modal should
not show archived streams in dropdown as we do not allow sending
messages or moving messages to archived streams.
We need a more focused audit of code for fixing other things
where archived streams are shown.