Commit Graph

5106 Commits

Author SHA1 Message Date
Aman Agrawal d2d479ba61 stream_topic_history: Fix wrong topic order when moving messages.
Fixes #27500

It is hard to reproduce the bug but this should fix any bugs
involving topic order when moving messages since we are updating
the data again from the server.
2024-06-27 14:59:45 -07:00
Aman Agrawal d80dba75c5 stream_topic_history: Remove the concept of historical topics.
It is hard to maintain the concept of `historical` topics locally,
thus, we remove them entirely to simplify what we can do here.

This commit can introduce bugs when are addressed in the next commit.
2024-06-27 14:59:45 -07:00
Aman Agrawal d381a358d0 message_events: Remove message from message_store on deletion.
We did not remove the deleted messages from message_store
previously. This commit adds the code to remove the deleted
messages from message_store.

Co-authored-by: Sahil Batra <sahil@zulip.com>
2024-06-27 14:59:45 -07:00
sanchi-t 281ce39a0d template_stub: Remove the requirement to mock templates.
We will now just run the actual template if not mocked, such that code
that ends up rendering a template incidentally does not need to mock
templates.

Co-authored-by: Tim Abbott <tabbott@zulip.com>
2024-06-27 11:58:59 -07:00
Aman Agrawal edb02fcc98 giphy: Fix focus outline left vertical line not visible. 2024-06-27 09:19:23 -07:00
Aman Agrawal f27488adc9 giphy: Upgrade giphy to implement TODO.
Upgraded to use the tabindex support provided by giphy itself.
2024-06-27 09:19:23 -07:00
Sahil Batra d60075a8cf settings: Make the label for disabled checkboxes less faded.
This commit updates the CSS to makes the label for disabled
checkbox less faded such that it is faded enough to figure out
that the setting is disabled but the text is also visible clearly.
2024-06-27 09:18:39 -07:00
Aman Agrawal 39bcb6bd8b typeahead: Remove all sources of white space inside `strong` element.
We are using `white-space: pre` which doesn't condense whitespaces,
so we need to remove any unintentional whitespaces here.
2024-06-27 09:18:23 -07:00
Anders Kaseorg 3dccb72519 dependencies: Upgrade JavaScript dependencies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-26 21:34:18 -07:00
Anders Kaseorg 7d4d4017b3 eslint: Fix unicorn/prefer-array-find.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-26 20:13:26 -07:00
Anders Kaseorg 4428609ece eslint: Fix unicorn/prefer-includes.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-26 20:13:26 -07:00
N-Shar-ma 9bc1eb4bb9 compose: Allow 3-way compose box resizing with new fixed expanded state.
Apart from the normal (collapsed) and full screen sizes, a new expanded
state with the same size as the maximum a normal compose box can stretch
to when full (40% of the screen height) is now available. Now a user can
expand the compose box without it covering the full screen with a click.
The vertical resize icon in the bottom right corner of the compose box
is rendered useless so has been removed.

All three states can be cycled through by clicking the compose resize
button in the order: collapsed -> 40% of the screen -> full screen. When
a message naturally causes the compose box in its normal state to expand
up to 40% of the screen, clicking the resize button will take it to full
screen state.

Fixes: #29966.
2024-06-26 16:36:52 -07:00
N-Shar-ma b432b269ee refactor: Make compose size related variables & functions more specific.
We divide functionality into that for "full_size" and "expanded", which
are identical for now.

This is a prep commit for adding an intermediate expanded screen size.
2024-06-26 16:36:52 -07:00
Aman Agrawal 5f956cd369 typeahead: Change background of active elements. 2024-06-26 16:31:28 -07:00
Aman Agrawal a8eff69fc2 typeaheads: Reduce left padding for all elements.
This required taking special care of typeaheads with user circle
and making sure long typeaheads wrap correctly.
2024-06-26 16:30:26 -07:00
Aman Agrawal 52ac602acb typeahead: Make them look like dropdown widget.
This attempts to change background color and text color of typeaheads
to be same as dropdown widgets we have in the app.
2024-06-26 16:26:31 -07:00
Sahil Batra 1fac997338 settings: Refactor CSS for "control-label-disabled" class.
We previously had two CSS rules for control-label-disabled
class, one in settings.css and one in subscriptions.css
and the rule in subscriptions.css was being used by all
the elements with that class.

This commit refactors the code to have only single CSS rule
for that class with the value being set to the one used in
subscriptions.css, because that was the one being used and
that also looks better in terms of design, and the CSS is
defined in settings.css since it can be considered more
general file for writing CSS used in organization/personal
settings along with stream settings.

This commit also removes the unused code for
".control-label-disabled.enabled" selector since we no
longer use that selector.
2024-06-26 14:22:47 -07:00
Sahil Batra f7a6d841c8 stream-settings: Fade label of disabled default stream checkbox. 2024-06-26 14:22:47 -07:00
Sahil Batra 28174aecca settings: Fade label for disabled checkbox. 2024-06-26 14:22:47 -07:00
afeefuddin 22a58c739c left_sidebar_navigation_area_popover: Convert module to TypeScript. 2024-06-26 14:08:39 -07:00
adnan-td 4bde1586e4 topic_name: Fix compressing of display topic names.
Fixes part of #30478.
2024-06-26 12:23:32 -07:00
evykassirer 7ae0972c28 typeahead: Hide by default and show container on `show()`.
This avoids a bug (currently only for search) where the page
can be loaded with an empty but visible (half-loaded) search
typeahead.
2024-06-26 12:02:10 -07:00
Karl Stolley b519344dd9 message_controls: Remove unreachable read-receipt styles. 2024-06-26 12:00:21 -07:00
Karl Stolley cedc34bdea widgets: Remove hard-coded 14px font-size. 2024-06-26 12:00:21 -07:00
Karl Stolley 67b8b9e13a settings: Remove font size, unnecessary height from emoji file name. 2024-06-26 12:00:21 -07:00
Pratik Chanda 81abbab0d8 pm_list: Fix duplicate DM row in left sidebar.
When narrowing to a DM with their own user pill in recipient, a
duplicate DM row gets rendered.

This commit fixes this behaviour and doesn't render a separate row
when one's own email is included in recipient.

Fixes regression from zulip#29175.
2024-06-26 10:12:57 -07:00
Pratik Chanda d3fbfeae31 topic_list: Fix duplicate topic rows in left sidebar.
When narrowing to an existing topic name with different casing, left
sidebar renders duplicate topic rows for the existing topic name and
one with the different casing. Since topic names are case insensitive,
it should narrow to the existing row only.

Fixes regression from #29175.
2024-06-26 10:12:57 -07:00
Aman Agrawal ef09051003 css: Move text-error class from bootstrap.
Remove hover and focus CSS for anchor tags since `text-error` elements
which use this CSS right now don't have anchor tag.
2024-06-26 10:03:05 -07:00
Aman Agrawal 2eefe94b94 stream_settings: Add color for success message.
This was incorrectly removed in
98637e3a88.
2024-06-26 10:03:05 -07:00
Aman Agrawal 959bf39320 bootstrap: Remove unused `text-warning` class. 2024-06-26 10:03:05 -07:00
Karl Stolley c0837a6d20 status_emoji: Allow status emoji to scale with text. 2024-06-26 10:02:13 -07:00
Karl Stolley 818094f81d user_circles: Set user circles to scale with text. 2024-06-26 10:01:24 -07:00
Karl Stolley a43ae2a561 user_circles: Address TODO and remove styles. 2024-06-26 10:01:24 -07:00
Karl Stolley 4c1cc4e62e mention_pills: Allow pills to scale with other message text. 2024-06-26 09:51:29 -07:00
N-Shar-ma dcf2c67f2d typeahead: Add non breaking space (\u00a0) to list of word separators. 2024-06-25 22:52:28 -07:00
Aman Agrawal c8379b4f9a message_fetch: Stop infinite fetch for first unread message id.
Found while migrating message_fetch to Typescript in #30509.
2024-06-25 22:51:43 -07:00
Alya Abbott b892f8a7a8 notifications: Test notification should say that it's a test. 2024-06-25 17:28:17 -07:00
Alya Abbott 145654fd55 notifications: Improve label for button to test desktop notifications. 2024-06-25 17:28:17 -07:00
Aman Agrawal 9e0a3bebfd recent_view: Fix right arrow not working on read DM rows.
Fixed by letting col_focus exceed max selectable rows in this case
and having it reset back to 0.
2024-06-25 14:12:19 -07:00
Aman Agrawal a83b882705 inbox_ui: Let browser handle tab key. 2024-06-25 14:12:19 -07:00
Aman Agrawal 2bf3191ddf recent_view: Let browser handle tab hotkey. 2024-06-25 14:12:19 -07:00
Aman Agrawal 1c3c794385 views: Set focus to topic visibility icon on click. 2024-06-25 14:12:19 -07:00
Aman Agrawal dd071c7303 topic_visibility: Remove deprecated topic visibility toggle classes.
These classes became slowly unused as switched to the new topic
visibility system over time.
2024-06-25 14:12:19 -07:00
Aman Agrawal 909a0c1843 recent_view: Don't allow user to focus on time.
Since we don't want col_focus to be on the time column as we don't
track it in recent view, we simply mark it as an element user
cannot focus to avoid any confusion.
2024-06-25 14:12:19 -07:00
Aman Agrawal b0978ba4d5 tippy: Fix sidebar toggle button tooltip not hidden on blur.
Tabbing through the navbar elements, `Hide user list` tooltip
stays visible even if focus is moved away from it.

We move tooltip to the element receiving focus and blur event
to fix it. See previous commit for more details.
2024-06-25 14:12:19 -07:00
Aman Agrawal 23927ea5b1 left_sidebar: Fix tooltips not hidden on blur.
The elements which received focus didn't have tooltips attached to
them, thus when blur was triggered on `a`, the tooltip didn't hide
as it was not listening on it for the blur event.

We move the toolip to `a` elements so that when focus and blur
are triggered tippy is able to capture them.
2024-06-25 14:12:19 -07:00
Lauryn Menard 79fc430b56 narrow: Expand informative text in empty starred messages view.
Fixes #29378.
2024-06-25 14:11:42 -07:00
Lauryn Menard 89a3c290db narrow: Expand informative text in empty mentioned messages view.
Limits the width of the empty message notice to 600px so that this
longer and more descriptive text is similar to the width of the
empty header text.
2024-06-25 14:11:42 -07:00
Aman Agrawal cd2812c131 message_notifications: Tag notification text for translation.
Fixes #21032
2024-06-25 14:11:06 -07:00
Aman Agrawal 07525a2f7d message_notifications: Split title into two parts.
We separate the prefix and suffix parts of title, so that they
can be translated independently later.
2024-06-25 14:11:06 -07:00
Aman Agrawal 98341d811e message_notifications: Remove unused `test-notification` case. 2024-06-25 14:11:06 -07:00
Sahil Batra d7d83618a4 settings: Refactor code to update realm group based settings.
This commit refactors code such that we do not add separate
if condition block for each realm group based settings using
the new API format to send the request accordingly. We now
use a single if-block to update the request data for realm
group permission settings using new API format.
2024-06-25 09:26:38 -07:00
Kislay Verma 84cd835a8c composebox_typeahead: Avoid generating broken stream-topic links.
The #**stream>topic** syntax generates broken links for
topics containing two backticks or ending with *, because of
architectural flaws in the backend markdown processor.
So we avoid generating the syntax for such topics and instead
generate the normal link syntax in markdown.

Fixes #19873
2024-06-24 18:14:33 -07:00
Anders Kaseorg b75e016a2c realm_user_settings_defaults: Restore missing members.
Commit 02e236f58a (#30519) caused Zod to
remove them.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-24 15:23:52 -07:00
Anders Kaseorg 7f49a4f0bd user_settings: Restore missing members.
Commit ed1c169bfb (#30519) caused Zod to
remove them.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-24 15:23:52 -07:00
Karl Stolley 8fb8bd95f0 info_density: Scale reaction emoji with font-size. 2024-06-24 15:05:53 -07:00
Anders Kaseorg f35e1fdef6 blueslip: Show popups for unhandled promise rejections in development.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-24 15:05:28 -07:00
Anders Kaseorg 148af2a301 blueslip: Show popups for thrown non-Error values in development.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-24 15:05:28 -07:00
Anders Kaseorg 18137709a1 typeahead_helper: Straighten CombinedPill types.
The generic argument of InputPillContainer should not be
InputPillItem<…>, as InputPillContainer already uses InputPillItem
where applicable.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-24 12:35:51 -07:00
Karl Stolley e235240685 info_density: Recalculate timestamp widths on density dispatch events. 2024-06-24 12:30:38 -07:00
Karl Stolley 3f6760f41a info_density: Correctly set em context for timestamp calculations. 2024-06-24 12:30:38 -07:00
Karl Stolley 7dc20a56f2 info_density: Move timestamp calculations to better location. 2024-06-24 12:30:38 -07:00
Shubham Padia 991fec5b23 hotkey: Don't close compose box on topic list input ESC.
Fixes https://chat.zulip.org/#narrow/stream/9-issues/topic/Pressing.20escape.20in.20topic.20filter.20closes.20compose.20box/near/1833316
Topic list escape key action should take preference over
open composebox.
2024-06-24 10:37:24 -07:00
Aman Agrawal 3aaf25e42d bootstrap: Remove unused dropdown class.
We don't have any element using dropdown class in codebase.
2024-06-24 09:06:53 -07:00
Aman Agrawal 244d4e9620 bootstrap: Move `hidden` class to `app_componenets`. 2024-06-24 09:06:53 -07:00
Aman Agrawal 8457d12e59 bootstrap: Remove `hide/show` classes. 2024-06-24 09:06:53 -07:00
Karl Stolley 83a590dc06 compose: Zero out UA padding on composebox buttons. 2024-06-24 09:03:13 -07:00
Aman Agrawal 6999d84ddc message_view: Select `near` message without rerender.
If the new narrow has the same terms except `near` message id,
then we select the message if it is already rendered in the
current message list.

Tested by sending link to two different messages in a narrow and
clicking to ensure we don't have any loading indicators active.

Tested we are scrolling to target message too if it was not in the
visible viewport but is rendered above.
2024-06-24 08:41:14 -07:00
Karl Stolley 5cd4a8c8e5 pills: Express pill-container spacing on base class. 2024-06-23 22:00:18 -07:00
Karl Stolley 780391fd43 pills: Better express pill-container outer spacing. 2024-06-23 22:00:18 -07:00
Anders Kaseorg 95a2ce6ed6 ui_init: Restore guard against direct use of page_params.state_data.
Before commit fd253539e0 (#30519), each
part of state_data was removed by pop_fields, to ensure that it was
only used by its associated module and not manipulated directly.
Restore this guarantee by removing page_params.state_data itself.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-23 07:42:28 -07:00
Anders Kaseorg 3a7f5da717 page_params: Add a separate error message for missing #page-params.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-22 21:50:51 -07:00
sanchi-t 2d79ce2e93 invite: Replace stream checkboxes list with stream pills.
Introduce an input field with typeahead functionality, initially
populated with the default streams for the organization.

Fixes #26871.
2024-06-22 20:04:28 -07:00
sanchi-t 445ff79e10 stream_pill: Update `format_stream_name_and_subscriber_count`.
Use `$t` to ensure the function returns a translatable string.
2024-06-22 20:04:28 -07:00
sanchi-t 7580130873 stream_pill: Rename `stream_display_pill`. 2024-06-22 20:04:28 -07:00
Anders Kaseorg 0b3cf78333 blueslip: Untangle from page_params.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-22 19:18:10 -07:00
Anders Kaseorg f7eecb0e03 sentry: Untangle from page_params.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-22 18:53:56 -07:00
Anders Kaseorg 3db05666ac state_data: Accept null for ProfileDatum["rendered_value"].
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-22 11:21:54 -07:00
Anders Kaseorg ca5fba258e giphy: Split is_giphy_enabled to a separate module.
This removes giphy from the critical path of the TypeScript migration.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-22 08:21:08 -07:00
Aman Agrawal 4d84ed305e stream_color: Fix stream icon color not changing on theme change.
Changing theme didn't change the color of the stream icons.
2024-06-22 08:20:23 -07:00
N-Shar-ma 00240b6dbe compose: Reduce space between recipient area and textbox. 2024-06-21 17:29:56 -07:00
N-Shar-ma 878d02cf5c compose: Redesign control buttons row and textbox to look like 1 unit.
The row of buttons is placed using CSS grid template areas so that
visually it is now inside the bottom edge of the textbox. The color of
the buttons row and individual buttons is changed to match the color of
the textbox. All textbox border / box shadow properties are now applied
to its parent instead which is extended under the buttons' row, so that
its border snuggly fits around the buttons row too.

Notable side effects:
- In dark mode the textbox in focused state now has a light border which
does not match the recipient input's current border which doesn't change
when focused. Likely, the recipient input should be updated to match the
textbox's border color.
- The dividers in the formatting buttons row are not vertically centered
now. This should be figured out soon.

Fixes: #28702.
2024-06-21 17:29:56 -07:00
Karl Stolley ac002b358c markdown: Improve alignment, spacing around horizontal rules. 2024-06-21 16:45:16 -07:00
Karl Stolley 7febb78b3b markdown: Use interelement spacing on horizontal rules. 2024-06-21 16:45:16 -07:00
tnmkr 6b255fcc14 custom_profile_fields: Rename is_editable variable for clarity.
The variable is renamed to is_target_element_editable. This makes it
explicit that this variable is referring to HTML structure and not a
property of the field.

This is a prep commit for #22883 which allows admins to restrict users
from modifying field values.
2024-06-21 16:32:18 -07:00
Anders Kaseorg 4ddc8f406d onboarding_steps: Validate parameters with Zod.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 15:53:44 -07:00
Anders Kaseorg 72902d70f3 presence: Validate parameters with Zod.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 15:53:44 -07:00
Anders Kaseorg 438509a8f1 presence: Fix presence_last_update_id type.
It’s undefined for spectators.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 15:53:44 -07:00
Anders Kaseorg 1a73101371 bot_data: Validate parameters with Zod.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 15:53:44 -07:00
Anders Kaseorg bf8fc8429b unread: Validate parameters with Zod.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 15:53:44 -07:00
Anders Kaseorg 9c2ab2842f unread: Ignore deprecated sender_id synonym.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 15:53:44 -07:00
Anders Kaseorg ca99016f04 user_status: Validate parameters with Zod.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 15:53:44 -07:00
Anders Kaseorg 4b4ef75729 muted_users: Validate parameters with Zod.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 15:53:44 -07:00
Anders Kaseorg 8ce77cabae user_topics: Validate parameters with Zod.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 15:53:44 -07:00
Anders Kaseorg 6bff8161ea user_topics: Remove stream__name from user_topic_schema.
This field is internal to the backend and never escapes to the
frontend.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 15:53:44 -07:00
Anders Kaseorg 97907b0a9c pm_conversations: Validate parameters with Zod.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 15:53:44 -07:00
Anders Kaseorg e28240a9ac stream_data: Validate parameters with Zod.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 15:53:44 -07:00
Anders Kaseorg 9b511f5caa sub_store: Fix ApiStreamSubscription["email_address"] type.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 15:53:44 -07:00
Anders Kaseorg 370a6c350e local_message: Validate parameters with Zod.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 15:53:44 -07:00
Anders Kaseorg 788552b916 alert_words: Validate parameters with Zod.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 15:53:44 -07:00
Anders Kaseorg 1ee5c46a20 user_groups: Validate parameters with Zod.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 15:53:44 -07:00
Anders Kaseorg 41ec6c9b7c user_groups: Fix UserGroupRaw["direct_subgroup_ids"] type.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 15:53:44 -07:00
Anders Kaseorg d5cc7d7b79 emoji: Validate parameters with Zod.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 15:53:44 -07:00
Karl Stolley 3a4719915c compose: Let pill-container dictate spacing of pills.
The 2px and 6px values expressed as variables here are taken from
@terpimost's mocks in Figma.
2024-06-21 14:46:44 -07:00
Karl Stolley 0844e2cba9 pills: Size pill components and inputs in ems. 2024-06-21 14:46:44 -07:00
Anders Kaseorg 39d4ddaa96 stream_edit_subscribers: Rename misleading variable.
.safeParse does not return a “schema”.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 14:44:52 -07:00
Anders Kaseorg 15d4866856 stream_edit_subscribers: Fix incorrect error result test.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 14:44:52 -07:00
Varun Singh 05a480f1d1 zcommand: Use `raw_data` and `data` more.
Prefer using `raw_data` and `data` instead of
`data` and `clean_data`.
2024-06-21 12:58:21 -07:00
Varun Singh 87a9877a93 attachments_ui: Use `raw_data` and `data` more.
Prefer using `raw_data` and `data` instead of
`data` and `clean_data`.
2024-06-21 12:58:21 -07:00
Varun Singh f2c3207538 stream_topic_history_util: Use `raw_data` and `data` more.
Prefer using `raw_data` and `data` instead of
`data` and `clean_data`.
2024-06-21 12:58:21 -07:00
Varun Singh 3d64fb6cda message_edit_history: Use `raw_data` and `data` more.
Prefer using `raw_data` and `data` instead of
`data` and `clean_data`.
2024-06-21 12:58:21 -07:00
Varun Singh f553142c7c settings_linkifiers: Use `raw_data` and `data` more.
Prefer using `raw_data` and `data` instead of
`data` and `clean_data`.
2024-06-21 12:58:21 -07:00
Varun Singh 4186cac151 stream_edit_subscribers: Use `raw_data` & `data` more.
Prefer using `raw_data` and `data` instead of
`data` and `clean_data`.
2024-06-21 12:58:21 -07:00
Kenneth Rodrigues 245332eef4 new conversation: Show correct tooltip when dms are disabled.
Earlier the `data-conversation-type` attribute of the new conversation
button was being set to `direct` only if dms were enabled. As a result a
stale tooltip was being shown when dms were disabled.
This commit updates the attribute to `direct` reagardless of dms being
enabled or not.

Fixes #29916.
2024-06-21 11:21:37 -07:00
Karl Stolley 2820bd277f pygments: Fully isolate light and dark themes.
Co-authored-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 11:15:34 -07:00
Karl Stolley 8936febbd3 pygments: Remove legacy Zulip customizations.
These styles were from before opting to work with themes maintained
by the Pygments project. Their removal will make it much easier to
upgrade Pygments themes in the future, and more importantly,
reduce the effort required to square syntax highlighting in the web
and mobile apps.
2024-06-21 11:15:34 -07:00
Varun Singh 80cf16a303 stream_edit_subscribers: Convert module to TypeScript. 2024-06-21 09:54:08 -07:00
Varun Singh 894cafe3c0 subscriber_api: Fix types of function parameters. 2024-06-21 09:54:08 -07:00
Varun Singh 5891a9ef24 subscriber_api: Don't return unused channel request objects. 2024-06-21 09:54:08 -07:00
Anders Kaseorg ce71e5ad8c starred_messages: Validate parameters with Zod.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 09:28:35 -07:00
Anders Kaseorg 9a94cb2269 people: Validate paramters with Zod.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 09:28:35 -07:00
Anders Kaseorg b93509019d people: Mark possibly missing fields as optional.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 09:28:35 -07:00
Anders Kaseorg 02e236f58a realm_user_settings_defaults: Validate parameters with Zod.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 09:28:35 -07:00
Anders Kaseorg 282ea2d77f realm_user_settings_defaults: Fix user_list_style type.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 09:28:35 -07:00
Anders Kaseorg bb8f044a35 scheduled_messages: Validate parameters with Zod.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 09:28:35 -07:00
Anders Kaseorg ed1c169bfb user_settings: Validate parameters with Zod.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 09:28:35 -07:00
Anders Kaseorg fd253539e0 ui_init: Use Zod to split state_data.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 09:28:35 -07:00
Aman Agrawal 32b4aa0883 navbar: Remove empty space to the left and right. 2024-06-20 16:11:19 -07:00
Anders Kaseorg 139d6ff81b markdown_timestamp: Remove incorrect space.
The space wasn’t visible because it was narrower than the padding on
`.rendered_markdown time`, but it showed up in copy-and-paste.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-20 16:04:30 -07:00
Sahil Batra e19524ba92 settings: Use new group setting to private channels creation permission.
This commit updates webapp code to use new group based setting to check
permission for creating private streams.
2024-06-20 15:48:14 -07:00
Sahil Batra 69e88f8787 tests: Extract common function to test realm group based settings.
Test for "can_access_all_users_group" setting does not use the
common function as it allows different options as of now.
2024-06-20 15:48:14 -07:00
evykassirer f6c9b515c7 input_pill: Redesign input pills.
This commit also replaces the close button with
an svg. This is part of the app redesign, and
preparation for the upcoming search pill project.
2024-06-20 15:16:17 -07:00
evykassirer 84cf7f8677 input pill: Remove pill-container-btn class in favor of search styling.
This style is currently only used for search suggestions. Soon,
styling for those suggestions will become more specific, and so
for now we'll keep those styles in search.css to be more clear
about what the new styles affect. If we want to repeat something
like this in the future somewhere else in the app, we can come
up with a generic styling then once we have a better idea of
what that will look like.
2024-06-20 15:16:17 -07:00
Aman Agrawal 792a9bd81e presence: Fix presence status not updated for offline users.
As per the new presence API, we don't get presence info for
users if they went offline after `last_update_id`. This results
in webapp not updating presence info for them.

To fix it, we loop over all the active / idle status users and
update presence status for them as per the latest server time.
2024-06-20 12:35:42 -07:00
Ujjawal Modi 9bb74fb064 settings-config: Use snake case for expires_in_values keys. 2024-06-20 12:26:29 -07:00
Ujjawal Modi cdbc20d304 invite-user-modal: Remove duplicate CSS rules.
Removes some CSS rules used in the invite user modal that were
already being applied via the shared `modal_select` class.

Co-authored-by: Lauryn Menard <lauryn@zulip.com>
2024-06-20 12:26:29 -07:00
Kislay Verma d38d82edc3 dropdown_widget: Fix bug in `disable_for_spectators`
If `disable_for_spectators` is true, the widget text is greyed out
but the tippy instance is still delegated, causing it to appear
on click/enter.

This commit fixes that by not delegating tippy if the
`disable_for_spectators` is true.

This bug was surfaced when it was found that the
topic type filter in Recent conversations has disabled
styling for spectators, but a spectator could still click on it to
open the dropdown.

Fixes #30461
2024-06-20 12:09:04 -07:00
Shubham Padia 43eebbf9c6 scroll: Set tabIndex to -1 for simplebar content wrapper.
Fixes #30403.
Having tabIndex set to 0 led to keyboard focus being put on
a scrollbar container, which led to users having to tab twice
to skip a container.
This commit also removes instances of tabIndex being set to
-1 programatically for certain cases, since it is -1 by default now.
This commit also removes `outline: none` for simplebar since
that property is not needed anymore because the wrapper is
not focusable anymore.
2024-06-20 10:25:51 -07:00
Shubham Padia b771c5f5b0 pm_list_data: Rename private_message(s) to conversation(s).
Since it's an array of PMConversation objects, not of messages, the
old name was confusing.
2024-06-20 09:58:39 -07:00
Shubham Padia 98f4f1bc35 left_sidebar: Remove unused more_private_messages_sidebar_title css.
This was introduced in 6f9e97921d and
has never been used.
2024-06-20 09:58:32 -07:00
Shubham Padia a7da20a66a left_sidebar: Rename show-all-pms-template to use `direct-messages`.
Rename `show-all-pms-template` to `show-all-direct-messages-template`.
Part of the private_message to direct_message rename project.
2024-06-20 09:58:32 -07:00
Shubham Padia cad5843da6 left_sidebar: Rename show_all_private_messages to use `direct`.
Rename `show_all_private_messages` to `show-all-direct-messages`.
We've also hyphenated the attribute during the rename.
Part of the private_message to direct_message rename project.
2024-06-20 09:58:32 -07:00
Shubham Padia f90ad8ca15 left_sidebar: Remove unused toggle_private_messages_section class.
This was introduced in 6f9e97921d and
has never been used.
2024-06-20 09:58:04 -07:00
Shubham Padia 0e8a6a0196 left_sidebar: Rename toggle_private_messages_section_icon to use direct.
Rename `toggle_private_messages_section_icon` to
`toggle-direct-messages-section-icon`.
We've also hyphenated the attribute during the rename.
Part of the private_message to direct_message rename project.
2024-06-20 09:55:29 -07:00
Shubham Padia 5a3fc26d74 left_sidebar: Rename private_messages_section_header to use `direct`.
Rename `private_messages_section_header` to
`direct-messages-section-header`.
We've also hyphenated the attribute during the rename.
Part of the private_message to direct_message rename project.
2024-06-20 09:55:29 -07:00
Shubham Padia b197659d8a left_sidebar: Rename private_messages_section to use `direct`.
Rename `private_messages_section` to `direct-messages-section`.
We've also hyphenated the attribute during the rename.
Part of the private_message to direct_message rename project.
2024-06-20 09:55:29 -07:00
Shubham Padia 7dc47e8484 left_sidebar: Rename private_messages_sticky_header to use `direct`.
Rename `private_messages_sticky_header` to
`direct-messages-sticky-header`.
We've also hyphenated the attribute during the rename.
Part of the private_message to direct_message rename project.
2024-06-20 09:55:29 -07:00
N-Shar-ma b852b5fef0 compose: Show focus ring on buttons only when using keyboard navigation.
For the compose control buttons, the compose close button, and the send
later vdots button, we show the focus ring only on `focus-visible` and
not on `focus`.

Fixes part of: #27117.
2024-06-20 09:45:18 -07:00
N-Shar-ma 5c1069872d css: Redefine `--color-outline-focus` for dark theme.
The css variable `--color-outline-focus`, which affects focus rings
throughout the app, now has a different value defined for the dark theme
but this should have no visible effect, and help clean up the code.

This is a prep commit for the next, which shows focus rings only on
`focus-visible` and not on `focus` for composer buttons.
2024-06-20 09:45:18 -07:00
Shubham Padia 35aa186a72 css: Remove unused css for channel & topic list filter.
The margin properties in question were getting overridden by other
css, so they were not important. The width was not making a difference
in case of channel filter, since its parent was a flexbox. For the
topic list, the width was getting overriden by
`#stream_filters .input-append.topic_search_section input`.
2024-06-20 09:34:08 -07:00