Commit Graph

62527 Commits

Author SHA1 Message Date
Aman Agrawal
6a44364a69 hashchange: Fix near link not working if already narrowed to it.
In 666ce4519d, we switched to use
`this.href` instead of `e.currentTarget.getAttribute("href")`.

This bugged the behaviour since `this.href` includes the complete
URL including hostname.

Switched to use `this.hash` to fix it.
2025-01-14 09:53:34 -08:00
Aman Agrawal
6d495a270e billing: Fix "Payment method" wrapping to next line. 2025-01-14 09:51:06 -08:00
Anders Kaseorg
2aff7ce9b5 ruff: Remove ISC001 ignore.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-01-14 09:42:16 -08:00
Anders Kaseorg
f223251ffe requirements: Upgrade Python requirements.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-01-14 09:42:16 -08:00
Anders Kaseorg
653b0b0436 ruff: Partially reformat Python with Ruff 0.9 (2025 style).
These are the changes that are backwards compatible with the 2024
style.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-01-14 09:42:16 -08:00
Mateusz Mandera
99ea0255da validate_hostname_or_raise_error: Improve hostname validation.
Obviously, URLs with a path or query are not valid hostnames.
2025-01-13 18:34:20 -08:00
Mateusz Mandera
4196859cd6 zilencer: Extract validate_hostname_or_raise_error function. 2025-01-13 18:34:20 -08:00
Mateusz Mandera
67887324ed register_server: Remove irrelevant comment.
This looks like it may have been copied and pasted from somewhere else -
either way, the comment doesn't make sense and we can remove it.
2025-01-13 18:34:20 -08:00
Aman Agrawal
8b09190bcd recent_view: Show avatar instead of showing +1 participants. 2025-01-13 18:30:38 -08:00
Aman Agrawal
a05cbfa0c9 recent_view: Extract function to get avatar context.
This will help contain the avatars logic to this function so that
it is easier to modify and reason about.
2025-01-13 18:30:38 -08:00
Aman Agrawal
f22f837951 recent_view_ui: Remove redundant calculation.
`extra_sender_ids` is already defined above.
2025-01-13 18:30:38 -08:00
Aman Agrawal
05c0213cad recent_view: Prevent participant avatars from overflowing.
We update max_avatars on rerenders based on recent view width
to prevent participant avatars from overflowing their width.

We use resize event to update `--recent-view-max-avatars` which
is checked on `complete_rerender`.
2025-01-13 18:30:38 -08:00
Aman Agrawal
1587ebf661 recent_view: Remove unused test mock. 2025-01-13 18:30:38 -08:00
Sayam Samal
234b94391a banners: Rename btn -> button in grid variables in app_variables.css. 2025-01-13 17:46:15 -08:00
Sayam Samal
75dabca291 showroom: Rename dev/design-testing -> showroom. 2025-01-13 17:46:15 -08:00
Sayam Samal
6c16adc9d8 showroom: Standardize "showroom" name for UI components testing pages.
This commit standardizes the naming convention to be used for the UI
components being used in the `/devtools/` storybook-like pages for
testing the UI components.
2025-01-13 17:46:15 -08:00
Sayam Samal
6dabfa02cb banners: Add new redesigned banner component.
This commit adds the redesigned banner component to the codebase along
with a storybook-style page in /devtools/banners to view and test the
redesigned banner component.

Any banner using the new redesigned styles, requires two classes,
- First, the base `banner` class which defines the structure and
    behavior of the banner.
- Second, a modifier class like `banner-info` which defines the styles
    for the particular banner type.

The navbar alert banners also have a custom class `navbar-alert-banner`
which is used to define the specific style and structure for these
banner types.

This commit also makes the `banner`, `action-button` and `icon-button`
components into handlebar templates to maintain consistency in their
usage in the codebase.
2025-01-13 17:46:13 -08:00
Sayam Samal
c406060bb2 buttons: Update color values for action buttons from hex -> hsl. 2025-01-13 17:44:52 -08:00
Sayam Samal
f2126c2d3c buttons: Fix inner shadow for quiet type action buttons.
This commit adds the missing inner shadow for the dark mode, and updates
these values to match those in the Figma design.
2025-01-13 17:44:52 -08:00
Sayam Samal
7c5199896f buttons: Update action button design.
The `line-height` and `padding` values are updated, to account for the
previous confusion of calculating these values for a 15px base value,
instead of the required 16px base font value.

The other changes in this commit include the `font-weight` and `gap`
properties, which are modified following the design discussion on CZO.
2025-01-13 17:44:52 -08:00
Sayam Samal
06ecc04d2f buttons: Add transition effect and use clip-path for scaling animation.
This commit replaces the use of `scale`, with `clip-path` for showing
the shrinking animation on the active state of action buttons. This
prevents the font and the icon from scaling with the element, which
removes the unwanted jitter during the animation.

The commit also makes necessary changes to the focus outline on the
buttons, to accommodate the use of clip-path and to improve the visuals.

This commit also adds the `transition` property to the action buttons
to smooth out the animations between the element states.
2025-01-13 17:44:50 -08:00
whilstsomebody
3a22dbea4d stream_edit: Open subscribers tab on clicking subscribers count.
Clicking on subscribers count now opens subscribers tab.

The condition checking for .check and .subscription_settings
classes was redundant since .check is always present on
.stream-row elements. Simplified the click handler while
adding proper event handling with preventDefault() and
stopPropagation().

Fixes: #32035.
2025-01-13 16:24:02 -08:00
Karl Stolley
e7e1ddcafe left_sidebar: Prevent bleedthrough on Channels heading. 2025-01-13 14:39:38 -08:00
Tim Abbott
54a3e3ec51 api docs: Fix broken link in API changelog.
We probably should convert these to headings so they can be linked to,
but that's not what they are today.
2025-01-13 14:38:52 -08:00
Tim Abbott
35e3c197c5 openapi: Fix styling of reactions deprecation notice. 2025-01-13 13:17:59 -08:00
Tim Abbott
2a10907827 openapi: Fix a whitespace typo causing prettier failures. 2025-01-13 13:03:44 -08:00
Vector73
e487a5c8c7 reaction: Add user object back in reaction events.
The deprecated `user` object was removed from message objects
and reaction events in #32701. This commit restores the `user` object
in reaction events to maintain compatibility with mobile clients.
2025-01-13 12:57:55 -08:00
Maneesh Shukla
16188400f7 password: Add password limit inidcator to form.
Fixes: #27922.
2025-01-13 11:53:40 -08:00
Maneesh Shukla
4362c8d3c9 password: Add password_max_length to register response.
This allows clients to render UI that disallows invalid passwords
before sending them to the server.
2025-01-13 11:47:34 -08:00
NotVishesh
8fd5345cd4 popovers: Allow quoting a deleted message.
Allow quoting "(deleted)" tombstone messages.

The previous logic for not allowing this wasn't internationalized,
and fundamentally can't be. But also, we don't see a reason
to forbid this -- it can be relevant to quote/reply something, say
to explain what the deleted message was.
2025-01-13 09:57:49 -08:00
Sahil Batra
638670dc94 user-groups: Use get_display_group_name consistently.
We use user_groups.get_display_group_name consistently in
all the places where group name is showed, even when we
know that the UI won't display system groups to maintain
consistency.
2025-01-13 09:33:52 -08:00
Sahil Batra
57a3edcc6a user-groups: Make members list search work correctly for subgroups.
There were two bugs that this commit fixed -

1) For system groups, the query was being matched with the actual
group name instead of display name.

2) Subgroup name was not converted to lower case before matching
it with query which is converted to lower case.
2025-01-13 09:33:52 -08:00
Harsh
658e342480 left_sidebar: Remove bottom border from 'topic_search_section'.
This commit removes the mistakenly added bottom border from topic
search section.
2025-01-12 18:41:50 -08:00
Sayam Samal
7e57477dea stream_color: Add keyboard navigation for color picker swatch grid.
This commit adds a `handle_keyboard` method to the color picker popover
to enable the use of all the arrow keys along with their vim-key
counterparts for multi-directional keyboard navigation in the color
swatch grid.
2025-01-12 12:39:02 -08:00
Sayam Samal
6c774c0674 stream_color: Fix keyboard input for custom color picker popover option.
This commit fixes the keyboard input for the custom color picker option
in the color picker popover, due to which previously a user wasn't able
to open the browser native color picker via the keyboard.
2025-01-12 12:39:02 -08:00
Sayam Samal
0a0a030fca stream_color: Add confirm button to the color picker popover.
This commit adds a confirm button to the top right corner od the color
picker popover to provide a more intuitive way to exit the popover
after fiddling around with the stream color.
2025-01-12 12:39:02 -08:00
Sayam Samal
33266f7de3 buttons: Fix icon-button icon alignment on variable sizes.
This commit center aligns the icon inside the icon-button across
different button sizes. This also sets the aspect-ratio of icon
buttons to 1:1, to constraint these buttons to a square shape.
2025-01-12 12:39:02 -08:00
Sayam Samal
2ddcd00169 buttons: Override outline style in action-button and icon-button.
This commit overrides the common button outline style set in zulip.css
and dark_theme.css for the button tag.
2025-01-12 12:39:02 -08:00
Sayam Samal
65f33e041c buttons: Add buttons.css file to app.ts bundle for production usage.
This commit adds the `button.css` file to the `app.ts` bundle, which
makes the redesigned button styles available for use in production code.
2025-01-12 12:39:02 -08:00
Sayam Samal
8924161696 stream_color: Update custom color swatch icon to use rainbow gradient. 2025-01-12 12:39:02 -08:00
Sahil Batra
3e525c097f user-groups: Support renaming deactivated groups from webapp UI.
We now allow renaming deactivated groups when user tries to create
a group with the same name as an existing deactivated group.

This commit also adds code to live-update the duplicate name error
on receiving group rename event.

Fixes #32876.
2025-01-12 12:32:32 -08:00
Sahil Batra
12c2a59277 stream_create: Live update error for duplicate stream name.
Previously, we only hided the error of already existing
archived stream on receiving event for a stream rename.

Now, we validate the stream name input on every stream
rename event.
2025-01-12 12:32:32 -08:00
Sahil Batra
42fe2690e3 user-groups: Define max_user_group_name_length in user_groups.ts.
"max_user_group_name_length" is now defined in user_groups.ts
instead of user_group_edit.ts because we would use that value
in further commits in user_group_create.ts and importing it
from user_group_edit.ts would result in import cycle.
2025-01-12 12:32:32 -08:00
Alya Abbott
126d76db50 help and policies: Reorganize GDPR compliance documentation.
Also add reference links.
2025-01-12 08:13:13 -08:00
Mateusz Mandera
5a40755357 test_push_notifs: Fix incorrect DNS mock.
We missed to update this when changing our method of doing DNS lookups
in e5a0b3b3c5.
This caused these tests to make outgoing requests and thus not work
when offline.
2025-01-12 08:10:50 -08:00
Prakhar Pratyush
97e8ed5850 user_topic_settings: Show realm_empty_topic_display_name for topic="".
This commit adds support to display `realm_empty_topic_display_name`
value in the SETTINGS/TOPICS table for topics having the actual
value of empty string.
2025-01-10 14:32:55 -08:00
Prakhar Pratyush
9402b59a29 unstar_topic_messages: Show realm_empty_topic_display_name for topic="".
This commit adds support to display `realm_empty_topic_display_name`
value in the confirm dialog for unstar all messages in topic,
for topics having the actual value of empty string.
2025-01-10 14:32:55 -08:00
Prakhar Pratyush
d45a52c11d scheduled_messages: Show realm_empty_topic_display_name for topic="".
This commit adds support to display `realm_empty_topic_display_name`
value in the scheduled messages overlay UI for topics having the
actual value of empty string.
2025-01-10 14:32:55 -08:00
Prakhar Pratyush
e3ce4c5766 drafts_table: Show realm_empty_topic_display_name for topic="".
This commit adds support to display `realm_empty_topic_display_name`
value in the drafts table for topics having the actual value of
empty string.
2025-01-10 14:32:55 -08:00
Prakhar Pratyush
3f1e53f3fb delete_topic_modal: Show realm_empty_topic_display_name for topic="".
This commit adds support to display `realm_empty_topic_display_name`
value in the delete topic modal for topics having the actual value
of empty string.
2025-01-10 14:32:55 -08:00