Commit Graph

5547 Commits

Author SHA1 Message Date
Kenneth Rodrigues 4b04e2c09c ListWidget: Fix sliding of actions column in tables.
Added right padding to the actions heading in the table.

Fixes #29633.
2024-07-31 22:38:42 -07:00
afeefuddin eab78d996d node tests: Add make_stream helper to create streams in node tests.
With a bunch of comments by tabbott on some details to pay attention
to.
2024-07-31 22:26:55 -07:00
Varun Singh 8570cd81b1 message_events_util: Convert module to TypeScript. 2024-07-31 14:33:11 -07:00
Varun Singh 95a20e29b6 message_events_util: Avoid calling 'process_new_message'for type sanity.
Function `message_helper.process_new_message` takes a
`RawMessage` and throws out `Message`. But here we are
passing it an already processed msg of type `Message`.
This is completely type unsafe. Since our purpose here is to
replace our old message object with a latest copy from
`message_store`.
We can do this directly without calling `process_new_message`.
2024-07-31 14:33:11 -07:00
Anders Kaseorg d074848673 web: Condense unnecessarily verbose function signatures.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-07-31 13:18:35 -07:00
Karl Stolley 6b8fc6de36 rendered_markdown: Lay out time spans with inline-flex. 2024-07-31 13:14:35 -07:00
Karl Stolley 887e7e1e13 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.
2024-07-31 12:37:19 -07:00
Karl Stolley cc1cfa9336 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.
2024-07-31 12:37:19 -07:00
Karl Stolley df04c4c1f9 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.
2024-07-31 12:37:19 -07:00
afeefuddin e35fb72a97 landing-page: Convert module to TypeScript. 2024-07-31 10:11:43 -07:00
afeefuddin ab9b748ee3 base_page_params: Update contributors schema in team_params_schema. 2024-07-31 10:11:43 -07:00
Karl Stolley 82b0732b11 message_controls: Add missing class to edit buttons. 2024-07-31 09:15:41 -07:00
Karl Stolley 0831636050 user_profile: Properly center icon for copying URLs. 2024-07-30 16:29:09 -07:00
Tim Abbott 4ae16b7568 stream_list: Fix handling of unsubscribing from last channel.
This check been present since
466beef6fe, but it seems unnecessary in
that the main logic handles there being 0 channels just fine, that's a
rare case (so not a useful optimization), and importantly, not calling
stream_list_sort.sort_groups for that transition resulted in
`stream_list_sort` having stale data structures, resulting in
exceptions if one tried to open the CHANNELS filter widget in the
newly-no-channels state.
2024-07-30 13:53:38 -07:00
Karl Stolley e11cfd7ba8 modal_button: Use negative outline-offset to compensate for scaling. 2024-07-30 11:27:19 -07:00
Aman Agrawal 6c500e9a6e typeahead: Fix typeahead overflowing out of window.
When the caret in textarea is around the right end of the screen,
typeahead can overflow the window. To fix it, we use tippy's
mechanism to keep the tooltip inside the visible boundary.
2024-07-30 11:25:49 -07:00
afeefuddin a88445a6d2 integrations_dev_panel: Convert module to TypeScript. 2024-07-29 15:19:43 -07:00
afeefuddin 6019d8ae17 integrations_dev_panel: Use status key to get the status code. 2024-07-29 15:19:43 -07:00
afeefuddin d3217206ed integrations_dev_panel: Pass correct value to set_message. 2024-07-29 15:19:43 -07:00
Sayam Samal 5549e807eb rendered_markdown: Remove universal selector for embedded content.
This removes the `.message_embed > *` selector which was expensive, and
instead moves the styles to the specific elements that need them.
2024-07-29 15:08:54 -07:00
Karl Stolley 75a20f98d0 message_controls: Explicitly select .message_control_button. 2024-07-29 14:13:31 -07:00
Karl Stolley 6bc7b617d8 message_controls: Add explicit message-controls-icon class. 2024-07-29 14:13:31 -07:00
Karl Stolley aa83b1b5cd message_row: Move message_controls into proper place in row file. 2024-07-29 14:13:31 -07:00
Karl Stolley da7114918f streams_settings: Removed unused FontAwesome references. 2024-07-29 13:19:35 -07:00
Karl Stolley c8ba0f7abf rendered_markdown: Remove incorrect selector with unused color. 2024-07-29 13:18:26 -07:00
Aman Agrawal a43c0693b7 scroll-to-bottom: Fix misclicks to scroll to bottom button.
Scroll to bottom button is visible for a few ms when switching
narrow to Inbox / Recent view while scrolling in message feed.
While we can end the transition faster to completely avoid the issue
for now but this seems like a more permanent and simpler fix
than to fiddle with CSS.
2024-07-27 09:35:12 -07:00
Tim Abbott 68c4d145b0 message_reactions: Use the reactions tooltip template.
Using the existing tooltip template for the other "add emoji reaction"
element in message_controls results in the keyboard shortcut being
shown and avoids doing work to translate the string for every single
message containing emoji reactions.
2024-07-27 09:25:51 -07:00
evykassirer 12207407c9 css: Use classname for topic visibility tooltip instead of span. 2024-07-26 14:42:25 -07:00
evykassirer a243191539 settings css: Use selector for empty option text instead of span. 2024-07-26 14:42:24 -07:00
evykassirer e0b0a3638e portico css: Use classname for header text instead of span. 2024-07-26 14:41:08 -07:00
evykassirer cc6118efae integrations css: Use classname for back to list link instead of span. 2024-07-26 14:41:08 -07:00
evykassirer f7a27be0a8 settings css: Use classname for checkbox label instead of span. 2024-07-26 14:41:08 -07:00
evykassirer 5ed19d1971 landing_nav css: Use classname instead of span for realm name. 2024-07-26 14:41:08 -07:00
evykassirer 9824f76e7d css: Use a classname instead of span for overlay plus button. 2024-07-26 14:41:08 -07:00
evykassirer 952ca6ae3c css: Use color-animated-button-text instead of span selector. 2024-07-26 14:41:08 -07:00
evykassirer 1b8658670c css: Use classname for stream subheader name. 2024-07-26 14:41:08 -07:00
evykassirer 8427b6f744 css: Use classname instead of span selector for todo checkboxes. 2024-07-26 14:41:08 -07:00
evykassirer 90ab7f6287 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.
2024-07-26 14:41:07 -07:00
Tim Abbott 3ffc5c339f portico: Remove unused faqs CSS.
These were styles for a component removed in
f244336271.
2024-07-25 17:31:12 -07:00
Aman Agrawal 88b54526ba message_view: Fix current narrow doesn't rerender when asked to.
Here we want to rerender the current narrow after receiving an
event which moves messages. We have mechanisms to keep using
the cached list if we are narrowing to the same narrow which
we want to avoid in this case.
2024-07-25 12:02:57 -07:00
Shubham Padia bbd9b91238 hotkey: Put focus back into edit text area after Alt + P.
Fixes
https://chat.zulip.org/#narrow/stream/101-design/topic/key.20combination.20for.20hotkey.20to.20toggle.20compose.20preview/near/1902135.
The logic to put focus back to textarea is not part of the
`clear_preview_area` function because you wouldn't expect a function
clearing the preview area to somehow put focus into the edit area.
2024-07-25 11:33:53 -07:00
roanster007 7f1396de32 lightbox: Update `canonical_url_of_media` to use URL pathname.
This reworks canonical_url_of_media to work with HTMLMediaElement,
making it possible to do cross-browser inspection of media sources.
(Firefox and Chrome disagree on whether to return the "href"
attribute as the path in the source, or a full URL).

Additionally, we ensure non-empty cache keys on media so
unexpected results from the DOM do not get cached.

Co-Authored-By: Alex Vandiver <alexmv@zulip.com>
Co-Authored-By: roanster007 <rohan.gudimetla07@gmail.com>
2024-07-25 11:21:02 -07:00
Tim Abbott f61f138b75 tooltips: Clean up aria-label for visiblity tooltips.
Using different punctuation for the aria-label from the tooltip is
silly. Additionally, we don't need to repeat the channel name in
aria-label; it essentially will never be seen and the message list
copy of getting the channel name was buggy.
2024-07-25 08:24:14 -07:00
Tim Abbott a1c8e3549a message_list_view: Don't assume stream_id is defined. 2024-07-25 08:24:14 -07:00
Tim Abbott cbca3a8080 lightbox: Don't try to use unavailable width.
We don't have a width for images without dimensions attributes, and
all such images will have used the other code path.
2024-07-24 17:44:36 -07:00
Aman Agrawal dd7a5ac4c5 recent_view_ui: Fix dm rows not updated for deleted messages.
Tested by deleting a DM and navigating to recent view. No error
is thrown and dm row is correctly placed.

Co-authored-by: Tim Abbott <tabbott@zulip.com>
2024-07-24 13:51:56 -07:00
Pratik Chanda 1ccf5e3ac3 tooltip: Change tooltip info for default topic menu option.
Earlier tooltip info for the default topic menu notification option
had static string to display.

This commit changes the string info and includes channel name and its
corresponding privacy icon to display in the tooltip.
2024-07-24 13:34:52 -07:00
Pratik Chanda 4ef7394df4 tooltip: Change tooltip for topic menu option.
Earlier tooltips for topic menu button had inconsistent context with
that of other tooltips. In topic menu tooltip, action was described in
first line which different from that of other tooltips.

This commit changes the tooltip context and rearranges them to match
the format of action on first line and more context on second line.
2024-07-24 13:31:24 -07:00
Sahil Batra 9aa4ce28ce css: Improve selectors used for recent topics table.
Using "*" selector is inefficient as they require checking every
element because of the browser's bottom-up matching process.
This commit instead updates the selector to use individual
classes for elements to apply the CSS rules keeping in mind
to use unique class names instead of general class names.
2024-07-24 12:31:20 -07:00
Sahil Batra b0e8096579 css: Do not use "*" selector for color_animated_button styles.
Using "*" selector is inefficient as they require checking every
element because of the browser's bottom-up matching process.
2024-07-24 12:31:20 -07:00