Commit Graph

1022 Commits

Author SHA1 Message Date
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 039b29c260 compose_actions: Add `hooks` for `compose.js` modules.
This commit cuts the dependency on `compose.js` module for
`compose_actions.js` module by introducing a hook system for
registering different hooks from external modules.
2023-06-19 16:54:28 -07:00
evykassirer 239b6737c0 navbar: Fix regression where navbar didn't extend all the way.
Followup to d0c1668399
2023-06-19 15:04:54 -07:00
Daniil Fadeev 4fde4e7c0d popovers: Prevent the popover from closing on scroll.
This commit prevent popover closure when scrolling reaches the top or
 bottom.

 Fixes: #25967.
2023-06-19 15:02:18 -07:00
Prakhar Pratyush cbde01e9e3 settings: Add a "Followed topics" row to Notification Triggers table.
This commit adds a "Followed topics" row to the 'Notification Triggers'
table in the 'Personal settings > Notifications' panel and the
'Organization settings > Default user settings' panel.

This adds support to control email, push, wildcard mention,
visual desktop, and audible desktop notifications for messages
sent to followed topics by toggling corresponding global
notification settings.

The "Followed topics" row is available in the development
environment only.
2023-06-13 18:01:41 -07:00
Hardik Dharmani e549c416db tooltips: Use tippy tooltips for drafts and schedule message overlays.
Fixes #25892
2023-06-13 16:49:54 -07:00
Hardik Dharmani a68edd5b56 admin_user_list: Convert tooltips to Tippy.
Fixes #25977
2023-06-13 16:47:16 -07:00
Hardik Dharmani 8204958730 bot_profile_card: Convert tooltips to Tippy.
Removed the HTML title tooltip from Reactivate bot button as it was
not adding any new infromation to the button.

Converted all other tooltips in bot profile card to Tippy tooltips.

Fixes #25977.
2023-06-13 16:47:01 -07:00
Zixuan James Li 693b3679e3 muted users: Add support to muting bots.
We intentionally disallow muting bots previously upon
a pending design decision in #16915.
This lifts that constraint.

Fixes #22693.
2023-06-13 16:44:12 -07:00
Karl Stolley da09e003f6 date_row: Expand padding around date reference. 2023-06-12 12:52:51 -07:00
Lauryn Menard 1337f6a404 templates: Update instances of "private message" to "direct message".
Updates the two remaining references to private messages in the
`web/templates` directory that are also translated strings.
2023-06-12 10:54:58 -07:00
Anders Kaseorg f959dbe867 flatpickr: Cut dependency on hotkey.js.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-06-09 13:22:33 -07:00
Joelute ccdbdb35b2 unread_banner: Refactor HTML to use main view banner stylings.
Previously, the HTML structure of unread banners continued to utilize the
old stylings. We are currently in the process of simplifing both the
compose banner and unread banner stylings into one. These change will
update the HTML structure to be the same as the compose banner and use
the new stylings.
2023-06-09 11:31:51 -07:00
Joelute 00add94045 compose_banner: Rename classnames to main-view-banner.
Previously, we have duplicate stylings in compose banner and unread banner.
This is rather messy and creates a lot of styling rules. We should define
an abstraction for them. This change will rename compose_banner
to main-view-banner.
2023-06-09 11:31:51 -07:00
Joelute f5a21d0e47 compose_banner: Update classnames to main-view-banner-action-button.
Previously, we have duplicate stylings in compose banner and unread banner.
This is rather messy and creates a lot of styling rules. We should define
an abstraction for them. This change will rename compose_banner_action_button
to main-view-banner-action-button.
2023-06-09 11:31:51 -07:00
Joelute 80ace5c789 compose_banner: Update classnames to main-view-banner-close-button.
Previously, we have duplicate stylings in compose banner and unread banner.
This is rather messy and creates a lot of styling rules. We should define
an abstraction for them. This change will rename compose_banner_close_button
to main-view-banner-close-button.
2023-06-09 11:31:51 -07:00
UBC Student 1cbff7094b docs: Add copy code button to portico docs.
Added a copy-to-clipboard button to the code blocks in the API and
Help Center docs. Previously, copying code from the docs required
manual copying, which was cumbersome.

Used the same copy-to-clipboard svg icon as the one used in
web/src but manually created the button within the js function instead
of using a template. Updated the pre CSS element to have relative
positioning and gave the copy-codeblock element absolute positioning
to ensure the button stayed in the top-right corner.

Fixes #25726.
2023-06-09 11:26:05 -07:00
Karl Stolley cc4baf5e2e popovers: Reorganize Tippy onShow logic for stream popover.
These changes appear to correct the keyboard-navigation repro
from #25907, and it makes it possible for users without the
permission to create streams to exit the streams modal by
hitting Esc.

This reorganizes logic within the Tippy `onShow` method to
ensure that nothing is set or called for those users without
stream-creation privileges.

These changes probably require broader testing to determine
whether the fix addresses only that specific reproducer, or
the broader problems #25907 addresses with malfunctioning
j, k, Esc, and Return keys (when Ctrl + Return to send is
enabled).

Fixes a part of #25907.
2023-06-08 16:33:11 -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
Lalit e7d19866d9 notifications: Move electon bridge code to `desktop_integration` module. 2023-06-08 16:20:59 -07:00
Karl Stolley 37192e8af3 css: Explicitly set text-message color.
This commit darkens the text-message color in the light theme
to the HSL equivalent of a dark gray (#262626).

This is the first time in the Zulip codebase where one CSS
custom property is set to another: the dark theme preserves
its use of `--color-text-default` in this way, but can be
adjusted independently of the reset of the theme in the future
by setting a different color value on
`--color-text-message-default`. Related reading on this
technique:
https://css-tricks.com/a-complete-guide-to-custom-properties/#aa-properties-as-properties

Fixes a part of #22022.
2023-06-08 16:18:14 -07:00
Karl Stolley e0883d0341 css: Integrate color vars into specific areas. 2023-06-08 16:18:14 -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
evykassirer d0c1668399 navbar: Remove top_navbar_full_width now that scrollbar is on html. 2023-06-07 16:54:58 -07:00
Alexander Colloredo-Mansfeld 437b2747b1 settings: Remove id column from tables in stream and group settings.
Fixes part of #25483.
2023-06-07 12:01:26 -07:00
acolloredo 1fc59288b9 settings: Remove id column from user and deactivated user lists.
Fixes part of #25483.
2023-06-07 12:01:18 -07:00
acolloredo 66bc0c95cb settings: Remove id column from subscriber list.
Fixes part of #25483.
2023-06-07 12:01:08 -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
Akarsh Jain e20e7482ca invite: Restructure "Invite user" modal for improved user experience.
This commit revamps the invite type section of the "Invite user" modal
to provide a more intuitive user experience. The section now includes a
radio button option with two choices: "Send an email" and "Generate an
invite link." The email input box is hidden when the "Generate an invite
link" option is selected.

Fixes #24692.
2023-06-06 17:48:29 -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 7ad3225ecc starred_messages: Extract starred_messages_ui.js. 2023-06-05 21:57:35 -07:00
Tim Abbott 2437951cd7 compose: Inline send_request_to_schedule_message. 2023-06-05 21:57:35 -07:00
Tim Abbott 713a64d415 message_scroll: Extract module message_feed_top_notices. 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 c961ad4f37 notifications: Inline handle_global_notification_updates. 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 288716b9b2 stream_list: Define keydown_enter_key inside set_event_handlers. 2023-06-05 21:57:35 -07:00
Tim Abbott 5c0d63fb9a stream_list: Extract initialize_stream_cursor.
This does not create an event handler and thus did not belong in
set_event_handlers.
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
Anders Kaseorg 8a2086fb4c dependencies: Upgrade JavaScript dependencies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-06-05 21:51:26 -07:00
Anders Kaseorg 954b44716f e2e-tests: Simplify test_subscription_button loop.
Undo a debugging commit
db5f39c506 (#21476) that was made to
help diagnose the issue eventually fixed in commit
6242602276 (#22728).  Also remove an
unnecessary mutable variable.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-06-05 21:51:26 -07:00