Commit Graph

1012 Commits

Author SHA1 Message Date
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
Mateusz Mandera 4a6dfde8fe billing: Fix css for popups on the billing page.
As of 9427fb7230, the billing page
needs a proper value for --color-background-modal.
2023-06-05 16:54:34 -07:00
Satyam Bansal 8343cf1b4f
drafts: Update drafts count when opening and closing the overlay.
Previously, if the drafts modal was open in two different tabs and 
if the user deletes one or more drafts in one tab, then the count of
drafts wouldn't get updated on the other tab. 

The right long-term fix likely involves moving drafts from local storage to 
the cloud. But we can greatly reduce the impact of the bug by updating the count 
whenever the overlay is opened or closed.
2023-06-05 12:03:54 -07:00
Brijmohan Siyag b09a2637c4 send_later: Wildcard mention throwing error on send later.
It was throwing error while schudiling a message having wildcard mention,
because the function `open_send_later_menu` was using param instance to track down
interval, but the parametere instance was not passed from when it was
called from warning banner action. This commit removes the instance
param as it is of no use, and uses a variable to track interval.
2023-06-05 11:59:16 -07:00
Lalit 91d3a480b6 ts: Migrate `fetch_status` to TypeScript.
Extended the type `RawMessage` which represents the message object received from
the server, now it matches correctly with the OpenAPI schema for it.
2023-05-31 13:31:12 -07:00
Anders Kaseorg 5b07bf767b landing-page: Add Microsoft Store download link.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-05-31 08:16:59 -07:00
Aman Agrawal 634a771a37 hotkey-hint: Fix text not middle aligned at different zoom levels.
* Remove `box-sizing` and `min-width` properties which have no
  effect on `inline` positioned element. Modified class selector to
  add `span` which reflects this while reading the CSS.

* Remove `2px` vertical padding and `line-height` which combined
  are fighting for space??
2023-05-31 00:23:57 -07:00
Tim Abbott 3c60e538f9 people: Downgrade late added user errors for spectators.
As noted in the comment, this condition is expected to happen for
spectator users.
2023-05-30 20:45:18 -04:00
Aman Agrawal a47d204ca0 stream_ui_updates: Only update UI if the stream is being edited.
If the stream settings is open but the stream which was
subscribed/unsubscribed wasn't open (say user unsubscribed
from a different tab), `$settings_button` would
be `undefined` here.
2023-05-30 14:50:24 -07:00
Aman Agrawal 086db7621c css: Use a variable to track bottom_whitespace height.
Since we want the same space in recent topics to display the
compose box without overlapping with any other topics, it makes
sense to use a common variable.
2023-05-30 12:41:08 -07:00
Aman Agrawal 839af9ed8d compose: Update `max-height` when compose banner is displayed.
Othwersie, compose banner will overlap with any breadcrumbs
we have below the last message when user is fully scrolled up
and compose is at max-height.
2023-05-30 12:41:08 -07:00