Commit Graph

5454 Commits

Author SHA1 Message Date
Aman Agrawal 9f67452155 settings_components: Keep saved button displayed a little longer. 2024-07-22 22:31:02 -07:00
Kenneth Rodrigues fccc338db5 modals: Fix focus for recent_view_ui and inbox_ui modals.
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`.
2024-07-22 22:29:58 -07:00
Kenneth Rodrigues dc85478c5d user_deactivation_ui: Fix focus when modal is open.
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.
2024-07-22 22:28:00 -07:00
roanster007 66a96bee71 settings: Add setting to control how animated images are played.
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.
2024-07-22 14:53:31 -07:00
Karl Stolley ce56c51e33 compose: Adjust popover-button breakpoints for wider left sidebar. 2024-07-22 12:09:42 -07:00
Karl Stolley c7cdda08f9 app_components: Display as flex in presence of show and flex classes. 2024-07-22 11:15:16 -07:00
Sahil Batra 63e82542d9 recent-view: Fix sorting arrows in recent views table heading.
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.
2024-07-22 11:13:51 -07:00
Sahil Batra e0bcf72521 stream_popover: Fix message topic edit without permission to edit channel.
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.
2024-07-22 10:24:37 -07:00
Shubham Padia 3631ebf3bf user_events: Update email in people_dict before updating compose state.
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.
2024-07-22 10:23:24 -07:00
Aman Agrawal 1e42d60850 message_view: Ignore fetched messages if user changed view.
If user is no longer in the current message list, then the
messages fetched for it are relevant to the current narrow and can
be safely ignored.
2024-07-21 23:42:07 -07:00
Aman Agrawal cc867de2c5 search: Fix outline of clear search button.
Fixed by including the margin and padding in the
`width: 100%` calculation.
2024-07-21 22:00:49 -07:00
Aman Agrawal e6df844865 message_view: Select message without rerender if possible.
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.
2024-07-21 21:03:39 -07:00
Alex Vandiver 14880b2b59 lightbox: Update caching to work with thumbnails.
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.
2024-07-21 18:41:59 -07:00
Alex Vandiver 60fc9eae2f thumbnail: Swap in our preferred thumbnail format. 2024-07-21 18:41:59 -07:00
Alex Vandiver 39d6f4ce10 thumbnail: Show the right spinner based on dark/light mode. 2024-07-21 18:41:59 -07:00
Alex Vandiver b42863be4b markdown: Show thumbnails for uploaded images.
Fixes: #16210.
2024-07-21 18:41:59 -07:00
Aman Agrawal 025fba0a11 views_util: Extract common calls. 2024-07-21 12:39:23 -07:00
Aman Agrawal 2a998e98a6 inbox: Don't capture key input when navbar search is in focus. 2024-07-21 12:39:23 -07:00
Kislay Verma de430f541c search: Improve text about searching public channels.
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
2024-07-20 15:42:41 -07:00
evykassirer d5883cfbb2 search: Empty input on open, and show current narrow search suggestions.
Fixes #30911
2024-07-19 16:55:09 -07:00
evykassirer 26429a81e0 search: Remove freshly-opened logic.
Reverts 991c8451cd, to be
replaced with other logic in an upcoming commit.
2024-07-19 16:55:09 -07:00
evykassirer 962667f81c search: Add function to calculate search query text. 2024-07-19 16:55:09 -07:00
Karl Stolley 707187edbf app_layout: Express calculated max-width in 14px / 1em. 2024-07-19 16:54:53 -07:00
Karl Stolley 800ae6d027 left_sidebar: Adjust left sidebar size, and account for right margin. 2024-07-19 16:54:53 -07:00
Karl Stolley 6793d5148c app_layout: Increase max-width to 1500px. 2024-07-19 16:54:53 -07:00
Karl Stolley 9534e0b5d0 left_sidebar: Size left sidebar to accomodate font, screen sizes. 2024-07-19 16:54:53 -07:00
Sayam Samal 0237ab8724 send_later_popover: Update calendar days icon.
This is a follow-up commit for 1ec5610 and e0ec522, which fixes issues
with the fill-rule of the `calendar-days.svg` icon.
2024-07-19 14:13:12 -07:00
Sayam Samal b3900656fe left_sidebar: Update eye icon to use the new Zulip custom icon. 2024-07-19 14:13:12 -07:00
Sayam Samal 6625ea53d4 left_sidebar: Update house icon to use the new Zulip custom icon. 2024-07-19 14:13:12 -07:00
Vector73 2cf06f34a0 dropdown: Fix partial highlight of list-item on hover. 2024-07-19 11:52:40 -07:00
Sahil Batra 6bc03ad996 stream_ui_updates: Pass missing parameter.
This bug was introduced in 08f35e08a4.
2024-07-19 11:26:44 -07:00
Karl Stolley a0f94d8142 search_pills: Add horizontal spacing to pills in typeahead list. 2024-07-19 09:45:41 -07:00
Karl Stolley fa7592e9a1 search_pills: Correct multi-user DM pill container height. 2024-07-19 09:45:41 -07:00
afeefuddin 92e0ad5c9e left_sidebar_navigation_area_popovers: Fix property name starred_message_counts.
The bug was introduced in 22a58c739c
2024-07-19 09:23:38 -07:00
Karl Stolley ac3ccf57a8 navbar_description: Refactor help-widget icon display. 2024-07-19 09:21:57 -07:00
Karl Stolley 325ab83edb navbar_search: Explicitly specify search input background color. 2024-07-18 16:02:02 -07:00
codewithnick b4c699db85 ui: Fix overflowing time tag in spoiler block.
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.
2024-07-18 12:37:03 -07:00
Sahil Batra d73fac481b stream-settings: Set max-width for stream creator pill.
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.
2024-07-18 12:34:53 -07:00
evykassirer d23d8b8565 search: Avoid duplicate search results from case sensitivity.
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.
2024-07-18 12:33:54 -07:00
Sayam Samal 43e1a643c0 compose_closed_ui: Change mobile "+" button behavior.
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.
2024-07-18 12:13:03 -07:00
Sayam Samal f545adcb93 compose_closed_ui: Remove unnecessary code updating the new DM button.
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.
2024-07-18 12:13:03 -07:00
Sayam Samal 39d6d3ed27 compose_closed_ui: Make UI in DMs view consistent with non DMs view.
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.
2024-07-18 12:13:03 -07:00
Aman Agrawal 48edf4c8b8 typeahead: Ignore mouse position once user uses keyboard.
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.
2024-07-18 11:52:37 -07:00
Sahil Batra 6b1216402f settings: Hide font size and line height inputs when compact mode is checked. 2024-07-18 11:36:53 -07:00
Sahil Batra d8aedc1f8e settings: Fix flashing of information density setting inputs.
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.
2024-07-18 11:36:53 -07:00
Sahil Batra 59068c24e9 settings: Pass dense_mode value if changing other settings.
This commit updates code to pass dense_mode value in request
if changing font size or line height settings to some value
other than legacy settings.
2024-07-18 11:36:53 -07:00
Prakhar Pratyush e1f3c54a1d message_edit: Fix tooltip not hidden on closing message edit form.
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.
2024-07-18 10:52:48 -07:00
Kenneth Rodrigues 2be9774192 integration_url_modal: Fix multiple modals opening.
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.
2024-07-18 10:46:52 -07:00
Kenneth Rodrigues 5023daaf9b settings_emoji: Fix multiple modals opening.
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.
2024-07-18 10:46:52 -07:00
Kenneth Rodrigues 87ff793b5a edit_linkifier: Fix multiple modals opening.
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.
2024-07-18 10:46:52 -07:00