Earlier the focus was not being set to the modal when it was opened.
This was because `is_in_focus` checks if `modals.any_active` which
checks `$(".micromodal").hasClass("modal--open")`.
But when `is_in_focus` is called
`$(".micromodal").hasClass("modal--opening")`.
This commit fixes the issue by creating a function
`is_active_or_animating` which checks if the modal has the class
`modal--open` or `modal--opening`.
Earlier, when the user deactivation modal was open, the focus was not
set on the modal. This commit fixes that by setting
`focus_submit_on_open` to `true` in the modal options.
Previously animated images were automatically played in the
message feed of the web app.
Now that we have still thumbnails available for them, we can add a new
personal setting, "web_animate_image_previews", which controls how the
animated images would be played in the web app message feed -- always
played, on hover, or only in the image viewer.
Fixes#31016.
This commit increases right padding for the th elements in recent
views table to make sure that the sorting arrow is visible correctly
for various screen width and font sizes. This change is similar to
what we did for tables in settings UI.
There was a bug when stream_id field was being passed as NaN when user
tried to edit topic of a message if the user did not had permission
to edit the channel.
This commit fixes it to not pass stream_id field in such cases because
channel cannot be changed.
Fixes#30992.
When a user changed an email, we updated the compose and narrow state
before updating that person's email in `people_dict`. This raised a
warning in `get_direct_message_permission_hints` when using
`emails_strings_to_user_ids_string` since that person's email wasn't
updated in `people_dict` by then.
We just changed the order of update so that the email is updated in
`people_dict` before we update compose and narrow state.
After navigating to a `near` narrow, user is likely to press back
to go back to previous selected message. To support this, we have
to select `then_select_id` without rerender, if we can.
Tested by using breakpoints with `near` links to check if the
correct code is being executed.
This moves the cache key for parse_media_data to being the "canonical"
image URL, not the displayed `img src`. We may not even have the `img
src`, if the thumbnail has not yet been generated.
We use different text for guest users, specifying that they can
only search in channels they can view.
The issue description suggests the same for spectators, but
we already use different text for them.
The search-operators help overlay is also updated with the same.
Fixes#30902
When rendering a spoiler block that includes a datetime format,
the dropdown button was pushed out of view on smaller devices.
This happened because the time tag was overflowing past
the spoiler blocks width.
This commit intends to fix this problem by adding a `white-space`
attribute to the rendered time tags which will stop it from
overflowing.
Fixes#30641.
We now set max-width on the pill value for stream creator pill
to make sure that the pill does not get too long for long names
and the full name can anyways be seen by clicking on the pill.
Previously, if you typed "channel: rome" you'd see a result for
both channel "rome" and a second one for "Rome". This commit
deduplicates that by comparing for duplicates without case
sensitivity.
Note that if you fully type "channel: rome" you'll see the
result with a lowercase R instead of uppercase. It would
be a bit involved to change this, so I'm leaving that as
something to address in the future.
This commit removes the popover from the "+" button shown in the closed
compose UI at mobile widths, and instead performs compose actions
directly on-click. The "+" button now opens the compose box with the
channel picker open (even if the user is in a topic or channel view).
This reduces the number of clicks required to start a new message from
the closed compose UI in mobile views, and makes the behavior more
consistent across all the views.
Fixes#30634.
The `update_new_direct_message_button` function sets the text for the
new DM button to "New direct message" on every update cycle, which makes
no difference since the button starts with that text and never changes.
This adds the "New direct message" button back in the closed compose UI
for DMs view, to make the closed compose UI consistent across the app.
Since the closed compose UI is always visible, and one that is likely
to be used frequently, it makes sense to have the same UI across all
the views to avoid the mental overhead of figuring out how to compose
a message in different views.
This keeps the first item focused when user uses keyboard.
User can still move the focused item using mouse and click to select it.
Highlighting an item via mouse and then pressing enter would select
the highlighted item.
We change the code to update the visibility of information
density setting inputs only on successful completion of
request and not on receiving events.
Visibility of inputs is not being live updated on receiving
events because that leads to flashing of inputs when deselecting
the "Compact mode" checkbox due to the data being sent in
different events and data with the client being different for
time till the all events are received.
Bug:
A tooltip appears on hovering over a control button in the
message edit form. Now when the form was closed either using
Esc key (cancel) or Enter / Ctrl + Enter (save), the tooltip
didn't disappear. This resulted in a random tooltip visible
in the message list view.
Fix:
Since tippyjs doesn't hide tooltip even after the element is
hidden we need to explicitly hide the tooltip in those cases.
See https://github.com/atomiks/tippyjs/issues/938
This commit fixes the above mentioned bug by explicitly hiding
the tooltip instance.
Earlier the `generate integration url` button (fa-link) was still in
focus even after opening the modal.
This caused the modal to open multiple times when the user pressed the
enter key. This commit fixes that issue by focusing on the input
dropdown when the modal is opened.
Earlier the `Add a new emoji` button was still in focus even
after opening the modal. This caused the modal to open multiple times
when the user pressed the enter key. This commit fixes that issue by
focusing on the input field when the modal is opened.
Earlier the `edit` button was still in focus even after opening the
modal. This caused the modal to open multiple times when the user
pressed the enter key. This commit fixes that issue by placing the
carat at the end of the first input field when the modal is opened.