Commit Graph

201 Commits

Author SHA1 Message Date
Anders Kaseorg
fcba1f03c4 drafts_overlay_ui: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-30 18:41:42 -08:00
Anders Kaseorg
ee11d73c1f user_card_popover: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-27 22:05:38 -08:00
Anders Kaseorg
d8d8e620e7 topic_popover: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-27 22:02:43 -08:00
Anders Kaseorg
9f4b4a0c8a message_actions_popover: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-27 17:36:59 -08:00
Anders Kaseorg
49f2d08006 message_scroll: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-27 17:12:22 -08:00
Anders Kaseorg
93185dd7a6 stream_popover: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-27 16:55:00 -08:00
Anders Kaseorg
46f74cc39e navigate: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-27 15:55:50 -08:00
Anders Kaseorg
bb174e9b64 gear_menu: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-27 09:34:49 -08:00
Anders Kaseorg
c1cd21d8d1 desktop_integration: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
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 <anders@zulip.com>
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 <anders@zulip.com>
2024-11-13 10:15:29 -08:00
Anders Kaseorg
ec3177c834 web: Add explicit extensions to imports.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
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 <anders@zulip.com>
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 <anders@zulip.com>
2024-06-23 07:42:28 -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
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
Anders Kaseorg
d5cc7d7b79 emoji: Validate parameters with Zod.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 15:53:44 -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
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
Aman Agrawal
7ddf7a96dc navbar: Show realm icon logo instead of full logo on narrow widths.
When left sidebar is hidden between 1200px and 768px, we show
smaller realm icon logo instead of the full realm logo. Also,
we use the new space to expand the middle column to better show
the narrow description.
2024-06-18 09:38:51 -07:00
Aman Agrawal
04f4b75d62 sidebar_ui: Save current toggle status in localstorage. 2024-06-11 12:42:42 -07:00
Sahil Batra
f98a3fc684 settings: Use new group setting to check permission for creating public channels. 2024-06-10 12:24:45 -07:00
Mateusz Mandera
3ded4c2a7d presence: Frontend implementation of the last_update_id API.
Note: This involves adding presence info of unknown users to the
presence data.
With some small tweaks, we can just add the info to the presence data
structures, just making sure the buddy list correctly skips those
entries and that we redraw the user in the case where the user creation
event arrives after the presence polling loop.
2024-06-07 13:57:40 -07:00
Aman Agrawal
f58c586bee narrow: Rename to message_view.
This brings it in sync with other libraries like `message_list`
and `message_list_data`.
2024-06-05 12:03:59 -07:00
Aman Agrawal
48cdfd25f7 narrow: Rename by_topic to narrow_by_topic. 2024-06-05 12:03:59 -07:00
Aman Agrawal
fecb9afa94 narrow: Rename activate to show.
This make the main call which displays message list sound similar
to `recent_view.show` and `inbox_ui.show`.
2024-06-05 12:03:59 -07:00