Commit Graph

14 Commits

Author SHA1 Message Date
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
Sayam Samal bbf4792d81 right_sidebar: Drop keyboard shortcuts button from right sidebar.
Fixes: #27381.
2023-10-25 16:43:49 -07:00
Sayam Samal 92b3fcbad2 left_sidebar: Add "This is your home view." to the home view's tooltip.
Fixes: #27325.
2023-10-23 17:37:56 -07:00
Aman Agrawal 8f716cd64a help_menu: Extract help items from gear menu into a separate popover.
Fixes #27202
2023-10-23 14:15:13 -07:00
Aman Agrawal c9891b4121 hotkey: Make g + left / right arrow work to open navbar dropdowns.
While gear menu is open, press right arrow to go to personal menu
and left arrow to open gear menu again.
2023-10-23 14:15:13 -07:00
Karl Stolley 9535b5dbe0 left_sidebar: Add informational tooltips to condensed icons.
Though there is currently no keyboard shortcut to advertise with
these icons, both the star and the @ icons now have informational
tooltips, to match other icons in the condensed view.

Fixes: #25902
2023-10-20 12:27:19 -07:00
Sayam Samal 8d3f2baebf tooltips: Use <div> tags inside tooltip's inner content.
By replacing `<span>` tags with `<div>` tags inside the tooltip's inner
content we remove the redundancy of having to use break tags to
separate the tooltip's title and it's content.

We also replace any `<p>` tags with `<div>` tags for the following
reasons:

- Since what we want to achieve are just block elements in order to
avoid the break tags, using `<div>` tags provide use with a wider
scope of use cases.

- We don't want the pause, screen readers often introduce after reading
the contents of a paragraph.

- The `<p>` tag cannot contain tables and other block-level elements.

- The semantic meaning of the <p> tag doesn't apply to the commonly
used tooltip content.
2023-10-03 14:37:47 -07:00
Aman Agrawal f16273c488 hotkey: Change inbox hotkey from `shift + t` to `shift + i`.
Also, add that as a tippy tooltip in left sidebar.
2023-09-15 12:34:59 -07:00
tyler ed1431f1bd gear_menu: Rename tooltip to reflect name change from 'Menu' to 'Main menu'. 2023-06-23 14:42:34 -07:00
Anders Kaseorg 3ca131743b CVE-2023-33186: Fix topic tooltip cross-site scripting vulnerability.
Commit 903dbda79b (#25370) introduced a
cross-site scripting vulnerability in the tooltips for the stream and
topic in the recipient bar.  An attacker who can send messages could
maliciously craft a topic for the message, such that a victim who
hovers the tooltip for that topic in their message feed triggers
execution of JavaScript code controlled by the attacker.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-05-29 16:35:49 -07:00
Daniil Fadeev f2e627ba51 drafts: Move code handling keyboard navigation to a separate module.
The keyboard navigation that used to only work in drafts can now be
reused. This commit has moved the related functions to a separate
module.
2023-05-15 14:46:21 -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
Hardik Dharmani 03cfb3d9fe tooltips: Add `S` hotkey hint to `narrow-to` tippy tooltips.
Added hotkey hint to Narrow to stream/topic/DM tooltips by creating
new tippy for `tippy-narrow-tooltip` with LONG_HOVER_DELAY which
appends `S` hotkey to the existing tippy content set by
data-tippy-content attribute on the element.

Using this approach instead of a <template> with
data-tooltip-template-id avoids issues with context, where
{display_recipient}/{topic}/{display_reply_to} inside <template>
would always show the same stream/topic name regardless of the
actual stream/topic being hovered over.
2023-05-02 13:50:46 -07:00
Tim Abbott 496b403fcf tooltips: Add new central tooltip template store.
We should migrate all the static content tooltip templates to this
file to avoid duplicate DOM elements.
2023-04-27 18:12:32 -07:00