38 Commits

Author SHA1 Message Date
Alya Abbott
fdb35f2f81 compose: Improve preview mode tooltips.
Also modernize help center instructions for message previews.
2025-07-18 17:22:34 -07:00
Maneesh Shukla
48d2ee2684 compose-buttons: Add compose_button_tooltip class to all the control buttons.
This is a prep commit to add singleton tooltips to all the
compose control buttons.

Fixes part of #24825.
2025-07-10 17:06:02 -07:00
Anders Kaseorg
a360ffd7f6 compose: Move needs-empty-compose class to parent.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-05-18 16:22:15 -07:00
opmkumar
1e99745023 todo_list: Add option for modal to create todo-lists.
A button has been introduced to launch a modal
for creating todo-lists directly from the compose box.

The modal features a form that, upon submission,
generates a message using the `/todo` syntax and the data
inputted in the form. Subsequently, the content of the compose box
is set to this message, which the user can then send.

This modal closely parallels the UI for adding a poll; therefore,
the poll and todo code has been shifted to a newly created
file named `widget_modal.ts`, and `poll_modal.ts` is now deprecated.

Co-authored-by: Sujal Shah <sujalshah28092004@gmail.com>

Fixes #29779.
2025-02-14 14:57:24 -08:00
opmkumar
bda8c0a45e templates: Change poll icon location to just before ?.
This commit change the location of poll icon into their own
section in the right just before `?`.
2025-02-14 14:32:35 -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
Karl Stolley
0d0aaa8586 compose: Introduce scrolling buttons in gridded layout. 2025-01-14 15:52:02 -08:00
Karl Stolley
cf29edaa65 compose: Flatten a popover-free formatting bar. 2025-01-14 15:52:02 -08:00
Karl Stolley
f8cbff51e0 compose: Control formatting dividers with CSS. 2024-12-17 11:05:44 -08:00
Anders Kaseorg
e172c717f7 webpack: Enable explicitPartialContext for handlebars-loader.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-15 20:41:59 -08:00
Aman Agrawal
a30029c8ad upload: Don't render upload button instead of hiding.
Doesn't make sense to hide the upload button button later when
we can just not show it if the browser doesn't has support for
it.
2024-05-14 12:21:49 -07:00
N-Shar-ma
bb6e7ab537 compose: Add keyboard shortcuts to compose control buttons' tooltips.
For more discoverability, the keyboard shortcuts for preview, and bold,
italic and link formatting are now displayed in the tooltips of those
compose buttons.
2024-05-07 16:11:35 -07:00
N-Shar-ma
d365c8739d compose: Use new custom icon for the compose edit control button. 2023-12-10 22:30:03 -08:00
Tim Abbott
937abb8ba2 compose: Fix broken voice call button.
This CSS class was accidentally lost in
82895ff535.
2023-12-05 13:10:46 -08:00
N-Shar-ma
4d590f1f93 compose: Make the Preview button the first, and Upload files the second.
We exchange the positions of the preview and upload buttons to make the
preview button the first one, as the preview button is different from
the other buttons in that it does not manipulate the contents of the
ompose box.
2023-12-04 13:00:35 -08:00
N-Shar-ma
82895ff535 compose: Update icons for formatting buttons.
Also made the buttons bigger, and updated breakpoints accordingly.

Fixes: #27845.
2023-12-01 13:51:39 -08:00
N-Shar-ma
9eeeabf877 compose: Move buttons to popover in 2 batches instead of all at once.
This ensures that there is never too much awkward empty space in the
row of buttons below the compose box.
2023-11-21 21:01:17 -08:00
N-Shar-ma
143db56992 polls: Add option for modal to create polls.
Earlier the `/poll` slash command was the only way to create polls.
To increase user friendliness with a GUI, a button to launch a modal
to create a poll, has been added to the compose box. This button is
enabled only when the compose box is empty, to avoid complexities with
losing / having to save as draft any message already being composed.

The modal has a form which on submission frames a message using the
`/poll` syntax and the data input in the form, and sets the content of
the compose box to that message, which the user can then send. The
question field is mandatory for form submission.

Fixes: #20304.
2023-11-21 21:01:17 -08:00
N-Shar-ma
4ccbde23cc compose: Reorder and divide compose control buttons into more sections. 2023-11-21 21:01:17 -08:00
N-Shar-ma
30933c5145 compose: Remove gaps between formatting buttons, and make all same size.
Also, added a slight background color change on hover.
2023-11-21 21:01:17 -08:00
N-Shar-ma
42fa4c0011 compose: Refine breakpoints for new compose control buttons.
This is a preparatory commit for new formatting buttons which are added
in the following commits.

Earlier we used multiple classes, each of which handled the hiding or
showing of the element it was applied to, at each breakpoint. Now all
the media queries of those classes have been combined into a new class,
for cleaner and more reusable code. This new combined media query is
also updated to accommodate the new formatting buttons.
2023-11-21 21:01:17 -08:00
Karl Stolley
9f00b513f7 compose_box: Improve structures around compose buttons. 2023-11-13 12:45:13 -08:00
Karl Stolley
b4b71880e1 compose_box: Prepare redesign send and draft structures. 2023-11-13 12:45:13 -08:00
Karl Stolley
383466eaff compose_box: Change 'audio' references to 'voice'. 2023-10-18 14:04:00 -07:00
Aman Agrawal
75826d8409 handlebars: Move popover handlebars to a new popovers folder.
Organize related handlebars in a new folder together.
2023-10-05 08:19:49 -07:00
N-Shar-ma
3c0a6d8ee3 compose: Add button to format bulleted lists.
A formatting button below the compose box can format the selected text
by bulleting or unbulleting the selected (partially or completely)
lines. The behaviour is inspired by how GitHub's bullet list format
button works.

Also adds a new breakpoint for showing vdots for formatting buttons.

Fixes part of: #20305.
2023-09-28 15:05:34 -07:00
Tim Abbott
c12c2dcfd0 compose: Fix missing audio call button.
This was removed in a misresolved merge conflict in
82ca794f94.

Also added the wrapper elements from
953f026487 to ensure preview works.
2023-09-21 17:12:31 -07:00
Karl Stolley
89ce2c112c vdots: Place new more-vertical icon in compose box. 2023-09-14 17:13:58 -07:00
yogesh sirsat
953f026487 compose: Disable unneeded control buttons in preview mode.
Buttons which change the content in the compose textarea were so far
enabled even in preview mode, and would work, but those changes would
not be reflected in the visible preview. This is extremely confusing,
and can lead to the possibility of a user accidentally changing the
content of the compose textarea while previewing, and sending that.

Now we disable those buttons in preview mode, both when composing a new
message and when editing an existing one. We still show the tooltips,
but grey them out and make them unclickable.

Fixes: #20962
2023-09-13 15:09:16 -07:00
Daniil Fadeev
82ca794f94 emoji: Migrate popover from Bootstrap to Tippy.
Fixes part of #23632.
2023-09-07 14:44:18 -07:00
Satyam Bansal
cc8c159e0a compose: Add support for Jitsi audio calls.
Fixes #12207.
2023-08-24 10:52:34 -07:00
Daniil Fadeev
9c675ce62d giphy: Migrate Giphy popover to Tippy. 2023-07-05 14:43:19 -07:00
Sahil Batra
35f252f5b2 templates: Remove pull-left class and its bootstrap CSS.
The "pull-left" class was used for hidden file type input
in compose_control_buttons.hbs and in the copy code button
in codeblocks. It was only used to set the float property
in CSS, but we do not need to set it and removing it does
not make any change in the position of these elements.
So, this commit removes the pull-left class and its CSS
from bootstrap.css as well.

For the file type input, it is already hidden and after
removing the float property also, it is positioned at the
same place due to ordering of elements in HTML.

For the copy code button in codeblocks, it is postioned
using "position" and "right" attributes and removing
"float" property has no effect.
2023-06-23 11:53:38 -07:00
Hardik Dharmani
3a358a9a11 tooltips: Shift all tooltip templates to tooltip_templates.hbs.
Refactored all tooltip templates with static content to be in
tooltip_templates.hbs to avoid duplicate IDs and DOM element.

Fixes #25324
2023-05-09 11:10:58 -07:00
Anders Kaseorg
c1675913a2 web: Move web app to ‘web’ directory.
Ever since we started bundling the app with webpack, there’s been less
and less overlap between our ‘static’ directory (files belonging to
the frontend app) and Django’s interpretation of the ‘static’
directory (files served directly to the web).

Split the app out to its own ‘web’ directory outside of ‘static’, and
remove all the custom collectstatic --ignore rules.  This makes it
much clearer what’s actually being served to the web, and what’s being
bundled by webpack.  It also shrinks the release tarball by 3%.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-02-23 16:04:17 -08:00