Commit Graph

210 Commits

Author SHA1 Message Date
Shubham Padia
3bf87228a2 settings: Use can_add_subscribers_group instead of realm policy.
We are using `can_add_subscribers_group` instead of
`invite_to_stream_policy` to check whether a user can subscribe other
users.
We've removed `invite_to_stream_policy` from the frontend wherever
applicable.
2025-01-22 12:33:58 -08:00
Karl Stolley
0d0aaa8586 compose: Introduce scrolling buttons in gridded layout. 2025-01-14 15:52:02 -08:00
Karl Stolley
cf29edaa65 compose: Flatten a popover-free formatting bar. 2025-01-14 15:52:02 -08:00
Prakhar Pratyush
fd67e31163 web: Add parameters to API requests for empty topic name support.
This commit adds `allow_empty_name: true` to the following
endpoints to receive empty strings as topic name when such
topics are available:
* `GET /messages`
* `GET /messages/{message_id}`
* `GET /messages/{message_id}/history`

Also, it adds `empty_topic_name` client capability for spectators.

These changes are part of the broader effort to enable
support for empty string as a topic name.
2025-01-10 14:32:55 -08:00
Sayam Samal
6557cd74cd stream_color: Replace spectrum color picker with native color picker.
This commit replaces the spectrum color picker used in the stream
popover and stream settings with a custom color picker popover, which
contains a grid of predefined color swatches and a custom color option.

The custom color option uses the HTML5 <input type="color"> which shows
the native browser color picker UI.

Fixes #14961.
2025-01-07 17:27:23 -08:00
Anders Kaseorg
26aa19db43 click_handlers: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <[email protected]>
2024-12-11 12:12:07 -08:00
Anders Kaseorg
77f97762c6
eslint: Fix unicorn/explicit-length-check. (#32666)
Signed-off-by: Anders Kaseorg <[email protected]>
2024-12-11 09:19:46 -08:00
Anders Kaseorg
666ce4519d
hashchange: Convert module to TypeScript. (#32670) 2024-12-11 09:15:18 -08:00
Varun Singh
010e2b9867 user_group_edit: Convert module to TypeScript. 2024-12-10 12:07:46 -08:00
Anders Kaseorg
fcba1f03c4 drafts_overlay_ui: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <[email protected]>
2024-11-30 18:41:42 -08:00
Anders Kaseorg
ee11d73c1f user_card_popover: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <[email protected]>
2024-11-27 22:05:38 -08:00
Anders Kaseorg
d8d8e620e7 topic_popover: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <[email protected]>
2024-11-27 22:02:43 -08:00
Anders Kaseorg
9f4b4a0c8a message_actions_popover: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <[email protected]>
2024-11-27 17:36:59 -08:00
Anders Kaseorg
49f2d08006 message_scroll: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <[email protected]>
2024-11-27 17:12:22 -08:00
Anders Kaseorg
93185dd7a6 stream_popover: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <[email protected]>
2024-11-27 16:55:00 -08:00
Anders Kaseorg
46f74cc39e navigate: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <[email protected]>
2024-11-27 15:55:50 -08:00
Anders Kaseorg
bb174e9b64 gear_menu: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <[email protected]>
2024-11-27 09:34:49 -08:00
Anders Kaseorg
c1cd21d8d1 desktop_integration: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <[email protected]>
2024-11-26 09:17:03 -08:00
evykassirer
4ff7bc16bc settings: Convert module to typescript. 2024-11-24 21:45:41 -08:00
evykassirer
4ee8175a25 settings_toggle: Convert module to typescript. 2024-11-24 18:45:25 -08:00
evykassirer
60763763b2 stream_settings_ui: Convert module to typescript. 2024-11-19 14:01:10 -08:00
Karl Stolley
f4554613a0 compose: Delegate max-length tooltip to body. 2024-11-18 12:44:24 -08:00
evykassirer
a60beda676 settings_panel_menu: Convert module to typescript. 2024-11-18 11:13:10 -08:00
evykassirer
6093aa4b23 settings_sections: Convert module to typescript. 2024-11-18 10:35:21 -08:00
Anders Kaseorg
e82b7641c6 giphy: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <[email protected]>
2024-11-13 11:56:57 -08:00
Anders Kaseorg
e3118d8fc9 Revert "settings_account: Move async call into ui_init."
This reverts commit 8eb0ca3a7c (#32068).

We fixed the TypeScript configuration in #32327.

Signed-off-by: Anders Kaseorg <[email protected]>
2024-11-13 10:15:29 -08:00
Anders Kaseorg
ec3177c834 web: Add explicit extensions to imports.
Signed-off-by: Anders Kaseorg <[email protected]>
2024-11-13 09:18:56 -08:00
evykassirer
8eb0ca3a7c settings_account: Move async call into ui_init. 2024-10-29 14:50:25 -07:00
sanchi-t
e60711f871 stream_create: Add functionality to rename archived streams.
Users with appropriate permissions will now have the option
to rename archived streams.
2024-10-25 16:06:42 -07:00
Aman Agrawal
32030a7548 activity: Don't read new messages without user activity.
We have a bug where we can mark messages as read as a result of a
desktop left open with the Zulip window focused. To avoid it,
we only mark new messages as read if there is some user activity.

Note that we scroll to bring new messages into view which can
mark them as read.
2024-10-21 15:53:28 -07:00
Aman Agrawal
8aca0a7776 narrow_history: Save narrow state after we have scrolled to the msg.
Saving narrow state before we have scrolled to the message results
in view scroll position being different from where the message
is displayed.
2024-10-21 08:54:14 -07:00
Vector73
66113365a5 saved_snippets: Add new feature for saved snippets.
Fixes #31227.
2024-10-01 11:48:15 -07:00
evykassirer
dba1af84e0 filter: Use stream id instead of stream name. 2024-09-18 13:08:14 -07:00
opmkumar
719518baba popovers: Add stream-info-popover when channel pill is clicked.
Shows a stream info popover whenever a channel pill is clicked (such
as in the pill widgets for adding subscribers to a channel or
invitations). The stream info popover contains channel icon and name,
channel description and a link to channel settings.

Fixes #30567.
2024-09-10 16:16:53 -07:00
Prakhar Pratyush
52a9846cdf user_profile: Remove 'tutorial_status' field.
The 'tutorial_status' field on 'UserProfile' model is
no longer used to show onboarding tutorial.

This commit removes the 'tutorial_status' field,
'POST users/me/tutorial_status' endpoint, and
'needs_tutorial' parameter in 'page_params'.

Fixes part of zulip#30043.
2024-08-15 13:31:40 -07:00
Prakhar Pratyush
ee806c49b9 ui_init: Use OnboardingStep for narrowing on first web app load.
We plan to remove the 'tutorial_status' field from UserProfile
table as it is no longer used to show tutorial.

The field is also used to narrow a new user in DM with
welcome bot on the first load.

This prep commit updates the logic to use a new OnboardingStep
for the narrowing behaviour on the first load. This will help
in removing the 'tutorial_status' field.
2024-08-15 13:31:40 -07:00
Kislay Verma
de430f541c search: Improve text about searching public channels.
We use different text for guest users, specifying that they can
only search in channels they can view.
The issue description suggests the same for spectators, but
we already use different text for them.

The search-operators help overlay is also updated with the same.

Fixes #30902
2024-07-20 15:42:41 -07:00
Alex Vandiver
556b92810b thumbnail: Advertize the thumbnail formats at client registration. 2024-07-16 13:22:15 -07:00
Anders Kaseorg
4d34a902c9 ui_init: Initialize timerender before information_density.
information_density.initialize uses timerender.stringify_time, and
thus requires timerender.initialize to have been called first.

Signed-off-by: Anders Kaseorg <[email protected]>
2024-07-11 17:23:30 -07:00
Vector73
6098c2cebe settings: Add two realm settings to restrict direct messages.
Fixes #24467.
2024-07-08 19:34:17 -07:00
Aman Agrawal
7e9a01ea7f ui_init: Remove duplicate user sidebar build call.
`message_view.show` already calls and ideally should call
activity_ui.build_user_sidebar, so this call is not needed here.
2024-07-08 13:56:13 -07:00
Prakhar Pratyush
caedcb8b8b onboarding: Narrow new users in DMs with Welcome Bot.
Earlier, new users were narrowed to the interleaved
DMs view on the first visit.

This commit updates the behavior to narrow new users
in DMs with Welcome Bot.

Reason for the change:
It makes more sense overall as an interleaved DMs view
is a power user view and it would also prevent the
message fading banner #29076 from showing up if the
user DMs Welcome Bot right away.
2024-06-28 11:04:31 -07:00
Sayam Samal
2417155828 theme: Rename dark_theme.ts -> theme.ts.
The dark_theme module now contains logic for light, dark, and automatic
theme switching. Thus, we rename it a more generic name, `theme.ts`.
2024-06-27 16:24:49 -07:00
Sayam Samal
05c61037c8 dark_theme: Refactor and consolidate theme setting logic.
This commit centralizes the logic for setting a user's theme preference,
both for regular users and spectators, into the `dark_theme.ts` module.
This simplifies theme handling throughout the codebase and ensures that
the theme is set consistently across all modules.

Instead of relying on various call sites to update the recipient bar's
background color and switch between the light/dark realm logo after a
theme change, this commit modifies the `set_theme_and_update` function
to include these calls after every theme change. Before this commit,
some modules used to update the realm logo after a theme change, while
others did not. This led to inconsistencies in the UI depending on
which method was used to change the theme.
2024-06-27 16:24:49 -07:00
Sayam Samal
2f6cc4a6b0 dark_theme: Add automatic color scheme support for spectators.
Similar to the light/dark theme support for the spectators, this adds
the automatic color scheme support by storing the user's preference
in the local storage.
2024-06-27 16:24:49 -07:00
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
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 <[email protected]>
2024-06-23 07:42:28 -07:00
Anders Kaseorg
f7eecb0e03 sentry: Untangle from page_params.
Signed-off-by: Anders Kaseorg <[email protected]>
2024-06-22 18:53:56 -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 <[email protected]>
2024-06-22 08:21:08 -07:00
Anders Kaseorg
d5cc7d7b79 emoji: Validate parameters with Zod.
Signed-off-by: Anders Kaseorg <[email protected]>
2024-06-21 15:53:44 -07:00