Commit Graph

1895 Commits

Author SHA1 Message Date
Akshat ffed6e3dc9
message view: Add hotkey hints.
'>' and 'e' are added as hotkey hints for 'Quote and
reply or forward' and 'View source / Edit topic' options
in actions popover, to help make these hotkeys more discoverable.
2021-01-25 14:26:43 -08:00
Aman Agrawal 42dfd98607 stream_sidebar_row: Show full stream name on hover.
This will help users see the full stream name for truncated
stream names in the left sidebar more easily.
2021-01-04 18:19:48 -08:00
sahil839 f900e521ef settings: Remove extra dropdown for wildcard mention setting.
There are actually two dropdowns for wildcard mention setting,
which would have been added mistakenly while changing the label
and position during merging the original commit for adding this
setting.

This commit removes the extra dropdown dropdown in Other
Permissions subsection and retains the one in Stream
Permissions subsection.
2020-11-20 12:05:13 -08:00
nikhilmaske-2001 16c78e4b34
star_this_message: Change title of star-icon from "(*)" to "(Ctrl + s)".
This was missed when we changed the shortcut in 9674a139bf.
2020-11-20 11:35:27 -08:00
Aman Agrawal 965b443075 subscription_settings: Show eye icon for view stream button.
This reduces the unnecessary width that the button takes.
2020-11-03 16:48:23 -08:00
YashRE42 967efc32d2 widgets: Remove tictactoe example widget.
Steve asked me to remove this, since the tictactoe game was always
intended as a proof of concept. Now that we have poll and todo
widgets, the sample code for tictactoe has much less value.

We replace the content and type in test_widgets.py to maintain
coverage.
2020-11-03 14:46:39 -08:00
aniketsonu 28aaf24a61 invite: Add Copy-to-Clipboard button for multiuse links.
A convenient copy-to-clipboard button was added in the Invite users to
Zulip modal, to make it slightly more convenient to share the
generated links.

The formatting is extracted to a template to make i18n and variable
substitution simpler.

Tweaked by tabbott significantly to simplify JS, HTML, and CSS.

Fixes #16442.
2020-11-02 15:34:50 -08:00
Tim Abbott 5fb667cf9e templates: Make sure users know deletion is for everyone.
Implements a proposal I suggested in #16426.
2020-10-29 17:25:40 -07:00
sahil839 8d783e9d46 streams: Show error when trying to make a default stream private.
We show failure message in stream privacy modal when user tries to
set a default stream as private.
2020-10-29 15:47:34 -07:00
Anders Kaseorg 72d6ff3c3b docs: Fix more capitalization issues.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-10-23 11:46:55 -07:00
Anders Kaseorg 99e6ec4190 favicon: Slightly increase the font size for short numbers.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-10-22 15:43:09 -07:00
sahil839 1d5aa2e514 settings_org: Add frontend to change wildcard_mention_policy.
We add dropdown for wildcard_mention_policy in organization
permissions page.
2020-10-22 15:00:27 -07:00
sahil839 d0f5537fb2 actions: Modify check_message for handling wildcard_mention_policy setting.
This commit adds enforcement for sending messages containing wildcard
mentions according to wildcard_mention_policy.
2020-10-22 14:46:32 -07:00
Anders Kaseorg 5c6202ca97 notifications: Use a dynamic SVG favicon for unread counts.
Closes #2304.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-10-21 07:43:00 -07:00
ryanreh99 111ba564ae popover: Show normal popover for the `stream_subscription_info` users.
This shows the normal popover instead of extended profile.
We use the standard event handler attached to the body element in
`popovers.js` instead of attaching a new one.
2020-10-12 17:42:52 -07:00
Sumanth V Rao b0c37713e5 templates: Extract and tweak copy_to_clipboard_svg from both buttons.
Since both the original button svg's have their own individual height
and width, this commit tweaks it to values height=20 and width=16 which
works well for both buttons.
2020-10-08 17:13:50 -07:00
Sumanth V Rao 413df1881e templates: Extract and tweak copy_message_button from message_edit_form.
Small tweak in the extracted text which adds aria-lable to the button.
2020-10-08 17:13:50 -07:00
Sumanth V Rao 792029cbb8 css: Refactor copy_message button to use copy_button_base class styling.
Z-index is added to the base class. This doesn't affect copy_code_button
in any way.

Attributes dropped/changed:
    - background-color
    - Base class on-hover property is now used.
    - height, width, padding is now the base classes.

We can also remove the TODO now.
2020-10-08 17:13:50 -07:00
Sumanth V Rao 26ff6db751 css: Extract copy_button_base from copy_codeblock class.
The base class will contain common styling which is used by both
copy_codeblock and copy_message buttons. This sets us up nicely
for following commit(s) which aims to unify the two button styling.
2020-10-08 17:13:50 -07:00
Vishnu KS 90dccbf7c3 i18n: Fix quotes in mute setting help message. 2020-10-02 15:01:48 -07:00
Gittenburg 55a67ee7c5 message_edit: Display Formatting button as "Help".
Match the compose change b245e1e49a.
2020-10-02 14:54:14 -07:00
Gittenburg d99c3c0b55 message_edit: Reorder buttons to match compose.
Match the compose change 0c6df114f6.
2020-10-02 14:54:14 -07:00
Vishnu KS 06116c3de3 i18n: Fix quotes of help message in user group settings. 2020-09-30 13:22:56 -07:00
Sumanth V Rao 87c809c0e3 popover: Add UI model to view code in playground(s).
This commit introduces the UI model for the 'view in playground' feature.
The option is a 1-click UX if only one playground link has been configured
for the programming language in the code block. If multiple such playgounds
have been configured, we display a popover with the different playground
options.

The actual code extraction logic occurs here and we set the target href
combining the url_prefix and the extracted code for both these scenarios.

Fixes: #11618
2020-09-28 16:04:54 -07:00
Sumanth V Rao c6434fad7a rendered_markdown: Display 'view code in playground' option in code blocks.
The Pygments language used is extracted from the data-attribute attached
to the outer `div` element. This option is displayed if the playground
mapping for that language can be found.

The UI model which does the actual code extraction and displaying the
popover is done in a future commit.
2020-09-28 16:04:54 -07:00
Gittenburg 6e95809cc4 emoji_picker: Fix search input length.
This was probably a regression from our upgrade to bootstrap 2.3.2.
2020-09-23 11:33:27 -07:00
sahil839 2381e25438 invites: Display name of referrer instead of email in invites list.
We now display the name of referrer instead of email in invites list
and clicking on the name opens the user popover.
This helps us to avoid showing fake emails when the email address
visibility is hidden.

Tweaked by tabbott to still look at both email and name for filtering.
2020-09-22 15:42:53 -07:00
sahil839 231af0f84d popovers: Make a single click handler for opening bot owner popover.
We remove handle_bot_owner_profile function and we handle the opening
of popover of bot owner from a single click handler in popovers.js
using 'view_user_profile' class.

We also rename 'view_user_profile' class to 'view_full_user_profile'
for the button in popover, which is used to open full user profile.
2020-09-22 15:42:53 -07:00
sahil839 5ed9e8f697 popover: Add "Copy mention syntax" option for non-message user popovers.
This commit replaces the "Reply mentioning user" option with "Copy mention
syntax" for user info popovers that are not opened from a message.

Clicking on "Copy mention syntax" will copy the mention syntax of user to
clipboard.

This change is done because user popovers not opened from message are not
linked to any message.
2020-09-22 15:42:53 -07:00
sahil839 569ef48699 popovers: Rename data-owner-id and data-bot-owner-id to data-user-id.
We rename data-bot-owner-id and data-owner-id, used to open user
profile of bot owners, to data-user-id such that we can make a
global click handler for all of them by making a separate class
in next commit.
2020-09-22 15:42:53 -07:00
Ryan Rehman d6fce41800 stream edit: Update stream subscription info text.
This changes the success text of the `subscriber_list_add`
form to display the subscribed and already subscribed users
on success. We also display the user profile as a popover.

Previously we would only display the email ids of the already
subscribed users.

Formatting tweaked by tabbott.
2020-09-18 16:53:01 -07:00
sahil839 ab90abfa4c stream_data: Rename sub.is_admin to sub.is_realm_admin.
This commit renames sub.is_admin to sub.is_realm_admin such that
we can clearly differentiate between realm and stream admins.
2020-09-14 22:05:31 -07:00
Abhijeet Prasad Bodas 49fd272d7d invite: Fix compose box focus on clicking (Un)check All in invite window.
Fixes #16077.
2020-09-04 12:58:11 -07:00
Aman Agrawal 2de98ab6e1 settings: Don't use css classes starting with `icon`.
Fixes #16252.

icon* classes are used by bootstrap for displaying glyphicons.
We removed these classes in our custom version of bootstrap 2.1.1;
but since our reset to v2.3.2, they have been added again and hence
any classes starting with icon* in zulip will have to be renamed.
2020-09-01 10:56:02 -07:00
Tim Abbott 40c840f88a message_edit: Remove duplicate tabindex declaration. 2020-08-31 22:57:21 -07:00
Mohit Gupta 353e36ea0b user_info_popover_content: Replace href="#" with tabindex="0".
Fixes: #15448.
2020-08-31 22:55:29 -07:00
Mohit Gupta 937c85d278 popovers: Add keyboard support for starred message popovers in sidebar.
This commits add arrow, vim_up/vim_down and enter hotkey support for
navigating the popover menu when it is open.
2020-08-31 22:55:28 -07:00
Mohit Gupta a1d3707bfb popovers: Add keyboard support for All Messages popover in sidebar.
Even though right now it have one option added arrow, vim_up/vim_down
and enter hotkey support for navigating the popover menu if it is open.
2020-08-31 22:55:28 -07:00
Mohit Gupta 5cef548708 popovers: Add keyboard support for topic popovers in left sidebar.
This commit adds arrow, vim_up/vim_down and enter hotkey support for
navigating the popover menu.
2020-08-31 22:55:28 -07:00
Mohit Gupta 2579781a0a popovers: Add keyboard support for stream popovers in left sidebar.
This commit adds arrow, vim_up/vim_down and enter hotkey support for
navigating the open stream popover menu.
2020-08-31 22:52:28 -07:00
Ryan Rehman c6d9a87d6f streams: Allow creating stream pills to submit Add subscriber form.
We update the pills typeahead logic to also include
stream results and pass the "stream" key in `opts`
to enable this option for the Add subscriber form.

This commit implements the feature of adding all the
subscribers of another stream in the "Add subscribers"
UI, with the help of a new "stream_pill.js` file.

We temporarily add `user_pill.js` to the EXEMPT_FILES
list as typeahead will be set up in `stream_edit.js`
file which does not have any dedicated tests file.

Work towards #15186.
2020-08-31 16:57:32 -07:00
Ryan Rehman 16ebf56fd7 ui: Add loading spinner for Move Topic popover.
We display a centered spinner and hide the Submit / Cancel
buttons in the Move Topic modal similar to what is done in
the Deleting messages modal.

This commit also makes a change where we now close the modal
after success/failure response of the second request instead
of the first.
2020-08-31 16:51:49 -07:00
Aman 71744604c0 message_actions: Help user identify quote can be used for forwarding. 2020-08-31 15:36:16 -07:00
Vinit Singh 38bc91560a i18n: Fix translation bug in stream creation page.
This change fixes a translation bug that prevented a string in the
message retention dropdown options from getting translation.
Removing the space properly matched the string with the translated
strings.
2020-08-27 11:42:52 -07:00
Sumanth V Rao 42d30bc14b markdown: Add copy-to-clipboard button in codeblocks.
Clicking on the copy-to-clipboard button triggers the clipboard.js
API to dynamically set the text to be copied. This text is the
actual code content from the sibling <code> element (extracted
though jQuery text() method).

The html structure would now look like:
<div class="codehilite">
    <pre>
        <button> The copy button </button>
        <span></span>
        <code>......</code>
    </pre>
</div>

Additionally, this preserves the original code formatting of
the codeblock during copy-paste.

Tests amended.

Fixes: #15208
2020-08-26 23:18:05 -07:00
Vinit Singh 55512c030b i18n: Tag string in "move_topic_to_stream.hbs" for translation. 2020-08-26 11:17:25 -07:00
Ryan Rehman 34b420bf59 ui: Add loading indicator for message edits.
This commit hides the "Save" and "Cancel" buttons
after the first click and shows a spinner until a
successful / failed response is received.

We do not allow sending any other message edit
requests during this time frame, similar to how
our inline topic edit ui works.

Fixes #16143.
2020-08-25 17:22:29 -07:00
Sumanth V Rao cc93044cd1 stream_creation_form: Remove `optional` from stream description input.
The idea behind this change is to encourage users to enter a stream
description rather than take the easy way out and leave the 'optional'
field empty. This solution intends to solve the same issue as #15997
but in a more indirect way.

Discussion in this thread:
https://chat.zulip.org/#narrow/stream/2-general/topic/Stream.20description.20mandatory.20setting.20.2315997
2020-08-14 10:30:56 -07:00
Gittenburg 0dbc5df42d message_edit_form: Make edit controls accessible.
Fixes #6234.
2020-08-11 12:35:15 -07:00
Ryan Rehman b4888c1251 subscriptions: Refactor template rendering of `stream_privacy_policy`.
This makes it similar to `stream_post_policy`.
2020-08-04 15:48:35 -07:00