Commit Graph

10 Commits

Author SHA1 Message Date
Vector73
7440444a90 saved_snippets: Move initialization directly to ui_init.ts.
Defer saved snippets dropdown creation until the compose box
is opened for better performance.

Fixes #31831.
2025-02-14 11:51:40 -08:00
Vector73
41430661ee saved_snippets: Fix dropdown state sync across browser tabs.
Currently, when the saved snippets are added or removed the changes
are not properly shown across different browser tabs if the dropdown is
open. This commit fixes this.
2025-02-14 11:51:40 -08:00
Vector73
dedd4237a4 saved_snippets: Fix JQuery error.
This error occurred when opening the saved snippets dropdown while
editing a message caused by `get_offset_to_window()` expecting a
single JQuery element in the selected set. This function was used on
`$(this.dropdown_input_visible_selector)` which is a class selector
and can return multiple elements when multiple saved snippets button
are rendered.

This commit resolves this bug by creating dropdown widgets with unique
`widget_selector` for each saved snippets button.
2025-02-06 17:13:30 -08:00
Alya Abbott
a7ab90bf69 tooltips: Make tooltip for saved snippets consistent with other buttons. 2025-01-31 14:07:23 -08:00
Vector73
32d131ab5a saved_snippet: Move "Create a new saved snippet" button to the bottom.
Renames "Add a new saved snippet" to "Create a new saved snippet" and
"Add saved snippet" tooltip to "Insert saved snippet".

Moves "Create a new saved snippet" button to the bottom sticky area of the
dropdown.
2025-01-30 09:46:32 -08:00
Vector73
91ddfdadd6 saved_snippets: Move "Saved snippets" button to compose control buttons.
This is follow-up of #31359 that moves "Saved snippets" button from
"send_later" popover to message formatting buttons and adds support
to use saved snippets in message-edit UI.

Fixes #31830.
2025-01-30 09:46:32 -08:00
Anders Kaseorg
77f97762c6 eslint: Fix unicorn/explicit-length-check. (#32666)
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-12-11 09:19:46 -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
opmkumar
ee70cd8af3 saved_snippet: Prepopulate new saved snippet content.
Fixes #31827.
2024-10-02 09:30:18 -07:00
Vector73
66113365a5 saved_snippets: Add new feature for saved snippets.
Fixes #31227.
2024-10-01 11:48:15 -07:00