Commit Graph

5566 Commits

Author SHA1 Message Date
Aman Agrawal 2011e0df76 inbox_ui: Fix row_focus not synced with inbox rows.
Have one inbox row and focus on it. Mark the message as read in
another tab. Press `r` in the first tab will return an error as
the row_focus didn't change but there is no present. So, we
fix it by updating the row_focus if it can get out of bounds
when updating inbox view.
2024-08-02 09:36:37 -07:00
Sahil Batra 506ead4468 settings: Use new group setting to check web-public stream creation.
This commit updates code in webapp to use new group-based setting
for checking web-public stream creation permission.
2024-08-01 22:49:33 -07:00
Sahil Batra e71c3007f6 tests: Refactor group settings test in settings_data.test.ts.
This commit refactors the common function used for test in
such a way that we can test more cases for a group setting
along with the ones tested by the common function.
2024-08-01 22:49:33 -07:00
evykassirer 09f4f787b8 search_pill: Replace user display_value with full_name. 2024-08-01 17:31:59 -07:00
evykassirer 271efb70fa input_pill: Remove InputPillItem now that details are handled elsewhere. 2024-08-01 17:31:59 -07:00
evykassirer 6e47d851ec input_pill: Remove display_value in favor of module-specific values.
This commit is part of a bigger project to remove custom logic in
the input_pill module. This commit move us away from a world where
we have a `display_value` that's used as identifying information
for a pill as well as for what we display to the user. Now individual
widgets can configure how they come up with a display value based
on the data of that type of pill.

Note: The change in the stream pill test for setting subscribers
for denmark is fixing an issue that wasn't discoverable before.
There always should have been three subscribers.
2024-08-01 17:31:59 -07:00
evykassirer 7dfb928277 search: Calculate display_value from SearchPill item.
We no longer need to do `robust_url_decode` because we're
creating the display value ourselves, whereas previously
we were using `Filter.unparse` which does encoding.
2024-08-01 17:31:59 -07:00
evykassirer c19ecf7c07 input_pill: Remove (now) unused custom stream logic. 2024-08-01 17:31:59 -07:00
evykassirer ccbc569bab invite_stream_picker: Don't rely on custom code in input_pill.
By using a custom `generate_pill_html`, we can remove the
`has_stream` logic in `input_pill`, as part of a wider effort
to remove custom pill logic in `input_pill`.
2024-08-01 17:31:59 -07:00
evykassirer 0d52ced27a input_pill: Move group and stream logic to add_subscribers module.
This is part of a larger effort to refactor input_pill to
remove custom logic and move it into relevant modules.

This commit completely removes group_id from all modules, but
there's another module that uses stream that must be refactored
before that can be removed from input_pill.
2024-08-01 17:31:59 -07:00
evykassirer 443e24390b input_pill: Move user fields off of InputPillItem to UserPill.
This is part of a larger effort to move custom code out of
the input_pill module, and this commit is made possible by
earlier commits.
2024-08-01 17:31:59 -07:00
evykassirer 2b7d14084b input pill: Move user pill rendering code to user_pill.
This is part of a larger effort to refactor input_pill to
remove custom logic and move it into relevant modules.
2024-08-01 17:31:59 -07:00
evykassirer aa0b150265 input pill: Move search html logic to search_pill.
This is part of a larger project to move custom
logic out of input_pill. The `generate_pill_html`
function will be used for other modules in upcoming
commits.
2024-08-01 17:31:59 -07:00
evykassirer 92d67fb00c input_pill: Rename <T> to <ItemType>. 2024-08-01 17:31:59 -07:00
evykassirer 78c9adb33c search: Remove unused description_html. 2024-08-01 17:31:59 -07:00
evykassirer c09dbcc781 search: Use search terms instead of query text for some helper code.
NarrowTerm can hold more information than a string, and is more
robust.
2024-08-01 17:31:59 -07:00
Karl Stolley 2f726b20ed 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.
2024-08-01 16:30:56 -07:00
Karl Stolley bee5cd4e04 rendered_markdown: Update markdown timestamps to use Zulip icon.
Fixes: #28830
2024-08-01 16:28:30 -07:00
Alex Vandiver 2d0468bde5 lightbox: Disable controls on video previews in lightbox.
Setting any value for a boolean attribute (like "controls") enables
it.
2024-08-01 09:23:45 -07:00
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