The `next_is_same_sender` has no effect on the CSS of the message
displayed and the JS changes seem to have no effect too.
See cc8021a742 for more details.
The English word "at" was manually appended to the string output of
datetime-related functions to generate the string shown in the tooltip
when hovering over the timestamp of a message. Use the translated form
"{date} at {time}" instead, as found elsewhere in the codebase.
Disables the deactivate account button in the user's account and
privacy settings tab if they are the only active organization owner.
Adds a tooltip when hovering on the deactivated button to let the
user know why the button is disabled.
The backend already returns an error for self account deactivation
requests if the user is the only organization owner.
Adds `avatar.build_user_avatar_widget` to the updates done in
`settings_account.update_avatar_change_display` when the user
has permission to change/delete their avatar.
For the case where a user has their personal account profile
settings open while the organization or user's permissions are
changed, `user_avatar_widget_created` boolean is added to
`settings_account.js` to track whether the widget and handlers
have been created so that live updates don't rebuild the
existing widget and handlers.
Also, updates `avatar.build_user_avatar_widget` to return early if
the user cannot change their avatar. This pattern better matches
the other instances where we use the direct upload widget for the
organization icon and logos.
The "day" and "night" color scheme names were updated in #20371,
but the organization profile settings tab still has had the old
names for the two types of wide logos.
Updates "Day logo" to be "Light theme logo" and "Night logo" to
be "Dark theme logo".
Adds hiding any elements with the `image_upload_button` class in
the organization profile (icon and logos) to the live updates in
`settings_org.maybe_disable_widgets`, so that any role changes
that remove admin permissions will update these images so that
they no longer appear able to be updated / deleted.
The `settings-info-icon` with the tooltip for the user avatar
section was removed in commit 103db2afaf. This removes the changes
to that tooltip in `settings_account.update_avatar_change_display`.
Instead of hiding or showing the `image_upload_button` in that same
live update function, we now add or remove the `hide` class, which
in the previous commit has a specific CSS hover rule for the image
upload widget.
Also adds test coverage for the `is_admin` case for this setting
because administrators can always change their own avatar even if
the organization has disabled avatar changes.
If there is no `disabled_text` provided for the image upload widget,
then there is no need to have the `image_disabled` div rendered in
the template. This allows the hover CSS rules to be more general for
the image upload widget in general.
Adds a check for `disabled_text` around the `image_disabled` div
element in `image_upload_widget.hbs`.
Also, changes `image_upload_background` class to
`image_hover_background` so that it more accurately describes what
the CSS rule is for and why it's used in both the `image_disabled`
div and the `image_upload_button` div.
The `hide` CSS rule in `app_components.css` was being overwritten
by the more specific rules in `image_upload_widget.css`, which
meant that when changing the inage was disabled the hover text for
updating or deleting the image was still visible.
Adds `hide` class (and therefore more specific rule) to
`image_upload_widget.css` for when this text should be display
none.
Fixes#23844.
This only set the last_message CSS class, which is no longer used for
styling or JavaScript code.
(The calculation was also wrong, in that new messages arriving would
not cause it to be removed from the previous message with the
last_message class).
The last_message CSS class didn't mean what it said it did, due to
issues with live update.
Further, this logic was poorly written, with `$message` changing types
from a .message_row to a .recipient_row for now apparent reason.
I was able to reproduce at least one bug where the `v` shortcut would
not correctly open the lightbox that is fixed by this rewrite.
Fixes zulip#19759
Before grid, there was overlap of action buttons and text (photo 1).
With grid, there was just very little space for messages (photo 2).
With this commit, the message gets a bit more space (photo 3).
This helps us add more width to the content column of message
on narrow widths. Note that it will still always be less than
before grid, since we are explicitly preventing overlap.
Using grid layout moves us away from fixed widths
and position for items where possible, which will
make it easier to make messagebox changes without
breaking formatting.
Visual changes expected in this commit:
- When the action buttons overlap the message content,
it will no longer visually overlap but completely cut off
the content — which is good, but means the messages can’t
be as wide on narrow width views. There’s a slight improvement
to this in an upcoming commit.
Also removes the `last_message` CSS, which was busted due to the
`last_message` calculation not correctly being updated for new
messages arriving, and didn't improve styling.
Having the class at the top of message DOM structure when the
user is editing a message, helps apply css when user is editing
a message.
Short prep commit for the next commit; no visible changes
We now use the undo supporting `insert` function from the
`text-field-edit` module to update the text after autocompletion,
instead of just resetting the value of the textarea / input, which was
not undo-able.
So that the undo history seems sensible, we replace only the minimal
diff between the text before and after autocompletion. This ensures
that only this diff, and not the entire text, is highlighted when
undoing, as would be ideal.
Fixes: #14311.
The new function specifies the single minimal diff between 2 strings.
It takes in 2 string parameters and returns an array with 3 integers
where the 1st is the index where the difference starts and the 2nd and
3rd are the indices of the end of the diff in the 2 strings.
Uptil now, with the composebox expanded and some content in it, when a
task in a todo widget was clicked, it did not toggle as expected but
focused the composebox, selecting all the text in it.
This is fixed by ensuring the task is a clickable message element and
clicking it doesn't collapse the composebox. This has the added benefit
of fixing the bug where toggling a task expanded a collapsed composebox.
Fixes: #22928.
This commit refactors the code for dropdown list widget settings
such that we can reuse the added functions for further settings
that will use dropdown_list_widget.
This change will be helpful when we will add group-based settings
and change some of the existing role-based settings to be group-based.
We add a new function "get_widget_for_dropdown_list_settings" to
get the widget variable from setting name. The functions to get
and set the setting value use "get_widget_for_dropdown_list_settings"
function to get the widget and then gets or sets the setting value
accordingly.
We also add "data-setting-widget-type" and "data-setting-value-type"
attributes to the element like other settings.
The "data-setting-widget-type" attr is used by get_input_element_value
to use "get_dropdown_list_widget_setting_value" function for
dropdown-list-widget settings.
The "data-setting-value-type" attribute is used to parse the setting
value to correct types in "get_dropdown_list_widget_setting_value"
function.
There are a few account settings that are possibly deactivated if
a user is not an administrator (email, name and avatar changes),
depending on the organization's policy for changing those settings.
When a user's role is updated to become (or no longer be) an admin,
the display for these account settings may need to be updated.
Adds `settings_account.update_account_settings_display` to the
functions called in `user_events.update_person` if the active
user's role is changed to or from an administrator role.
The class for "tr" element was changed in c22de76af7, so
get_stream_id function was not able to get the correct stream-id
from the target element. This commit fixes get_stream_edit
function to also check for closest ".stream-notifications-row"
ancestor element and thus it returns the correct stream id.
Rest of the page uses "Source sans 3" font and also most of
input and select elements in rest of the app use the same font.
This commit updates the select, input and textarea elements in
"/upgrade" page to use "Source sans 3" font and not the one set
by Bootstrap.
Most of the select, input and textarea elements in the app uses
"Source sans 3" font.
This commit updates the select, input and textarea elements in
"/devtools/integrations" page to use "Source sans 3" font
and not the one set by Bootstrap.
Renames and cleans up some of the CSS rules for the `btn-admin`
class that is used in the dev login page for input elements.
Confirmed via git-grep that this class is only used on the dev
login page.
Fixed a bug in expanded compose box preview mode,
which lead to buttons at the bottom of the compose box
being pushed off the screen and text overflowing.
Manually tested for different screen sizes.
Fixes: #23493.
Moves the tooltip when email changes are disabled to be shown on
hovering over the email button text and pencil icon. Removes the
question icon that previously showed the tooltip on hover.
Moves the complicated logic in `account_settings.hbs` for whether
to disable the change email button (and show the tooltip) to
`settings_data.ts`.
This update mirrors how similar realm settings are handled,
such as `realm_name_changes_disabled`, and means that the
`realm_email_changes_disabled` bool is added to `page_params.ts`.
Prep commit for moving the email changes disabled tooltip from
a separate question icon to the disabled button itself.
muted_users.js is another dependency of people.js to be converted into
typescript. Note that for filter_muted_users, we avoid typing persons
with a type that might get added to people.ts in the future, as it
otherwise might introduce cyclic dependency.
Signed-off-by: Zixuan James Li <p359101898@gmail.com>
This code path isn't currently reached for the logged out "spectator"
view, but it will be in upcoming commits. This makes sure that case
is handled properly.
This change ensures that every call to find the stream name or topic
in the composebox is calling compose_state functions instead of directly
taking a value from an HTML element specified by a classname.
This has better code readability and abstracts away the classname,
and also makes it easier to change which classname we use (which
will be happening in an upcoming change as part of switching the
stream name field to a dropdown).
Note that this change means that the stream name will always be
trimmed, whereas before it was whatever the user had written even
if it had trailing whitespace. This shouldn't be an issue as far
as we (me + Tim) can tell, and also it will become irrelevant as
soon as the dropdown changes land.
This code is equivalent, because the keep_leading_whitespace parameter
of get_or_set was never used for the stream name.
This addresses an open TODO and makes the code more readable.
Updates `compute_narrow_title` to cover the two cases for views
with undefined filters: "All messages" and "Recent conversations".
Also, moves the call to `notifications.redraw_title` from
`set_narrow_title` and to `update_narrow_title`.
Creates a new function, `compute_narrow_title`, that returns a
string for the narrow title based on the current filter, so that
`update_narrow_title` can call that function, and then use the
returned string to set the narrow title.
Adds a node test for the new `compute_narrow_title` function for
cases that differ from the title generated by `filter.get_title`.
This is implemented by reusing the stream_privacy handlebars helper.
We can't use it in the public stream case, because the design of the
invite users modal uses no space between the `#` and the stream name.
Fixes part of #23496.
Instead of removing all compose banners, we now remove only warnings
and errors -- this makes no difference right now, but this change
will allow us to add other compose banners that are cleared at
different times.
This fixes a visual regression in newer Electron builds (without
regressing Firefox) for which I still don't entirely know the root
cause, where extra "borders" were being applied to messages in both
streams and PMs. Applying a negative "spread radius" to the box-shadow
properties of these elements, and moving that pixel to the "horizontal
shadow" aspect of the property (which is used to create the left-side
"ruler" effect), restores the expected look and feel.
Tested in qutebrowser (Chromium 87-based), Electron v18+v19, and Firefox
107.
Refs (and should unblock) zulip/zulip-desktop#1251
If new stream is created as one of the two private options, the view stream button was not visible
immediately, but does appear after a page refresh. This bug turns out to be caused by the wrong
selector being used in the code intended to make the button visible.
Fixes: #22556.
Refactored (moved) the code for preserving the cursor's initial logical
position from `quote_and_reply()` in `compose_actions.js` which calls
`replace_syntax()` directly into `replace_syntax()` in `compose_ui.js`.
This ensures that anytime text in a textarea is replaced, the original
cursor position is always restored.
Earlier, this was needed to be done separately, and missing that would
lead to bugs with the cursor unexpectedly jumping on replacement.
Fixes: #23863.
This margin doesn't make sense in a wider view, and is actually
a hinderance to the layout on narrower screens, and removing it still
keeps more than enough separation from the buttons on the right.
This commit removes get_editability function and we can instead
use is_content_editable and is_topic_editable/can_move_message
functions to check the permissions. We can remove get_editability
since there is no longer a sort order to the possibilities and
it is not necessary that if a user has permission to edit content
then they can edit the topics also.
So, this commit adds is_message_editable_ignoring_permissions
check to is_content_editable and also modifies the tests accordingly.
We separate the message editing and message moving settings
into different sections.
We do not change the help-links for the section headings and keep
both of them same linked to "Configure message eiditng and deletion"
as we would anyway be changing or spliting this page and can update
the links at that time.
This commit renames "can_edit_topic_of_any_message" function
in models.py to "can_move_messages_to_another_topic" and
"user_can_edit_topic_of_any_message" function in settings_data.js
to "user_can_move_messages_to_another_topic".
This change is done since topic editing permission does not
depend on message sender now and messages are considered same
irrespective of whether the user who is editing the topic had sent
the message or not. This also makes the naming consistent with
what we use for the label of this setting in webapp and how we
describe this action in help documentation.
This commit updates the labels for "edit_topic_policy" and
"move_messages_between_streams_policy" settings.
The label for topic editing setting is changed to
"Who can move messages to another topic" since the topic
edit permissions do not depend on message sender now and
messages are considered same irrespective of whether the
message was sent by the user editing the topic or by
someone else.
The label for stream editing setting is changed to
"Who can move messages to another stream".
These changes also makes the labels consistent with how these
actions are described in help center documentation.
This commit changes the topic edit permssions in webapp to not depend
whether the user editing the message had sent the message or it was sent
by someone else. Backend changes were done already in previous commits.
Previously, we always allowed topic edits when the user themseleves had
sent the message not considering the edit_topic_policy and the 3-day time
limit. But now we consider all messages as same and editing is allowed only
according to edit_topic_policy setting and the time limit of 3 days in
addition for users who are not admins or moderators.
We now allow editing stream and topic of message even if
allow_message_editing if False using webapp given that is
allowed as per other topic and stream edit specific settings.
Fixes a part of #21739.
All instances of `choice` have been replaced with `option` in the UI
for editing a poll. In code, `option` was already being used. This
ensures the same terminology is used across the code, the UI and the
related help center article.
"is_pm_recipient" is not supposed to be called with an arbitrary
recipient object which might have "to_user_ids" being undefined.
Since this helper is only used with focused_recipient in
compose_fade_helper, we move it there.
Note that the helper is no longer separately tested. It is now covered
by the test case of "compose_fade_helper.would_receive_message".
(See
5e74a8d0cc/static/js/compose.js (L156-L162))
Signed-off-by: Zixuan James Li <p359101898@gmail.com>
This avoids "@typescript-eslint/restrict-template-expressions" when we
convert util.js to util.ts.
Note that prettier would otherwise split the first template literal
expression in half if we don't start a newline.
Signed-off-by: Zixuan James Li <p359101898@gmail.com>
This uses the linkifier index among the list of linkifiers in the
replacement as the priority to order the replacement order for
patterns in the topic. This avoids having multiple overlapping matches
that each produce a link.
The linkifier with the lowest id will be prioritized when its pattern
overlaps with another. Linkifiers are prioritized over raw URLs.
Note that the same algorithm is used for local echoing and the
backend markdown processor.
Fixes#23715.
Signed-off-by: Zixuan James Li <p359101898@gmail.com>
The same pattern being matched multiple times in a topic cannot be
properly ordered using topic_name.find(match_text) and etc. when there
are multiple matches of the same pattern in the topic.
Signed-off-by: Zixuan James Li <p359101898@gmail.com>
This commit adds required bootstrap CSS rules used for emails
textarea element in invite modal with existing CSS for that
element in zulip.css. We also change the selector to use class
instead of ID such that the dark theme CSS can take precedence
when using dark theme.
This change is done so we can safely remove textarea CSS rules
for bootstrap.css as a part of our process to remove bootstrap
without changing existing design.
This commit adds required bootstrap CSS rules used for message-edit
textarea element with existing CSS for that element in zulip.css.
This change is done so we can safely remove textarea CSS rules
for bootstrap.css as a part of our process to remove bootstrap
without changing existing design.
This commit adds required bootstrap CSS rules used for
compose textarea element in with existing CSS for that
element in compose.css.
This change is done so we can safely remove textarea CSS rules
for bootstrap.css as a part of our process to remove bootstrap
without changing existing design.
This commit adds required bootstrap CSS rules used for textarea
element in sponsorship page with existing CSS for that element
in billing.css.
This change is done so we can safely remove textarea CSS rules
for bootstrap.css as a part of our process to remove bootstrap
without changing existing design.
This commit adds required bootstrap CSS rules used for textarea
element in support page with existing CSS for that element in
portico_signin.css.
This change is done so we can safely remove textarea CSS rules
for bootstrap.css as a part of our process to remove bootstrap
without changing existing design.
This commit adds bootstrap CSS rules used for textarea element
in devtools integrations panel in integerations_dev_panel.css.
This change is done so we can safely remove textarea CSS rules
for bootstrap.css as a part of our process to remove bootstrap
without changing existing design.
This commit adds margin-bottom property to CSS of email field
in user deactivation modal with other CSS properties for this
field in settings.css since we are going to remove bootstrap
CSS rules in further commits.
This commit extracts some common bootstrap rules used for textarea
elements in settings (both organization and stream settings) and
this rules are added for settings_textarea class. We also add
settings_textarea class to the textarea elements in settings.
This change is done so we can safely remove textarea CSS rules
for bootstrap.css as a part of our process to remove bootstrap
without changing existing design.
The `stream_id` property of a stream object was being wrongly accessed
as `id`, which does not exist, in the function
`get_available_streams_for_moving_messages()`
This led to the current stream not being rendered in the dropdown list
as expected in the `Move Topic` modal when the user does not have the
permission to post in the current stream.
We don't need to select the message after fetching messages if
the user changed the narrow in the meanwhile.
Note that in this context, message_lists.current ===
message_list.narrowed.
The new ordering matches that used in the Help Center search operators
page, which we just reordered to better highlight more frequently used
features.
Fixes#23768.
Previously, we used `sender:email`, for example, in our examples for
how to use search operators. This is correct for what ends up in the
search input, but the typeahead has a much nicer experience for
selecting a user, and the emails may be fake due to limited
email_address_visibility, so it's clearer to just refere to a user
here.
Fixes part of #23768.
Changes all the uses of the word "operators" to "filters" in the
in-app "Search operators" reference to align with the updated help
center documentation.
Fixes#23767.
Previously, the options in the stream selection dropdown were sorted in a case-sensitive
fashion, which felt a bit harder to use than just sorting alphabetically irrespective of case.
Fixes: #23283
This commit deletes all the functions, CSS and other code
for stream privacy modal since we have udpated the UI to
show stream permission settings always in "General" section
and not inside the modal.
Fixes a part of #19519.
This commit adds code to save changes in stream permission
settings.
This commit makes some changes to code in settings_org.js to
handle stream settings and add corresponding handler for
save button in stream_edit.js. We also add a new function
get_request_data_for_stream_privacy to get the data for
stream privacy which can be send with the API request.
Fixes part of #19519.
This commit adds code to discard changes in stream permission
settings.
This commit makes some changes to code in settings_org.js to
handle stream settings and add corresponding handler for
discard button in stream_edit.js.
Fixes part of #19519.
This commit adds code to show save-discard widget when stream
permission settings are changed and subsequently hide it when
the setting is again changed to original value.
Some important code changes -
- Added code in "settings_org.js" to handle stream settings.
- Added handler in "stream_edit.js" to show or hide the
save-discard widget when settings are changed.
Fixes part of #19519.
We now show the stream permission settings - stream privacy,
stream post policy and stream message retentions setting,
always in the "General" section of stream settings instead
of showing it in the modal. The setting elements are
disabled for users who cannot change them.
Some important changes are -
- Add proper classes and IDs to the elements such that
code in settings_org.js can be used to set and change these
settings.
- Code in "settings_org.js" is updated to be able to set
stream message retention setting while rendering the page.
- Added enable_or_disable_permission_settings_in_edit_panel
function in stream_ui_updates.js (since that will also be
used in live updating code) to disable the setting elements
if required.
- We also update update_web_public_stream_privacy_option_state
function such that we can correctly enable/disable web-public
option in stream edit panel based on permissions.
- Added code for save-discard widget in stream_settings.hbs in
this commit but code to implement the correct behavior of it
will be added in further commits.
Fixes part of #19519.
We change the CSS for save-discard widget to not be inside
"#settings_page" selector such that it can be used as a
common component for stream settings also.
This commit also updates the selectors to be more specific
such that the ".new-style.button" css cannot override
these rules.
This commit changes populate_data_for_request to have module-level scope
and not be defined in register_save_discard_widget_handlers, so that we
can use this function for stream settings too in further commits.
This class was used for setting margin-top as 0 but since the default value
of this property is already 0, this CSS is not required and thus we can
remove this class also since it is not used anywhere else.
Updates the default empty narrow banner text to be more generally
applicable, particularly in the case when all messages have been
moved to a new topic.
This commit removes ID from discard button in save-discard widget.
Generating IDs using variables results in difficulty to grep
the code and we can anyway access the discard button by using
ID of the settings-subsection-parent div. Also, we do not use
ID to access this button, so we can change this safely.
This commit removes ID from save button in save-discard widget.
Generating IDs using variables results in difficulty to grep
the code and we can anyway access the save button by using
ID of the settings-subsection-parent div.
We used id of save-button to get subsection parameter
which is passed to get_complete_data_for_subsection.
This commit now changes it to instead get subsection
from settings-subsection-parent div. We also change
the id of settings-subsection-parent div of organization
joining settings in this commit to be a more reasonable
name as per this change.
Previously user presence dot in the right sidebar becomes narrower
when there is unread counter, and as such, this commit adds a min-width
to the user presence dot.
Fixes: #23519
This is part several updates for #22524.
Notes:
* data-stream_name isn't needed in the template (before or after),
since there is not even an action button that could use it.
This is part several updates for #22524.
This commit also removes `compose_error.hide()` since there is only
one remaining use of it (which has been replaced by the contents of
`hide()`). Eventually `#compose-send-status` should be replaced
fully in a future PR, after we rewrite the upload banner to use
the new banner template.
Testing note: I removed the test test_compose_not_subscribed_clicked
since it heavily relies on the old way of rendering banners and is too
UI-focused (instead of logic focused) for me to feel like it's worth
testing that the banner is removed when clicking the button.
This is part several updates for #22524.
Testing note: I removed the test test_compose_all_everyone_confirm_clicked
since it heavily relies on the old way of rendering banners and is too
UI-focused (instead of logic focused) for me to feel like it's worth
testing that the banner is removed when clicking the button.
This is part several updates for #22524.
Testing note: I removed the tests test_compose_invite_users_clicked
and test_compose_invite_close_clicked, since they heavily relied on
the old way of rendering banners and were too UI-focused (instead of
logic focused) for me to feel like it was worth testing that the
banners removed when clicking the buttons.
Error banners were rendered in a different place than warnings.
Now compose errors and warnings share the same template and styling
in compose_banner.hbs
Testing notes:
* I removed test_message_overflow since it seemed not to test
anything that test_check_overflow_text wasn't already testing.
* private_message_recipient() can't be called to set emails to non-valid
emails, so `invalid_recipient` cannot be tested (and is likely very
difficult to trigger in production, if possible at all).
This is the beginning of a fix for #22524 which converts several
banners to a new style. As a part of that set of changes, this
commit creates the shared template and warning styling. The
resolved topic warning was picked (for no particular reason)
to migrate first. Further commits updating other banners
to follow.
If the selected message was different from the message where
actions popover was present, it resulted in emoji popover being
attached to the selected message instead of the one where
actions popover was present.
exclude_tippy_instance was not being used correctly since it was
never defined as an `opts` property for `hide_all_except_sidebars`.
Everything seems to be working fine without this. I recall that
popovers seems to be hidden before they were displayed for which
this was required but it doesn't seem to be needed anymore.
We need to fill width of `actions_hover` with padding of
`zulip-icon`, so that hovering over `.actions_hover` shows you
tooltip and clicking on it shows popover.
Since we are switching to tippyjs to display popovers, extracting
this data in a commit of its own, makes further changes easier to
review and merge.
Also, we could add tests with full coverage on the data
provided to popovers, possibly a good first issue for beginners.
While `reminder` feature is disabled right now, we need to delete
these functions to avoid conflicts when porting the actions
popover from bootstrap to tippy.
Hide the popover explicitly inside the event handler of the element.
Also, stop propagating events outside the popover. We add
`navigate_and_close_popover` class to links inside popovers
which don't have any click handler and do the same for them.
We can remove the "padding-left: 0px" rule for
"label.radio" element now since the default value
for padding property is 0 and we have also removed
the bootstrap applied "padding-left: -20px" rule
in the previous commit.
We rewrite the CSS rules, handled by bootstrap for the radio buttons of
"Enter to send" setting, to compose.css as we are in process of
removing bootstrap.
The line-height property added to input element by bootstrap is not
added to subscriptions.css since it is already added for all inputs
in zulip.css.
We rewrite the CSS rules, handled by bootstrap for the radio buttons
for stream privacy choices (in both stream create and edit form),
to subscriptions.css as we are in process of removing bootstrap.
The settings-radio-input-parent block in subscriptions.css is moved
to be top-level instead of being nested inside "stream_privacy_modal"
and "stream-creation-body" block, such that we can use this class
in future for resusable components (like settings_checkbox).
The bootstrap CSS rules are also added to this
settings-radio-input-parent selector.
The max-height property added to label by bootstrap is not added
since it does not applies to non-replaced inline elements.
The line-height property added to input element by bootstrap is
not added to subscriptions.css since it is already added for all
inputs in zulip.css.
We rewrite the CSS rules, handled by bootstrap for the radio
buttons in display settings (both user and realm-level defaults),
to settings.css as we are in process of removing bootstrap.
This commit adds a new class "display-settings-radio-choice-label"
to radio label elements in the display settings and the bootstrap
CSS rules along with existing CSS defined by us for radio-type
display settings are added to this class.
This change will help us in future where we may want to have
reusable components (like settings_checkbox) for radio-type
settings with visual preview.
The line-height property added to input element by bootstrap is
not added to settings.css since it is already added for all inputs
in zulip.css.
This commit renames the radio-input-parent class for parent div of
stream privacy radio inputs to settings-radio-input-parent.
This change is done so that we can use this same class name for adding
other similarly styled radio inputs to be used in settings in future.
We add the CSS rules handled by bootstrap for the radio
buttons in forward email modal to email_log.css as we
are in process of removing bootstrap
The elements for which CSS rules have been added are label
with "radio" class and "radio" type input elements.
The max-height property added to label by bootstrap is not
added since it does not applies to non-replaced inline
elements.
Previously, CSS rules were added inline for emails page in
dev server. This commit adds a new file which contains
CSS rules for the emails page in dev server. This will
also help us in adding focus for the radio buttons in
the page, which cannot be added inline to the elements,
when we remove the use of bootstrap for this page.
It can sometimes be unclear to logged-out users why they
are not seeing all their subscribed streams in the left sidebar.
To reduce the chances of users being confused, added a login link
at the bottom of the streams list for logged-out users.
To avoid leaking any information, the link is shown regardless of
whether or not there are actually any additional streams in the
organization.
Fixes#22844.
We were not passing max_stream_description_length and
max_stream_name_length parameters to change_stream_info_modal
template and thus the maxlength attribute was not being set
correctly for the stream name and description input.
This commit updates the code to pass these parameters to
change_stream_info_modal template. We also remove these
parameters from the data passed to stream_types template,
since these parameters are not required there.
Removes images of the bot type dropdown menus for creating new
bots because they are no longer up-to-date and picking an option
from a dropdown does not seem like it would require a screenshot.
https://github.com/fregante/text-field-edit/pull/18 adds the option
for `replace` function to not select the replaced text. We use it
to fix the issue of file link being selected after user uploads
a file via `drag-drop`.
The custom input was not being shown when changing user email
notification batching period setting dropdown to "Custom" option.
This was because parse_time_limit was undefined in case organization
settings was not loaded till then, and the code raised an error.
This commit changes the code to define parse_limit_function at
module-level instead of defining it in
register_save_discard_widget_handlers which is called only when
build_page is called which happens only when organization settings
is opened before changing the notification batching setting.
Fixes#23674.
The reason utcToZonedTime would return an invalid Date (i.e. ‘new
Date(NaN)’) is because we passed in an invalid timezone. Fix the
comments and tests to reflect this; remove unnecessary mocking and the
misleading ‘instanceof Date’ check.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
In 16c45aa, the check for an empty narrow was updated to no longer
confirm if no messages were returned by the message fetch request.
Updates the empty narrow check to confirm that the messages fetched,
and being processed are for the current / narrow message list before
showing an empty narrow.
`current_date` being invalid here could result in `user card`
not being displayed to users. So, it is important to verify that
the date is valid so that we don't run into any errors.
This fixes (unverified) an issue where user card was not being
displayed to some users on Zulip Desktop app because `current_date`
was not valid.
Non administrator users were shown the deactivated users in sidebar
menu; this could be distracting, as there's not much expected interaction
for non-administrators with this. Keep it available but hidden behind the
extra click for panels that are primarily for administrators.
Fixes#23235.
This fixes a bug where when all the streams in a section
in the left sidebar are muted, the section divider disappears.
The bug is caused by not considering muted streams when writing
the logic for when to show/not show section divider this commit
fixes it.
fixes#23241.
This commit refactors the code for realm message retention
setting which will help us in reusing some code when adding
save-discard widget for stream settings in further commits.
Following changes have been done in this commit -
- Renamed the "retain_for_period" option to "custom_period"
and "retain_forever" option to "unlimited" to match with
the stream settings options such that we can reuse the code.
- Updated set_message_retention_setting_dropdown such that
it can be used for stream message retention setting as well.
This commit refactors the code for stream message retentions setting
to match it with the other time limit settings -
- Rename the "Retain for N days after posting" option to "Custom".
We also update the option value from "retain_for_period" to
"custom_period".
- Change the label of custom input to "Retention period (days)"
as it is more descriptive and clear than just labelling it as "N".
- The custom input is also moved to be below the dropdown and
also has left margin as with the other time limit realm settings.
This commit renames dependent-block class to dependent-settings-block
and also moves the CSS to app_components.css. This class will now
only be used for this particular type of custom inputs and thus
we do not need ID in the selectors for applying the CSS.
This commit renames the "org-subsection-parent" class used for
organization settings subsections to "settings-subsection-parent"
such that we can use same for the stream settings and avoid
duplicating code for handling save-discard widget which will be
added in future.
We passed subsection elem to get_subsection_property_elements function
in all cases except the one when calling from discard button click
handler and we passed the input elem instead in that case.
This commit changes the code to pass subsection element directly
in the discard button click handler as well such that we can use
get_subsection_property_elements function for the stream settings
code and do not find the subsection element inside the function.
This commit changes the settings code to consider the
parent div of the radio inputs as prop-element and not
individual input elements since all inputs are actually
for a single setting. We still need to handle these settings
as special cases at some places but that can also be fixed.
As a result of this change, we can use ID to get setting
name from the element in populate_data_for_request.
This commit adds id attribute to display and notification settings
elements except for the radio-type settings which will be handled
later in further commits and for checkbox type settings which
already had id.
The id will only be used for default settings section but they
have been added to user settings also as both of them share common
template.
This is a prep commit for refactoring the code for radio-type
settings in settings_org.js.
We move the css to app_components.css from settings.css because
we are going to add save-discard widget in stream settings as
well and thus we can reuse the CSS there.
We do not need this handler anymore since "Micromodal"
makes sure that events are not propagated and the
behavior is as expected without this handler.
Also, there are no elements with selectors used in
this handler.
This has no visual changes.
I hand-verified all the places we include these elements in the UI:
* Markdown rendered inside the app.
* Markdown rendered on portico pages.
* The only such element in our HTML templates is the <h5>s for
organization logos.
For a couple of these, we were relying on the default margins provided
by Bootstrap.
This is not used by Zulip directly; the one place we have a .navbar is
on the /hello page, which actually is just a naming collision for the
"navbar" in the mobile device widget.
Before 2017, Zulip's manage streams and settings UIs were tab in the
same pane position as our current message feed and recent topics.
That original implementation was implemented using Bootstrap tabs;
while it hasn't been in use for years, we had a bunch of stale code
related to it leftover in this module.
See the code comment for why it is being called. We also remove the
unused `message_feed_shown` which was added to be used for this
purpose.
I decided to not call this with `requestAnimationFrame` since it
is changing position of elements in DOM and not letting browser
do a reflow after that can lead to wrong calculations later on.
We didn't use to control how `active` class is set on
`#message_feed_container`. It was done by bootstrap on its own
and it doesn't even matter if `message_feed_container` is visible
for it to have `active` class according to bootstrap. So, we only
run `scroll_finished` when recent topics is not visible which
seems logical.
These roughly match the user-agent stylesheet; some browsers do
`font-weight: bolder` instead for strong, but the difference shouldn't
be important for us.
Fixes an issue introduced in 6b4ab21 when we started using the
user's full name for empty narrow titles in a single operator
narrow of either "pm-with", "group-pm-with" or "sender".
For these empty narrow titles, any ', & or < characters in the
user's full name are not escaped.
Add in a check to `recent_topics_data.process_message` so that we
know if any conversation data was updated and can rerender the
based on that information.
This fixes an error in the `inplace_rerender` code when we
are trying to remove a rendered row and correcting the `row_focus`
if it is on the row being removed. If the table is not in focus,
we don't need to do anything.
Processing 1k messages takes roughly 1s on a live server like
chat.zulip.org, which is a good enough duration after which
user will be looking to get some feedback on the request. Once
we show the in-progress banner, it makes sense to do bigger
batches to speed up the process.
As detailed in the comment, the new "mark all as read" bankrupcty code
path would fail to mark as read muted stream messages that are older
than the oldest unread non-muted message.
This was because of the semantics of the `first_unread` anchor value
being actually "fire unmuted unread".
We can just change this to "oldest", because we're already using an
`is:unread` for the narrow query; doing so likely is a small
optimization, since we save the query to compute the first unread.
Adjusts the check in `message_filter.process_results` to happen
after the messages have been processed so that the empty narrow
banner is shown if there are no messages in the current message
list, which covers the case of there being no messages returned
from the server (e.g. a keyword search, no private messages with
a user) and the case of all existing stream topics being muted
by the current user.
This matches the current bulk-operation behavior of the message lists,
and avoids spending an enormous amount of time adjusting unread counts
once per message in a loop over thousands of messages.
Also add some comments on adjacent code paths.
As of 550a32b, when private messages were added to recent
conversations, `recent_topics_data.process_message` will
always return true.
Updates `recent_topics_data.process_message` for no return
value. Also, removes the `topic_data_changed` logic from
`recent_topics_ui.process_messages` and instead checks for
messages to process before updating the data and calling the
rerender.
`recent_topics_ui.complete_rerender` first checks for whether
the recent conversations view is visible before rerendering.
This commit reverts the changes for replace_syntax in 1ca4566eb2
and we again use JS replace instead of replace from text-field-edit.
We do this change because replace from text-field-edit leaves the
replaced text selected, which we don't want. This change is
temporary and we can probably use replace method from
text-field-edit once this issue is fixed in upstream.
Fixes#23406.
Fixes#14053.
This also uses the new alert banner system.
It is not clear if we want to scroll user to the end of the narrow
after this update is complete. There is a "scroll to bottom" button
for users who want to be placed at the end of the narrow but there
is no reverse option for users who don't. So, maybe not changing
the scroll position is preferred especially since we now use
banners for the update where a user could have been reading something
while we were updating the message flags in the background.
We do not handle the case of `mark as read` and `mark as unread`
both running in batches at the same (This is a somewhat rare case
given the high cap on `NUM_OF_MESSAGES_UPDATED_PER_BATCH` but
possible.).
`unread.declare_bankruptcy` is no longer used in the code but
we keep it since it is used extensively in tests.
Previous algorithm was not correct if we didn't have full data for
the current narrow loaded from the server. #23512 adds the support
to mark messages in a narrow unread after a give message_id.
Added a new alert banner to indicate loading and success states of
an ongoing request. This is useful when requests can take a long
time to complete.
Following b563fdc537, the z-index of the
compose box (2) tied with that of unread date dividers within a topic;
this could lead to the dividers incorrectly appearing on top of the
compose box.
We don't have other elements that can overlap with compose with a
z-index between 2 and 4, so just increase it to 4.
This commit removes comments related to stream-admin option from
wildcard_mention_allowed.
We have already removed stream-admin option from wildcard mention
policy setting in 83383090f9 since we are no longer planning to
implement stream admin feature and instead are working on new
permissions model based on user groups.
We do not want to import any of our modules into this file, so
it has an independent implementation of the fix for #22062. Also,
using -13 as a keyCode helps avoid having to make changes to all
the comparisons with e.keyCode that the module relies on.
CircleCI has updated its webhook format[1] for CircleCI Cloud,
Server version 3.x and 4.x. This commit rewrites the CircleCI
integration to parse the new webhook structure. The tests have also
been rewritten for the new format.
With this commit, we support webhooks from projects that use GitHub,
BitBucket and GitLab as VCS providers. The CircleCI integration doc
has been updated to mention the same. The doc has also been updated
with the latest instructions for configuring a webhook on the CircleCI
interface, and the new output screenshots.
References:
[1]: https://circleci.com/docs/webhooks
We already re-rendered the realm-logo when the user selects either
the light or dark color scheme, but on `color-scheme-automatic`,
we didn't have any event handlers to trigger a render. This commit
adds a handler to listen for changes to `prefers-color-scheme` property.
Fixes#23548.
This commit adds call_function_periodically helper function
which will be used to call functions periodically using
setTimeout. Currently, this new function is used to send
presence requests and trying reload.
We retry reloading repeatedly at an interval of 30 seconds,
to handle the case where window.location.reload has no
immediate affect.
Previously, setInterval was used for this, but this commit
replaces it with nested setTimeout calls.
This change will help us in avoiding a large number of
requests to `/` in case when browser tries to "catch up"
pending calls after unsuspend.
The tweaks I made as part of merging
f204a4c592 apparently were wrong; the
CSS class .popover_user_presence had been shared between both the user
card and the profile.
Fix this by referencing the right CSS classes. Additionally, fix the
margins to have a square hover region around the presence dot.
Fixes#23588.
Instead of using setInterval to call send_presence_to_server
repeatedly, we now simluate setInterval using setTimeout.
This change helps us to avoid the condition likely related to resume
from suspend, when the browser tries to catch up by running a large
number of "missed" copies of the setInterval hook, causing the server
to rate-limit the client.
Fixes#23438.
Fixes#23517.
While this feature was added to Zulip very early, it has been troubled
for most of that time; it never looked great visually, had a lot of
implementation complexity around resize.js, and has a weird model (a
setting that changes the UI only in certain window sizes).
This option is not commonly used; while a significant portion of users
have it enabled, many of them just don't use window sizes where it
actually has an effect. So it's not clear that it will be missed if
removed; we got very few bug reports when it was completely broken for
a few days after we first integrated the new left sidebar private
messages design.
Even with it no longer being broken, it does not work very well with
the addition of the new PMs section in the left sidebar. (Having two
scrollbars in the sidebar looks quite awkward.) The new private
messages section in the left sidebar also addresses some of the use
cases for always keeping the Users list always visible, even in narrow
windows.
This option is only removed from frontend for now. To make this
decision easily reversible, the backend code of this feature
is still kept.
Some Safari users users observed an issue where these modal buttons
appeared with an ugly white-on-grey format. Removing the CSS line with
`appearance: button` appears to fix this for affected users.
That line seems unlikely to have been constructive; as documented in
https://developer.mozilla.org/en-US/docs/Web/CSS/appearance, this is a
deprecated value equivalent to `auto`, and a bit of a misfeature.
Additionally, the "Log in" button was incorrectly underlined on hover;
override that style.
Increase z-index of unread-marker to always appear above the message and
focused outline. Also, z-index of date_row is increased to hide
unread marker for it in special conditions.
Modals are closed when selecting something inside the modal if mouse
is dragged outside the modal. This happens as leaving the mouse after
dragging it outside the modal induces a click even outside the modal
and the current behavior is to close the modal on clicking outside it.
We remove the "data-micromodal-close" attribute from "modal__overlay"
element which is responsible for closing the modal. And we add
click handler which closes the modal on clicking outside the modal but
does not closes it when the mouse is dragged outside while selecting
something.
Fixes#23350.
The notifications headings were not consistent between the personal stream settings panel
and /help/desktop-notifications.
This changes notifications headings from "Audio" to "Audible", since that seems like the
better choice of word.
Fixes#23515.
Fixes#23284
The basic approach used by `text-area-edit` is same as we were
using, so there is no real change. There are some nice checks
in `text-area-edit` which we don't do that helps us avoid
common bugs.
This commit refactors the code for realm message retention
setting to make it more similar to code for other time-limit
realm settings. There are still separate functions for the
message retention setting but they are similar to that of
other time-limit settings and can probably help us to
deduplicate the code in future. This refactor also helps
us in reusing some code for stream message retention
setting for changes in #23013.
This commit also fixes a bug where save-discard widget
not being hidden when resetting the setting to original
value. This can only be reproduced when the original
setting value is "retain_forever".
Following changes have been done in this commit -
- Added data-setting-widget-type attribute which is set to
"message-retention-setting" similar to "time-limit" value for
message edit and delete limit settings.
- Added get_message_retention_setting_value function similar
to get_time_limit_setting_value function which is used by
get_input_element_value.
- Removed "message-retention" block from
get_complete_data_for_subsection and the message retention
setting is now added to request data in populate_data_for_request
itself using data-setting-widget-type attribute.
- Updated id and class of elements to support the above changes.
When resetting a setting in "Other settings" section to its original
value, the save-discard widget for the section is not hidden. This can
be reproduced when no language is set for code-block default language
setting. This was because check_property_changed incorrectly returned
true as the original value for code-block language setting was null
but the widget element returned empty string.
To implement this, we are rendering users in PMs with
the status icon (via `user_with_status_icon.hbs`) and
then passing rendered HTML to the recent topics row.
Fixes#23262
We have bound the `mouseenter` event with a circle
status parent element to render the tooltip. Instead of passing
the tooltip content directly in `data-tippy-content`, we
are rendering it via JS because when showing the bot
tooltip we want a multiline tooltip.
We have also made some minor changes to `do_render_buddy_list_tooltip`,
so we can append the tooltip to the target element and avoid adding
a observer to it.
This commit also sets the font weight for tippy content to
400 to avoid bold content.
When processing an "update_message_flags" event to mark messages
as unread, check the current message list once messages are updated
to see if the `mark_as_read_turned_off_banner` should be visible.
This means that other clients in a view that also does not mark
messages as read (for example a sender or keyword search narrow)
will also load the banner when the view is updated.
Fixes#23502.
Moving the last active status icon to the modal header, we obtain a
cleaner visual design for the user profile modal which is more
consistent with other parts of UI.
Showing section separators in the left sidebar ("Pinned streams",
"Active streams", etc.) is unnecessary when there is only one section,
and can feel confusing. We should show the separators only when there
is more than one section present.
Fixes#22843.
This fixes a race in certain intermediate sizes, with the
left_side_userlist setting, the sidebar sizes would have been computed
with invalid information about the size of the two regions to divide
space between (because the sidebar was closed when the calculation was
done).
Structurally, the goal of this logic is to just hide all popovers
(including potential user popovers) and not the sidebars; use the
function designed for that purpose rather than hackily
hand-implementing it.
In window width ranges where the left sidebar is fully open and the
right sidebar is toggleable, the existing logic to hide all popovers
and then reopen the left sidebar stream list.
We have a function designed to close all popovers that aren't
sidebars; we should just use it.
See 2d414fa897 for a previous incomplete
fix for this issue.
The `size_blocks` code was cool looking but wasn't working well.
Since we only have to place streams list and users list, we can
fix their `max-height` more easily without trying to solve the
`multi-block` case which `size_blocks` was trying to do.
This also fixes users list max-height being incorrectly set,
resulting in user unable to scroll to some user list items.
Adds "View your mentions" page to document how to access @-mentions
and the @ indicator for unread @-mentions on desktop/web and mobile.
Fixes#23422.
Co-authored-by: Alya Abbott <alya@zulip.com>
The stream-specific notifications table incorrectly used the
.stream-row CSS class. As a result, live-update code for the "stream
settings" UI when changing a stream's permissions model would
incorrectly replace rows of this table with a "Manage streams" style
row.
This provides a hook for users to get to these /help/ pages, which contain
details on exactly how these notifications/settings work, as well as
troubleshooting advice.
Fixes: #23369.
Instead of using "these people", we use "these users".
Note that the "pm-with" single user case has already been updated
to show the user's full name instead of "this person".
Due to incorrect heights set for user-group creation and stream
creation body we had a UI bug because of which bottom part of
user group and stream creation forms were slightly visible
through the bottom.
It was due to somewhat fussy css height rules and incorrect
height calculations for that UI.
This function is only called to calculate the size of stream and
user list. Using 250px as minimum height for these blocks gives
them enough space to be usable regardless of their height ratio.
If the buddy list is displayed in the left sidebar, height of
both these blocks needs to be changed to accommodate for the
changes.
The fixes the bug that stream list and user list don't fill
left sidebar and have 80px height regardless of viewport height.
When building search suggestions for stream topics, instead of
assuming that the user has access to the stream's topic history
from the server, we check whether the user has access to the
stream's topics.
Updates the check in compose validate for the organization's
policy on sending private messages to use the code/value in
settings_config, instead of the number value.
Private messages between a user and a bot are not restricted by
the organization's policy setting for sending private messages.
So, for the empty banner text, we set the default title for
a single bot for the "pm-with" narrow.
Group private messages that include a bot are restricted by
this policy setting, so those messages stay the same.
Also, since bot's aren't people, we update the text for valid
"pm-with", "sender" and "group-pm-with" operands to include the
user's full name in the title.
When there are multiple people in the "pm-with" narrow, we still
send a generic "these people" message instead of listing all the
users in the narrow.
Finally, we make the default message end in a period instead of
an exclamation mark.
For narrows that focus on private messages ("is:private", "pm-with",
"group-pm-with"), we want to check the organization private message
policy and set an empty narrow title that matches that policy.
For these narrows with invalid users, we prioritize that message
for the empty narrow title, instead of the private message policy
message.
Fixes#21889.
A user could trigger a "pm-with" narrow with an invalid user by moving
back/forward in the session, which would trigger the compose box to
open via a hash change. Updates the check to pass in any "pm-with"
narrow with an invalid user.
Also, if the compose box was active/started in the previous view, but
without any content, then we want to actively cancel/close it in the
invalid user "pm-with" narrow.
If an organization has disabled sending private messages, we do not
want to load the compose box automatically for "pm-with" narrows.
We still open the compose box for private messages narrows with a
single bot user as this is not limited by this organization setting.
Also, if the compose box was active/started in a narrow with a bot
user, but had no content, then we want to close/cancel that in a
new narrow with a person or group.
Fixes#23332
Check if col we are trying to focus exists for the row inside
`set_table_focus`.
We call `revive_current_focus` after `topics_widget` is defined
since it can be used inside it.
Fixes#23331
Combine checks for last row between `vim_dowm` and `down_arrow`.
Check for the presence of unread counter in `set_table_focus`
directly so that it can be used in other cases as well. This is
especially useful when marking the last row in the table as read.
We used to hide and show topic rows in the DOM when topics are
updated. This resulted in incorrect calculations in the length of
visible topics. As a consequence, focus is sometimes set to hidden topic.
Removing hidden topics from DOM helps us keep
the calculations correct.
The fixes bugs related to focus being lost when trying to mute
or mark as read the last row.
Instead of topic filter box being a part of the list when keeps
updating, we move it out and fix its position.
This should reduce rendering time of topics list and provide
a smoother experience to users when waiting for topics list to
load.
This lets us provide a hook to where we've written some advice both on
what makes a good stream description, and also what Markdown formatting
is supported there.
Fixes#23376.
In the message actions popover menu, adds an additional check for
whether the mark as unread option should be displayed based on if
the message is a stream message and if the user is subscribed to
the message's stream.
The previous check looked at whether the settings overlay as a whole
was open, not whether the specific panel we're going to update was
rendered.
The other code paths calling from server_events_dispatch into this
module already correctly check meta.loaded.
We added this logging statement in
8d33a62eca, and we now have the data to
suggest this will happen in normal operation.
I left this as a blueslip.log, since it may be useful to see in the
leadup to another exception.
The message we are trying to remove from unread mentions might not
have been fetched locally.
Fortunately, the `unread_topic_counter` data structure is designed to
support exactly this kind of lookup.
This way, if the maintainer isn't able to update `main`,
the push doesn't add the shared-VERSION tag either.
That avoids ending up with a tag that potentially doesn't
get included in the history of the main branch.
The Git docs warn that servers might or might not support this
feature, but GitHub does -- indeed they boasted about it when it
first came out, in Git 2.4 back in 2015:
https://github.blog/2015-04-30-git-2-4-atomic-pushes-push-to-deploy-and-more/
The emoji matcher uses this property in is_unicode_emoji.
It doesn't quite make sense to be talking about "reaction types"
here -- we might use this for a message-reactions UI, but we might
just as reasonably use it for emoji UI in message composing. Ah,
well: I guess that's just a bit of messiness that we can deal with.
When "group-pm-with" is the first operator and setting an empty
narrow banner, check that the operand matches a user and set the
title based on whether the user exists or not.
Because "group-pm-with" is not a common search operator, instead of
setting a specialized title in the browser and tab, just use the
default title, "Search results".
Moves the three images of the web-app on different operating
systems (Mac, Ubuntu and Windows) to the same directory as
the two mobile-app screenshots, `/static/images/app-screenshots/`.
All five images are referenced in `static/js/landing-page.js`.
So that we can stop using Tim's photo for tests, adds an open
license profile picture to use instead.
Updates tests that used `tim.png` to use the new example profile
picture, which is located in `static/images/test-images/avatars/`.
Creates `static/images/authentication_backends` directory for icons
of backend authentication methods, which are used on the log-in page.
And updates the example documentation in the API `/server_settings`
endpoint.
Fixes#23273
Removed height restriction to allow the box to grow when text wraps
to the next line.
Aligned wrapped lines to the text in the first line instead of the
icon.
0.5 opacity felt too light; it made these appear similar in color to
muted streams, not as the intended grey text. This opacity reduction
is only applied in dark theme to sidebar titles.
This makes each of the call sites more straightforward and
transparent. In `query_matches_person` it also opens up further
simplifications, which we'll make next.
Since we're now exporting `query_matches_string` from this
shared module, we write its type in the `.js.flow` file.
Fixes#22911
`Back to streams`, stream name and filter topics are all sticky
now and their color changes based on which filter is active and
the currently applied theme.
Updates the `filter.get_title` logic to return the list of users
for narrows that include the pm_with and near operators. That way
the browser/tab title remains the same for these views.
Previously, when you clicked the confirmation button in a
dialog_widget, we'd display a loading spinner on top of an ugly grey
button background.
Remove the ugly grey background color, while making sure the loading
spinner inside the button looks good and doesn't resize the button.
Fixes: #22002