Commit Graph

2510 Commits

Author SHA1 Message Date
Aman Agrawal 4fef63de52 sponsorship: Show error message for the field under the field. 2023-11-06 14:55:14 -08:00
Aman Agrawal b5fd5f2f5e sponsorship: Minor changes.
Wrap sponsored / sponsorship pending message in a white box.
Remove green heart.
2023-11-06 14:55:14 -08:00
Aman Agrawal ff5e1c3aee sponsorsihp: Make submitting the form work.
Includes various changes to make submitting the sponsorship form work.
2023-11-06 14:55:14 -08:00
Aman Agrawal 2466101fe1 sponsorship: Set width of elements like on support page. 2023-11-06 14:55:14 -08:00
Aman Agrawal 349f6f8ab8 sponsorship: Use new style for existing input fields. 2023-11-06 14:55:14 -08:00
Aman Agrawal 00df9c6c18 urls: Show sponsorship page on a new URL.
Fixes #27377

Replaced #sponsorship links with sponsorship/ links and in other
places liking gear menu.
2023-11-06 14:55:14 -08:00
Aman Agrawal 3ba0fe4349 sponsorship: Remove from billing and upgrade pages. 2023-11-06 14:55:14 -08:00
Aman Agrawal 48d0bedda9 left_sidebar_popovers: Show sidebar icon when visible.
Fixes #27508

Show sidebar icon when sidebar popover is visible so that
it tells users for which row popover is visible and also helps
tippy track when the reference of the popover so that it
can apply [data-reference-hidden] property appropriately.
2023-11-06 14:20:48 -08:00
Aman Agrawal 1a1c5863e4 ui_util: Import entire ui_util module. 2023-11-06 14:20:48 -08:00
Aman Agrawal 6dc17fab57 stream_popover: Extract functions to show sidebar menu icon. 2023-11-06 14:20:48 -08:00
Aman Agrawal eaf69dc9d5 left_sidebar: Employ existing left_sidebar_menu_icon_visible.
Seems like `left_sidebar_menu_icon_visible` had a regression where
its CSS was removed.

We use it show stream row icon when stream popover is visible.
2023-11-06 14:20:48 -08:00
Prakhar Pratyush 5697084832 css: Improve the css of popover used to change visibility policy.
This commit improves the CSS of popovers in the recipient bar,
recent conversations, and Inbox, which are used to change the
visibility policy.
2023-11-06 10:16:53 -08:00
N-Shar-ma 3a8aac8c67 compose: Remove formatting enclosing entire selection when pasting.
If the selection copied, is entirely within a single element, like text
within a heading (like `h1`) we discard this outermost element and only
convert the inner HTML to markdown.

However, we retain `pre` so a code block within it stays as is and does
not change into inline code, losing all its linebreaks.
2023-11-06 09:07:50 -08:00
roanster007 cf4b46d6f7 compose: Fix re-upload of files when upload fails.
Previously, when uploading of a file fails, the same file
couldn't be re-uploaded again without re opening the
compose box. This is because, the default behaviour of
uppy is that it won't allow re-upload of same files.

This could be fixed by removing the uploaded file when
the upload-error event is invoked for it.

Fixes #27495
2023-11-06 08:53:56 -08:00
Karl Stolley a2ae715226 left_sidebar: Align no-alpha variable for light mode unreads. 2023-11-04 12:50:46 -07:00
Aman Agrawal ac8ad111de recent_view: Handle topics_widget being undefined.
update_load_more_banner can still be called from message_fetch
before topics_widget is defined.
2023-11-04 12:23:48 -07:00
Aman Agrawal 8ea49aa5b5 recent_view: Remove unnecessary call to update_load_more_banner.
Since we are already updating load more banner after each
render in ListWidget, we don't need to call it separately.
2023-11-04 12:23:48 -07:00
N-Shar-ma 5c73744aca compose: Fix bug where pasted content would only go to the compose box.
This commits ensures that we pass in the correct context (compose box
or a message being edited) when pasting content.
2023-11-03 14:49:58 -07:00
Aman Agrawal 826f25744d scroll_bar: Hook to window resize event instead of ResizeObserver.
ResizeObserver isn't supported for Safari iOS versions we support.

We support iOS Safari ≥ 12.2 but ResizeObserver support requires
iOS Safari >=13.4. So if they're on iOS Safari >= 12.2 and < 13.4,
it crashes.
2023-11-03 10:24:36 -07:00
Karl Stolley 322b06b364 left_sidebar: Ensure mark as read vdots follows home view.
Regardless of which home view a user selects, it will have a
hoverable vdots menu and the option to mark all as read.
2023-11-03 10:08:37 -07:00
Karl Stolley 2e4bd4639f left_sidebar: Update order and unreads when switching home views. 2023-11-03 10:08:37 -07:00
Karl Stolley 9226e8bdca left_sidebar: Use grid or flexbox to order selected home view. 2023-11-03 10:08:37 -07:00
Karl Stolley 5d2d8f9215 left_sidebar: Add logic and styles to show unreads on selected home view. 2023-11-03 10:08:37 -07:00
Karl Stolley 4759fc9f69 left_sidebar: Prepare home views with selection logic, unread counts. 2023-11-03 10:08:37 -07:00
Aman Agrawal 00d00036fe recent_view: Don't show load more banner until all rows are rendered.
Fixes #27365
2023-11-03 10:02:17 -07:00
Aman Agrawal 556b61d778 list_widget: Add method to check if all items are rendered. 2023-11-03 10:02:17 -07:00
Aman Agrawal 339f85c308 compose_tooltips: Don't show tooltip on focus.
Fixes #27383
2023-11-03 10:01:21 -07:00
Karl Stolley 14ef3a5464 left_sidebar: Display dark-mode condensed unreads without alpha. 2023-11-03 09:33:06 -07:00
Aman Agrawal 666ac2c445 user_card_popover: Fix reactivate user button not working.
Fixes #27459
2023-11-03 08:47:04 -07:00
Aman Agrawal c2d45e4cf7 emoji_picker: Stop propagating enter keypress to message.
Similar to emoji_picker.process_keypress, process_enter_while_filtering
should have a stopPropagation.
2023-11-03 08:46:15 -07:00
Aman Agrawal 8b5110d218 popover_menus: Hide popover for which the reference element is hidden. 2023-11-02 16:27:18 -07:00
Aman Agrawal c3eb17a411 popover_menus: Do early return if possible. 2023-11-02 16:27:18 -07:00
Aman Agrawal 434d156cbc personal_menu_popover: Don't make clear status tooltip interactive.
There is no need for that tooltip to be interactive.
2023-11-02 16:27:18 -07:00
Aman Agrawal bee8ce4e56 popover_menus: Don't hide on scroll / resize.
Tippyjs is equipped to handle reference element moving from
its initial position so that the popover moves / changes
along with the reference / window size.
2023-11-02 16:27:18 -07:00
Nehal Sharma d08d287431
compose: Disallow hotkeys when dropdowns (like stream pickers) are open.
When the focus is inside a dropdown, we do not consider any key strokes
to be hotkeys.  This prevents the user from accidentally triggering an
action while trying to type into the dropdown search / filter.

This aims to fix the bug where on pressing a character key that is also
a hotkey, the hotkey action would be triggered, even if the focus was
inside the stream picker dropdown.

Fixes #27492.
2023-11-02 16:08:36 -07:00
Sayam Samal 0c04246723 stream_settings: Remove muted notice string for muted streams.
The muted notice string "Muted streams don't show up in "All messages"
or generate notifications unless you are mentioned." doesn't properly
explain the behavior of muted streams.

A user can still get notifications for muted streams if they follow a
topic in the stream. This is because the followed topics global
settings will override the stream notifications settings.

Fixes #27274.
2023-11-02 14:07:44 -07:00
Sayam Samal 67fd391e3d stream_settings: Add a `?` link to "/help/mute-a-stream".
Fixes part of #27274.
2023-11-02 14:07:44 -07:00
Sayam Samal 9f70c531a8 stream_settings: Move "Mute stream" to the top of Notification settings.
In this commit, we move the "Mute stream" option to the top of the
notification settings, since the action of muting a stream works
in conjunction with the other notification settings.

We also rename `is_notification_setting` to
`has_global_notification_setting` which better defines the purpose of
the function and now use `is_notification_setting` only to check which
options we need to show under the "Notification settings" section.

This allows us to accommodate the "Mute stream" option under the
"Notification settings" section without affecting the functionality of
the other notification options.

Fixes part of #27274.
2023-11-02 14:07:44 -07:00
Anders Kaseorg 2e3a8afe2a tests: Add missing $ prefix to jQuery object parameter.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-11-02 14:06:04 -07:00
Anders Kaseorg b3fa7b15fc compose_state: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-11-02 14:06:04 -07:00
Anders Kaseorg d6be353299 compose_state: Make get_or_set accept a full selector.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-11-02 14:06:04 -07:00
Pratik daa34685c3 stream_edit: Enable notification settings for muted streams.
This commit allows the user to change notification settings even though
the stream is muted and adds a line of text in stream settings and
notification settings.

Fixes #27272.
2023-11-02 13:57:56 -07:00
N-Shar-ma a01d670fb2 turndown: Improve pasting experience, focused on pasting Zulip messages.
Turned off and tested escaping with `/` (for now).

Added support + tests for:
- headings.
- strikethrough.
- nested lists.
- code blocks.

Improved handling of:
- links (custom and raw, ignored when wrapping a single image).
- images (now pasted in Zulip's link like syntax).
- custom emojis.
- LaTeX (no garbage symbols, unformatted plain text is pasted)

Added tests for emojis.

Known concerns:
- External images aren't handled anymore by upload.js -- is this a bug?
- Tables lose their formatting on paste.
2023-11-02 13:52:30 -07:00
N-Shar-ma 7c10775e96 markdown: Add `zulip-code-block` class to code blocks.
We add this class to code blocks so that we can easily detect them in
`copy_and_paste.js` in the next commit.
2023-11-02 13:52:30 -07:00
evykassirer bbfe1c7e30 sidebar_ui: Move initializing functions to module file. 2023-11-02 12:23:25 -07:00
Karl Stolley c56bd24715 left_sidebar: Attach navigation Tippies to <li> elements.
This corrects a likely long-standing bug where nav tippies appear
over the navigation box. With the gridded DM rows having corrected
the placement of DM Tippies, this commit brings the nav Tippies in
league with those.
2023-11-02 09:56:29 -07:00
Karl Stolley 6784dee775 left_sidebar: Align 'more conversations' and 'back to streams'. 2023-11-02 09:56:29 -07:00
Karl Stolley 65ed4d0ac2 left_sidebar: Provide inline-grid layout for DM row status emoji. 2023-11-02 09:56:29 -07:00
Karl Stolley b50a09f99e left_sidebar: Set vertical alignment on 22px-tall DM row. 2023-11-02 09:56:29 -07:00
Karl Stolley 4e03209c76 left_sidebar: Establsh CSS Grid on DM rows. 2023-11-02 09:56:29 -07:00