Commit Graph

5567 Commits

Author SHA1 Message Date
Aman Agrawal 27ad311b38 recent_view: Fix backfill data not updated after reload.
This fixes backfill data not being inserted in recent view if
recent view was open when it received the backfill data.

Fixed by inserted rows in the sorted order instead of inserting
them randomly which caused rows to not be inserted if there were
no rows around the row being inserted.

(cherry picked from commit 6fe3ceb0ee)
2024-11-19 17:14:11 -08:00
Aman Agrawal bd41af941e echo: Fix send messages not visible when auto narrowed to recipient.
We simply forgot to `add_to_narrow` locally echoed messages if
the current narrow changed before we received confirmation from
server.

(cherry picked from commit 3fe1e554a6)
2024-11-18 18:32:25 -08:00
Anders Kaseorg f09c6ee9b1 styles: Fix invalid CSS generated due to @extend misusage.
@extend can only be used in an element selector, not directly within
@media.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit 2c8ad219b1)
2024-10-25 08:22:14 -07:00
Anders Kaseorg 3920e513c5 localstorage: Fix removeDataRegexWithCondition to check parsed data.
Commit bca41fd29f (#23028) introduced
this for reload.is_stale_refresh_token, which had always returned true
because it was operating on the raw JSON string rather than the parsed
data.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit 782fa2a803)
2024-10-25 08:22:14 -07:00
Karl Stolley e31896f70e lightbox: Address edge case where media may be unavailable.
(cherry picked from commit 708d07a885)
2024-10-09 17:13:37 -07:00
Karl Stolley 0364628241 lightbox: Restore centered media list.
(cherry picked from commit ead6f29200)
2024-10-09 17:13:37 -07:00
Anders Kaseorg ccbe584571 filter: Fix unparse to round-trip Unicode whitespace operands.
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>
(cherry picked from commit 9c2da46966)
2024-10-09 17:13:37 -07:00
Anders Kaseorg f17aac634d electron_bridge: Harden against hypothetical DOM clobbering attacks.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit 2440c6d244)
2024-10-09 17:13:37 -07:00
Anders Kaseorg b0ca121cbb uploaded_files_list: Fix id pollution.
The HTML id attribute is supposed to be globally unique; it’s not an
appropriate place to store a user-controlled string, or to identify
part of a component that’s rendered more than once.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit b0653d1ea4)
2024-10-09 17:13:37 -07:00
Karl Stolley c27f09f7c8 message_controls: Add missing class to edit buttons.
(cherry picked from commit 82b0732b11)
2024-09-11 11:04:31 -07:00
Karl Stolley 4ec36eab8a message_controls: Explicitly select .message_control_button.
(cherry picked from commit 75a20f98d0)
2024-09-11 11:04:31 -07:00
Karl Stolley 96145ced7b message_controls: Add explicit message-controls-icon class.
(cherry picked from commit 6bc7b617d8)
2024-09-11 11:04:31 -07:00
Karl Stolley 8b4d448a0c message_row: Move message_controls into proper place in row file.
(cherry picked from commit aa83b1b5cd)
2024-09-11 11:04:31 -07:00
Karl Stolley f2bb6f7f01 compose: Specify non-alpha message-area colors.
This keeps colors uniform between edit and preview modes, and also
ensures no bleedthrough of the editor when in preview mode.

ID selectors have been used for those colors to both keep the text
color declaration in the same place, and to avoid a dark-theme
specificity problem where the generic textarea took precedence over
the colors specified on the compose box's own textarea.

(cherry picked from commit 2f726b20ed)
2024-09-11 11:04:31 -07:00
Karl Stolley 459f2ad7fd rendered_markdown: Remove expensive :first-child and :last-child selectors.
With the refactoring of the rendered-Markdown area to use only
margin bottom, including in message-edit previewsk, these expensive,
general selectors are unnecessary.

Headings and horizontal rules, which do have margin-top, are zeroed
out elsewhere in the rendered-markdown file.

(cherry picked from commit 887e7e1e13)
2024-09-11 11:04:31 -07:00
Karl Stolley 8ca34e856e message_preview: Set preview height based on edit area.
This ensures that neither the compose box nor the edit-message area
shifts when toggling back and forth between edit and preview modes.

(cherry picked from commit cc1cfa9336)
2024-09-11 11:04:31 -07:00
Karl Stolley 67e1813acf message_preview: Don't needlessly show/hide compose textarea.
Because the compose-box resize logic is tied to the size of the
textarea, it's possible when resizing in preview mode that the
state of the compose box is not properly tracked. That's because
the height logic in `autosize_message_content` assumes a visible
textarea.

However, because both the textarea and the message preview area
occupy the same named grid area (`message-content`), and because
the preview area comes after the textarea in the DOM, when visible,
the preview area will automatically cover (and be sized to) the
textarea. And because the textarea remains observable in the DOM,
the compose box will obey the same expansion logic in preview mode
as it does in edit mode.

(cherry picked from commit df04c4c1f9)
2024-09-11 11:04:31 -07:00
Karl Stolley 244d9ef545 message_row: Allow moved/edit markers to scale.
(cherry picked from commit 35f84e5381)
2024-09-11 11:04:31 -07:00
Shubham Padia 8aacfcdfee css: Use a class for spoiler header text.
Having the :not() rule there affected the performance, see
https://chat.zulip.org/#narrow/stream/6-frontend/topic/CSS.20selector.20performance/near/1920156
for more details.

(cherry picked from commit 4a7983fad3)
2024-09-11 11:04:31 -07:00
Aman Agrawal aeec61476c typeahead: Fix compose topic typeahead partially hidden.
The `flip` popper function is not working properly here since
we migrated to use Simplebar (Can be verified by removing
`data-simplebar`).

To fix it, we need to force trigger the function as soon as tippy
is attached to DOM.

(cherry picked from commit 240c870815)
2024-09-11 11:04:31 -07:00
Tim Abbott a940c91e2d css: Explode dark theme disabled rule.
This replaces a :disabled selector with individual ones for each
element type; I verified in CSS selector profiling that this change
removes lines that were previously about 10% of profiled CSS selector
processing time for rendering the combined feed.

The reason being that the rendered elements have very few disable-able
elements, but the browser was spending a lot of time trying to match
**every** element for whether it might have been disabled, which was
slow.

This probably reflects a browser bug.

(cherry picked from commit e4567e05ac)
2024-08-29 10:45:39 -07:00
Shubham Padia 8f65150a0f css: Remove unnecessary rule for subscriptions_overlay.
Even though the border-color was set for `#subscriptions_overlay
.subsection-parent div`, since the border-style was not set. It did not
have any effect on the appearance of the children div of
.subsection-parent.

(cherry picked from commit a746a7e784)
2024-08-29 10:45:39 -07:00
Shubham Padia e3189860ec css: Use padding-top instead of putting margin-top on first div.
It has the same visual effect and we do not have to use a div selector.
Having the `div` selector there affects the performance. See
https://chat.zulip.org/#narrow/stream/6-frontend/topic/CSS.20selector.20performance/near/1845719
for more details.

(cherry picked from commit 2081fb52a1)
2024-08-29 10:45:39 -07:00
Shubham Padia 4d9c1cda55 css: Use classname instead of div for .flex.overlay-content.
Each child div for .flex.overlay-content has the class
.overlay-container, so it is safe to replace the div with that
classname.
Having the `div` selector there affects the performance. See
https://chat.zulip.org/#narrow/stream/6-frontend/topic/CSS.20selector.20performance/near/1845719
for more details.

(cherry picked from commit 0d95d79033)
2024-08-29 10:45:39 -07:00
Shubham Padia f72f834c96 css: Use classname instead of `div` selector for .blocks.
Having the `div` selector there affects the performance. See
https://chat.zulip.org/#narrow/stream/6-frontend/topic/CSS.20selector.20performance/near/1845719
for more details.

(cherry picked from commit 8b96aa277a)
2024-08-29 10:45:39 -07:00
Shubham Padia e5f84647ba css: Use flexbox for .stream-row and .group-row.
Before this, we were having each direct child div for both the classes
as inline blocks. It is better to just have `display: flex` on the
parent element instead. There is a slight change in appearance which has
been confirmed in
https://chat.zulip.org/#narrow/stream/6-frontend/topic/Subscription.20list.20slight.20look.20change/near/1906254

(cherry picked from commit e9d0e1d30d)
2024-08-29 10:45:39 -07:00
Shubham Padia d168ac06ec css: Remove unused css for top-bar & bottom-bar for subscriptions.css.
These were added in ae7fe85ec5, and
should have been deleted in 333b8b095c.

Having those rules did not make any difference to the subscription and
user group list items.

(cherry picked from commit b619fbb7a7)
2024-08-29 10:45:39 -07:00
Shubham Padia dfafec3263 css: Use classname for .thanks-page instead of div.
Having the `div` selector there affects the performance. See
https://chat.zulip.org/#narrow/stream/6-frontend/topic/CSS.20selector.20performance/near/1845719
for more details.

(cherry picked from commit 52240e09ff)
2024-08-29 10:45:39 -07:00
Shubham Padia 80e6d0e2bc rendered_markdown: Remove unused .data-container div css.
Having that css there or not did not make any visual difference.

(cherry picked from commit a48ce954aa)
2024-08-29 10:45:39 -07:00
Shubham Padia 7ec93b920c css: Use class_name for .client-logos div.
Having the `div` selector there affects the performance. See
https://chat.zulip.org/#narrow/stream/6-frontend/topic/CSS.20selector.20performance/near/1845719
for more details.
We've introduced a new class called `.client-logos-div`.
In `hello.ts` we just manually append the name of this new class for the
logo changing logic since that felt more readable than adding the class
programmatically.

(cherry picked from commit 996a091bd9)
2024-08-29 10:45:39 -07:00
Shubham Padia 614dca46b4 app_components: Remove unused div selector css.
Having the styling there or not did not make any difference visually to
either of the drafts, scheduled messages or edit history overlays.

(cherry picked from commit f0e484ea07)
2024-08-29 10:45:39 -07:00
Karl Stolley d55b61e7be streams_settings: Removed unused FontAwesome references.
(cherry picked from commit da7114918f)
2024-08-29 10:45:39 -07:00
Aman Agrawal 70f2435bbc message_view: Update narrow title after change in narrow filter.
This needs to be done to update narrow title for different
`near` message targets or no `near` topic narrows.

(cherry picked from commit aac75f87f9)
2024-08-29 10:45:39 -07:00
Tim Abbott 9cb7812459 node tests: Improve documentation for message_list_view test.
(cherry picked from commit 8c6d61f4a6)
2024-08-29 10:45:39 -07:00
evykassirer c5bce5c59a message_list: Reduce _RENDER_WINDOW_SIZE to 250.
The message feed can take long enough to render that
users are locked out of clicking things for a second
or so. This has become especially an issue since we
updated the search bar logic to refresh the message
feed as search terms are added to the search bar.

More details on CZO here:
https://chat.zulip.org/#narrow/stream/101-design/topic/search.20narrow.20live.20update

(cherry picked from commit 9b78cc3240)
2024-08-29 10:45:39 -07:00
evykassirer 521c739a93 message_list_view: Add test helper to calculate move ranges.
(cherry picked from commit 5607d840e5)
2024-08-29 10:45:39 -07:00
evykassirer 050eda566c css: Use classname for topic visibility tooltip instead of span.
(cherry picked from commit 12207407c9)
2024-08-29 10:45:39 -07:00
evykassirer df5b23ece2 settings css: Use selector for empty option text instead of span.
(cherry picked from commit a243191539)
2024-08-29 10:45:39 -07:00
evykassirer dd3aeb9478 portico css: Use classname for header text instead of span.
(cherry picked from commit e0b0a3638e)
2024-08-29 10:45:39 -07:00
evykassirer b488d7b6cd integrations css: Use classname for back to list link instead of span.
(cherry picked from commit cc6118efae)
2024-08-29 10:45:39 -07:00
evykassirer 166c9489d5 settings css: Use classname for checkbox label instead of span.
(cherry picked from commit f7a27be0a8)
2024-08-29 10:45:39 -07:00
evykassirer aa0fba7580 landing_nav css: Use classname instead of span for realm name.
(cherry picked from commit 5ed19d1971)
2024-08-29 10:45:39 -07:00
evykassirer 14cd679cc9 css: Use a classname instead of span for overlay plus button.
(cherry picked from commit 9824f76e7d)
2024-08-29 10:45:39 -07:00
evykassirer 81502f28d1 css: Use color-animated-button-text instead of span selector.
(cherry picked from commit 952ca6ae3c)
2024-08-29 10:45:39 -07:00
evykassirer 823f32454a css: Use classname for stream subheader name.
(cherry picked from commit 1b8658670c)
2024-08-29 10:45:39 -07:00
evykassirer 33e10eaa04 css: Use classname instead of span selector for todo checkboxes.
(cherry picked from commit 8427b6f744)
2024-08-29 10:45:39 -07:00
evykassirer 2d5c3f41c2 css: Remove unused span selector in scroll to bottom container.
This rule was originally introduced with a span element in
0eafa6039b but the span has been
since removed.

(cherry picked from commit 90ab7f6287)
2024-08-29 10:45:39 -07:00
Alya Abbott 33f229de15 help: Tweak keyboard navigation docs for combined and DM feeds.
(cherry picked from commit 97707ae9e2)
2024-08-29 10:45:39 -07:00
evykassirer 6b7b3abc8d message_edit: Fix type of message id for aborting video.
This fixes a bug introduced by 9cf9cec.
2024-08-20 08:03:43 -07:00
Karl Stolley 9d7bb04dfd rendered_markdown: Remove incorrect selector with unused color.
(cherry picked from commit c8ba0f7abf)
2024-08-15 00:11:42 -07:00