Commit Graph

27 Commits

Author SHA1 Message Date
yogesh sirsat 211f137fc8 popovers: Remove the "Manage this user" link for deactivated users.
The "Manage this user" link did not work correctly for deactivated
users.

Fixes part of #21428.
2022-03-18 15:18:56 -07:00
Sayam Samal 4227f74638 user_info_popover: Interchange positions of 'Role' and 'Local time'. 2022-03-10 15:10:24 -08:00
Austin Riba b22578f975 hash_util: Rename _uri functions to _url.
It's 2022 and the WHATWG no longer recognizes the term URI. Everything
is now a URL or a type of URL. Which is great because it's way less
confusing. Details here:
https://url.spec.whatwg.org/
2022-03-01 18:14:31 -08:00
Aman Agrawal 73266350ef user_info_popover: Hide user local time for spectators. 2022-02-16 13:25:53 -08:00
Sahil Batra b23df8dc9b popovers: Add "Manage this user" option to user info popover.
This commit adds "Manage this user" option in the user-info popover
which simply opens the administrative user-info modal.

We show a spinner on submit button in this case as modal
is not closed immediately and thus we need some indicator
to show that the task is in progress. There is no spinner
on submit button in the modal opened from "Users" section
of organization settings.

Error handling for this case is different than when the
modal is opened from "Users" section of organization
settings because there is no overlay in the background
of modal in this case.

In this case, we show error inside the modal and do not
close it and in case the change is completed successfully
we just close the modal without showing any message.

Fixes part of #18944.
2021-12-01 12:13:06 -08:00
Aman Agrawal a40a5c0bdb user_info_popover: Show relevant info for spectators and hide buttons.
We add the date joined info to the popover and hide all the buttons
since none are relevant for a spectator.
2021-11-02 11:26:19 -07:00
Soumyajyoti Dey 140c0fd599
popovers: Position status emoji to left of label.
This matches the design present in the right sidebar, where statuses
are primarily displayed to users.

Fixes #19998.
2021-10-19 12:21:45 -07:00
Riken Shah d2a15f613f user_info_popover: Fix status emoji showing even if it's not set.
This happened because we had not put a condition in
our template to handle the above situation.
2021-08-04 01:11:06 -07:00
Riken Shah cea961b129 user_info_popover: Show status emoji.
In this commit,

* We show status emoji alongside status text in the user
info popover.

* Updated clear status button to also clear status emoji.
2021-07-28 10:02:51 -07:00
Mateusz Mandera 119f1da04a bots: Rename is_cross_realm_bot API field to is_system_bot.
Cross realm bots will soon stop being a thing. This param is responsible
for displaying "System Bot" in the user info popover - so this rename is the
right way to handle the situation.

We will likely want to rename the `cross_realm_bots` section as well,
but that is a more involved API migration.
2021-07-24 15:46:40 -07:00
Riken Shah 98710d67a2 refactor: Rename Set a status message/Edit status message button text.
In this commit,

* We rename `Set a status message` to `Set a status`
and
* We rename `Edit status message` to `Edit status`

for more clarity.
2021-07-23 12:57:51 -07:00
aryanshridhar 4cd2fab7b0 user_popover: Replace custom email tooltip with tippy tooltip.
This commit essentially migrates our custom email tooltip
to tippy tooltip for displaying user's email when their
names would overflow past the right edge of user popover.

This also removes the `email_tooltip` and `tooltip_holder` HTML
classes aloong with their CSS styles as they no longer used.
2021-07-09 09:55:22 -07:00
Aman Agrawal 578f93b2f3 tippy: Set default placement of tooltips to top.
Generally, tooltips placed at top look good. If the tooltip cannot
fit at top, it will by default be placed at opposite side.

Removed the unnecessary top placement definitions.
2021-07-07 10:23:31 -07:00
sahil839 bb816e1998 settings: Separate "Your account" section in two different sections.
We separate "Your account" section to two different sections -
"Profile" section for user name, custom profile fields, and avatar
and "Account & Security" section for email, password, role, api-key
and deactivating button.

Another important change here is that the modal for changing name
is removed and now the name has a simple input text box and it
behaves similar to inputs for custom-profile-fields.

Fixes #18848.
2021-06-30 16:56:03 -07:00
Tim Abbott 8da54af3a0 presence: Fix confusing "active" label for "not unavailable".
The Help Center article talks about these using similar terms, which
may need further work, but it seems clear that undoing "set
unavailable" should be "set available", not "set active".
2021-06-08 12:09:10 -07:00
aryanshridhar fcff3cc5da popovers: Migrate user status indicator tooltip to tippy.
Replaced the existing HTML tooltip with tippy.js for user
status indicator within the user info popover.
2021-06-05 07:32:59 -07:00
Aman Agrawal 5bd37b44f2 zulip-icon: Add `zulip-icon` as classPrefix for icon.
This avoids general class names like `bot`.
2021-04-29 09:02:25 -07:00
Abhijeet Prasad Bodas e56db79af4 mute user: Add dev-only UI to mute/unmute a user.
Since the "mute users" feature isn't complete yet,
this UI is shown only in development setups.
Ideally we should have had this commit after the whole
feature was completed and merged, but doing so makes it
difficult to test and merge subparts of the feature one by
one (which is a better workflow, while we still decide what
exactly we want this feature to do).

This commit adds a new button in the user info popover
to mute or unmute the user, and uses a confirmation
dialog while muting, because muting a user accidently can lead
to the muter losing out on a lot of information.

TODOs when making this UI visible in production-
1. Make a /help page and link to it from the confirmation
dialog and the API docs.
2021-04-21 10:14:27 -07:00
Anders Kaseorg dd3fa4ac52 templates: Mark all void tags as self-closing.
This reverses the policy that was set, but incompletely enforced, by
commit 951514dd7d.  The self-closing tag
syntax is clearer, more consistent, simpler to parse, compatible with
XML, preferred by Prettier, and (most importantly now) required by
FormatJS.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-04-21 09:49:34 -07:00
Anders Kaseorg 5fed442bb1 templates: Remove context argument from {{#tr}} block helper.
It only had one nontrivial use, and it’s easily replaced using the
builtin {{#with}} block helper.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-04-13 18:59:46 -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
Mohit Gupta 353e36ea0b user_info_popover_content: Replace href="#" with tabindex="0".
Fixes: #15448.
2020-08-31 22:55:29 -07:00
Steve Howell cf78cb0d6e templates: Use `<hr>` and `<br>` consistently.
We now prevent these variations:

    * <hr/>
    * <hr />
    * <br/>
    * <br />

We could enforce similar consistency for other void
tags, if we wished, but these two are particularly
prevalent.
2020-04-28 17:05:48 -07:00
Siddharth Varshney 00091c34c0 user-popover: Replace bullhorn icon with paper-plane. 2020-04-22 10:19:06 -07:00
Anders Kaseorg 3c3471b720 templates: Rename *.handlebars ↦ *.hbs and - ↦ _.
Tweaked by tabbott to avoid accidentally disabling the linter for
handlebars templates.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-07-12 21:11:03 -07:00