Commit Graph

55 Commits

Author SHA1 Message Date
evykassirer
f8db06569f recent: Rename recent_topics_ui. 2023-09-08 07:36:33 -07:00
Ujjawal Modi
9a96d19315 invites: Frontend changes for adding the new realm setting.
This commit does the changes in frontend required
for adding the new setting `Who can create multiuse invite link.`

Fixes #15159.
2023-09-07 14:21:01 -07:00
Ujjawal Modi
21b1298c1d frontend: Initialize user_group module before right_sidebar module.
This commit initializes the user_group module before right_sidebar
module. This was needed to check whether user is member of user_group
whose members are allowed to create invite links.
2023-09-07 14:21:01 -07:00
Ujjawal Modi
ec49c3acc8 invites: Rename can_invite_others_to_realm local variables.
This commit rename the existing setting `Who can invite users to this
organization` to `Who can send email invitations to new users` and
also renames all the variables related to this setting that do not
require a change to the API.

This was done for better code readability as a new setting
`Who can create invite links` will be added in future commits.
2023-09-07 14:21:01 -07:00
Ujjawal Modi
77c67464ba invites: Live update option to create new invitations.
Earlier option to create new invitations in right_sidebar,
gear_menu and invitations panel does not get live update
when the setting `who can invite others to realm` is changed.

This commit make changes to do live update.
2023-09-07 14:21:01 -07:00
Karl Stolley
51e3ed0262 compose: Render Mac-specific Cmd, Return at compose bottom. 2023-08-25 10:52:05 -07:00
evykassirer
78f0dca269 narrow: Save blue box position and restore on navigation.
This saves the blue box position as state on the location
in brower history, with `history.replaceState`.

The position is restored when a narrow is activated.

Fixes #20066.
2023-08-23 13:40:26 -07:00
Karl Stolley
058d21c4e2 css: Rename .message_table to .message-list. 2023-08-21 15:17:45 -07:00
Brijmohan Siyag
4e7bf3c4fb upload: Support drag and dropping files anywhere on message viewport.
While Zulip has supported drag/drop into the compose box for some
time, if you drag/drop the file onto other parts of the message
viewport, it would just do the default browswer behavior of replacing
the Zulip app with that file opened in a new tab, which nobody wants.

The inline comments document the set of rules for how we choose
whether to drop the upload into the compose box or an edit widget, and
also how to open the compose box in different situations.

Fixes #14579.
2023-08-16 17:06:45 -07:00
Lauryn Menard
225be0bb97 dropdown-list-widget: Remove dropdown-list-body class and reference.
Removes the "dropdown-list-body" class and references as it is no
longer used in the new DropdownWidget. The previous uses of the
class were removed in commit 875d564f2d.
2023-08-11 12:26:47 -07:00
Hardik Dharmani
cd24620c4a js: Rename top_left_corner.js to left_sidebar_navigation_area.js.
This provides a much clearer and more consistent codebase name for
this part of the app.

Fixes part of #25902.
2023-07-24 13:02:28 -07:00
Lalit
4a4d23a548 realm_playground: Remove generated_pygments_data parameter for
initialization function.

We are already importing `generated_pygments_data.json` directly in
`realm_playground.js` so there is no need to pass it via initialization
method.
2023-07-24 12:49:53 -07:00
Lalit
8c12494c16 realm_playground: Cut dependency on typeahead_helper.js. 2023-07-24 12:49:53 -07:00
evykassirer
24a2ff5016 loading: Show error when spectator fails to register.
Fixes #25683.
2023-07-17 10:49:45 -07:00
Lalit
a434523d1f search: Cut dependency on narrow.js module. 2023-07-11 22:34:00 -07:00
Anders Kaseorg
407c16fc77 eslint: Expand no-unused-vars check to all function parameters.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-07-02 16:16:38 -07:00
Lauryn Menard
4d3d9bcefa web-src: Update comments with "private message" or "PM".
Updates comments in files the `web/src` directory to use "direct
message" instead of "private message" or "PM".
2023-06-26 11:07:28 -07:00
Lalit
6ade7dcfb9 compose_typeahead: Cut dependency on compose.js. 2023-06-19 16:54:28 -07:00
Lalit
e1ef8c623c compose_pm_pill: Cut dependency on compose_recipient.js. 2023-06-19 16:54:28 -07:00
Lalit
5744ed32e2 tippyjs: Extract compose_tooltips.js module. 2023-06-08 16:20:59 -07:00
Tim Abbott
e7c012c850 tippyjs: Extract message_list_tooltips module. 2023-06-08 16:20:59 -07:00
Tim Abbott
c354d22454 echo: Cut dependency on compose.js. 2023-06-08 16:20:59 -07:00
Tim Abbott
16acb54e6a unread_ui: Add hooks for update_unread_counts method.
Refactored `update_unread_counts` method to adapt a hook pattern. This
helps us to cut off many dependencies for `unread_ui` module.
2023-06-08 16:20:59 -07:00
Tim Abbott
81526936ab starred_messages: Use standard initialization patterns.
We aim to only call .initialize methods from ui_init.js, and prefer to
pop fields off page_params there and pass them into modules.
2023-06-08 09:42:56 -07:00
Lalit
cabd0106f3 starred_messages_ui: Add initialize method for this module.
We need to call `rerender_ui` once on the initial page load, hence we
need to initialize `starred_message` module and call `rerender_ui`
together.

Fixes #25935.
2023-06-08 09:37:05 -07:00
Alex Vandiver
f420f433a4 ui_init: Fix typo in error data. 2023-06-07 08:54:51 -07:00
evykassirer
aa270bcef0 search: Remove support for experimental search pills.
This in-progress feature was started in 2018 and hasn't
been worked on much since. It's already in a broken state,
which makes it hard to iterate on the existing search bar
since it's hard to know how those changes will affect search
pills.

We do still want to add search pills eventually, and when
we work on that, we can refer to this diff to readd the
changes back.
2023-06-06 18:36:02 -07:00
Anders Kaseorg
fba8c23dc0 stream_list: Clean up component API.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-06-05 21:57:35 -07:00
Anders Kaseorg
9d8c6f9186 topic_list: Clean up component API.
The theory here is that we should prefer to give component callbacks a
simple interface relative to what happened in the component, rather
than a simple implementation relative to what the parent context will
do with that information.  Components should be designed to support
being embedded in many possible contexts, including unit tests and
Storybook pages.  We’re nowhere near that future but we might as well
take steps in that direction.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-06-05 21:57:35 -07:00
Tim Abbott
2de9db9305 unread_ui: Cut dependency on unread_ops.js. 2023-06-05 21:57:35 -07:00
Tim Abbott
9d8b680f53 notifications: Cut dependency on navigate.js. 2023-06-05 21:57:35 -07:00
Tim Abbott
f99f567521 unread_ops: Centralize window focused logic. 2023-06-05 21:57:35 -07:00
Tim Abbott
b75964a6cc stream_list: Break dependency on narrow.js. 2023-06-05 21:57:35 -07:00
Tim Abbott
e2c9839c7b topic_list: Cut dependency on narrow.js. 2023-06-05 21:57:35 -07:00
Aman Agrawal
d03e72bc0e message_viewport: Rename message_pane variable. 2023-05-28 15:16:08 -07:00
Aman Agrawal
a78dc4a2bd css: Scroll on html instead of .app. 2023-05-24 15:43:19 -07:00
Tim Abbott
9c09edd7af ui_init: Fix loading spectators view.
18578cc5da broke the success code path.
2023-05-19 13:42:48 -07:00
Alex Vandiver
18578cc5da ui_init: Properly call reject with an error, not an xhr.
If the spectator registration call fails, properly log the error and
call `reject` with an error object, not the xhr that `channel.post`
calls its error callback with.

This does nothing to address the UI question of what to do should this
request fail.
2023-05-19 10:48:21 -07:00
Karl Stolley
2d9cbfa8f1 scheduled_messages: Add left sidebar count.
This commit introduces logic to present a message count with the
Scheduled messages item in the left sidebar.

The count is present on the initial load, and is updated as a user
adds or removes scheduled messages.
2023-05-02 15:26:33 -07:00
Aman Agrawal
a90862566f scheduled_messages: Pop scheduled_messages from page_params. 2023-05-02 09:10:58 -07:00
Aman Agrawal
7d373c54a9 scheduled_mesages: Use events to update scheduled message data.
This also allows to display scheduled message overlay without
fetching any data.
2023-05-01 22:45:03 -07:00
Aman Agrawal
2deec692f6 dark_theme: Fix dark recipient background in light theme for spectators.
Since, we didn't update `user_settings.color_scheme` for spectators
and our recipient bar color calculations were based on it, this
resulted in a wrong recipient bar color if the OS default color
scheme of the user was different from `spectator-theme-preference`
set by the user using the gear menu.

To reproduce the bug:
* Set preferred color scheme to `dark` in your OS settings / Chrome
  dev tools.
* Login as spectator in Incognito.
* Switch to light theme.

You will see dark background colors in recipient bars.
2023-04-28 12:39:46 -07:00
Daniil Fadeev
980f7df376 compose: Fix banners running off the screen.
We introduce a scrollable region, with a simplebar scrollbar.

Fixes: #25115.
2023-04-26 14:03:34 -07:00
Lalit
b9223088f3 refactor: Move simplebar helper functions from ui to scroll_util.
This commit eliminates the `ui.js` module from the codebase by moving
all simplebar helper functions to the `scroll_util` module.
2023-04-26 12:59:08 -07:00
Lalit
e132a68193 refactor: Create compose_textarea and extracted related handlers from ui.js.
Created the new `compose_textarea` and moved event handlers for `#compose_textarea`
from `ui` to this new module so that it is now responsible for initializing event handlers
for compose_textarea instead of `ui` module.
2023-04-26 12:59:08 -07:00
Lalit
9cad825d95 refactor: Rename stream_sort.js to stream_list_sort.js.
Renamed `stream_sort` to `stream_list_sort` to make it clear that this
module is part of the stream_list bundle of modules.
2023-04-25 10:05:59 -07:00
Lalit
2996e8e722 js: Break cyclic dependency between modules related to stream_data.
Moved `stream_data.is_active` to `stream_sort.has_recent_activity` to
remove the cyclic dependency between `stream_data` and `stream_topic_history`.
2023-04-25 10:05:59 -07:00
evykassirer
0c706aeafc compose: Extract a compose_recipient module.
This helps reduce the amount of import cycles we have in the compose
code path following the migration to a fancier stream input.

`compose_closed_ui.initialize()` was moved further down in the
initialization order because it relies on the dropdown widget
to be defined.
2023-04-20 16:09:55 -07:00
evykassirer
8a2455a294 compose: Change stream field in composebox to be a dropdown.
Fixes #11832

This lets the user see more options than the three that appear
in the typeahead menu, and prevents them from inputting invalid
stream names.

This change replaces the input field with the dropdown, and
updates everything that referred to the classnames of the old
input field, so that they now get the data they need from the
new dropdown.
2023-04-20 16:09:55 -07:00
Aman Agrawal
043d54d170 scheduled_messages: Add overlay to display and edit them.
Fixes #20971
2023-04-17 16:59:25 -07:00