Commit Graph

2834 Commits

Author SHA1 Message Date
Aman Agrawal 169f777b36 use_info_popover: Fix long words overflowing out of container.
The text will now break at the overflowing points. A hyphen maybe
inserted but is dependent on language and browser support.
2022-10-18 22:13:04 -07:00
Aman Agrawal 5a5ec5518c right_sidebar: Fix full name overflowing its container.
User's name with status emoji was overflowing its container,
resulting in overflown text to not be converted into ellipsis
and pushing status emoji out of visible area.
2022-10-18 22:13:04 -07:00
Rixant Rokaha 24f344dc40 settings_ui: Change org profile icon to same as custom profile fields. 2022-10-18 08:25:13 -07:00
rixant c15e202155 settings_ui: Change icons in organization settings sidebar. 2022-10-18 08:25:13 -07:00
madrix01 550a32bb20 recent_topics: Add Private message to recent_topics.
This commit adds private messages to the Recent topics view, to make
it an all-encompassing overview of recent activity visible to the user.

We add a filter "Include PM" to toggle whether PMs should be shown in
recent topics.

Fixes #19449.
2022-10-17 15:02:01 -07:00
Yogesh Sirsat e0838ecf93 user_info_popover: Change text of "View private messages to myself". 2022-10-14 13:08:34 -07:00
Ganesh Pawar 4df8c6610f gear menu: Add organization info.
Fixes #22205
2022-10-13 23:45:25 -07:00
Sahil Batra de257d434f settings: Set min width of role column.
We set minimum width for role column in users list,
deactivated users list and bots list such that role
value always fits in one line.

Fixes #23218.
2022-10-13 10:05:20 -07:00
Tim Abbott ad90157ec0 Revert "modal: Make the modal content scrollable instead of the whole modal."
This reverts commit c439b9d3af.
2022-10-12 17:20:33 -07:00
Tim Abbott eb60e30c9a Revert "modals: Add `data-simplebar` to `login` and `api key` modal."
This reverts commit 4c32972274.
2022-10-12 17:20:33 -07:00
Sahil Batra dd939bbbb8 message: Rename "Un-collapse" option to "Expand message".
This commit also update the collapse message help page.
2022-10-12 10:50:05 -07:00
Sahil Batra 6f1d5a29aa stream_popover: Disable topic or stream input in move message modal.
We now disable the topic or stream input in move message modal if
user is not allowed to edit them. Topic input can be disabled only
in the modal opened from message actions popover since permission
to edit topic depends on message and we do not have any message
when we open topic from left sidebar since the message is fetched
from server while submitting.

This commit also does some changes to call ".trim()" on new_topic_name
only when it is undefined. new_topic_name can be undefined when
the new topic input is disabled because "serializeArray" only
considers enabled inputs.
2022-10-12 10:50:05 -07:00
Sahil Batra cdc7183a01 hotkey: Update description for "e" shortcut.
This commit updates description for "e" shortcut to
"Edit selected message or view message source" in
shortcuts menu and to "Edit message or view message source"
in help docs.
2022-10-12 10:50:05 -07:00
Sahil Batra bb2ab065b2 message_edit: Show "Move message" icon on hover if only moving is allowed.
Previously, we showed "View source" icon if content editing was not
allowed, now we show the move message icon instead if moving message
is allowed but content editing is not. We remove the hotkey from
tooltip for now and would add a different hotkey for moving
messages in further commits.

We also add a common class for all the three icons in this commit
to avoid duplication and use different class if required for click
handlers.
2022-10-12 10:50:05 -07:00
Sahil Batra d63f9c8686 message_edit: Use a modal to move message instead of edit UI.
Previously, we allow moving message (both topic and streams) in
the message edit UI and we opened message edit UI when clicked
on "Move message" option in message three-dot menu. Now, we open
the "Move topic" modal (that is opened when using "Move topic"
from topic sidebar) on clicking "Move message" option in
message three-dot menu.

We remove the hotkey "e" from "Move message" option for now since
both edit and move UIs are different now. We will instead add
new hotkey in further commits.

We pass stream_id as undefined when stream is not changed. This is
required for case when only topic editing is allowed. It worked
previously because we show "Move topic" option in left sidebar
only when stream editing is allowed.
2022-10-12 10:50:05 -07:00
Sahil Batra 0fc19732bc message_edit: Allow only content edit in message_edit_form.
We now allow only content edit in message_edit_form which can
be opened by pencil icon in the message row, "Edit message"
option in popover and by using e hotkey.

As a result of this change, we also do not show topic and stream
edit options when using "View source" options.

We would instead support changing stream and topic from the modal
which will be opened from the "Move message" option in message
actions popover.
2022-10-12 10:50:05 -07:00
Sahil Batra 5883416b14 popovers: Organize message actions popovers into sections.
This commit reorders the options in message actions popover
and divides the options into sections as per #23076.

Fixes #23076.
2022-10-12 10:50:05 -07:00
sofbe f87f27f9d0 settings: Create a new "Message deletion" section.
Create a new section under "Message editing" and move
"Who can delete their own messages" and
"Time limit for deleting messages" to the new section.
Remove "i" tooltips next to them. Add a label to the
new section "Administrators can delete any message."

Fixes part of #22892.

settings: Add widgets to the new section "Message deletion".
Forgot to add settings_save_discard_widget to last commit.
This commit add two buttons when a change is made to the
subsections.

Fixes part of #22892.
2022-10-10 08:52:36 -07:00
Yogesh Sirsat 8b6976331a popovers: Redesign user info popover.
Following the addition of support for custom profile fields in the
user info popovers, we redesign the popover to have a cleaner look.

* Switch top section design from centered to left-aligned.
* Move mute/unmute and manage user options behind a \vdots menu.
* Move the local time and status into a new block.

Almost all design changes ideas are from discussion on chat.zulip.org;
see "#design > pronouns in profile card" for details.

Co-authored-by: evykassirer <evy.kassirer@gmail.com>
Co-authored-by: Tim Abbott <tabbott@zulip.com>
2022-10-07 15:52:23 -07:00
Tim Abbott eb6ca14377 popovers: Change icons for user popover private message options.
We've decided to standardize on the envelope icon for viewing private
messages; certainly that feels more natural than the lock, which we
use for private streams. And then to avoid duplicates, we change the
existing envelope to a chat bubble.
2022-10-07 15:29:12 -07:00
Sahil Batra aaa5d5cb0e settings: Show typeahead for pronouns type custom profile field.
User can add any pronouns in this field, but we just show some
commonly used pronouns as suggestions in typeahead.
2022-10-06 17:56:26 -07:00
Aman Agrawal ab9c5ae482 actions_popover: Only wrap content to next line on small width.
Fixes #23017

We try to keep the width of actions popover at `max-content` till
small widths.
2022-10-06 16:58:33 -07:00
evykassirer 553723e5d4 compose: Offer narrow to compose target button for private messages.
We already offer this for stream messages, but had been blocked on
adding it for private messages for visual design reasons. The dark
theme had a natural place to put this, since it had a box around the
private message recipient box; but the light theme didn't.

We add a border to the light theme private message recipient box to
allow us to add the same button to private messages, and implement
that button.

Fixes #21962.
2022-10-05 11:11:28 -07:00
Yogesh Sirsat 05a56fd764 user_info_popover: Fix missing translation tags. 2022-10-04 17:20:03 -07:00
evykassirer c321f57785 settings: Explain that Google blob emojis are deprecated.
Part of fixing #19371.
2022-10-04 12:29:35 -07:00
Aman Agrawal 19ee1e92e7 msg_actions_popover: Allow keyboard navigation to mark as unread button.
We missed defining `tabindex` in the HTML element of the button.
2022-10-04 10:07:06 -07:00
Sofia B 2a4ec505e4
settings: Remove the "i" for "Message retention".
Fixes part of #22892.
2022-10-03 14:28:20 -07:00
Sahil Batra 6d5118674d popovers: Remove should_display_view_source from actions_popover_content.
Instead of having a separate field, we can use in if condition on
view_source_menu_item itself to determine whether to show the view
source option or not.
2022-10-03 11:43:25 -07:00
Sahil Batra 1dd89b8f9b popovers: Show "Move message" menu always when moving message is allowed.
Previously "Move message" option was not shown when content editing
was also allowed and also when only moving messaages between streams
was allowed but not topic edits.

Now we show "Move message" option when editing topics or moving
messages between streams is allowed irrespective of whether content
editing is allowed or not.
2022-10-03 11:43:25 -07:00
Akarsh Jain 67d7efefdc message_actions: Split the View source / Move message option into two menu options.
Split the View source / Move message option into two menu options that
take you to the same UI: Move message and View message source.
Previously, it was confusing to have this double option,
and hard to parse it at a glance.

-View message source uses the current icon.

-Move message uses the arrows icon from the Move topic menu option.

-New option order: (1) Move message, (2) Quote and reply or forward,
 (3) View message source.

Also remove the "Topic editing only" and "View source" text on the
bottom right of the message edit UI along with the tooltips. Only
the timer text is shown (along with tooltip) when content editing
is allowed.
2022-10-03 11:43:25 -07:00
Ganesh Pawar 5b75fcd3e7 settings: Convert `form` to `div` in `Full name` input.
This prevents the web app from being reloaded when the user presses
`Enter`.

Fixes #22906
2022-09-29 17:11:15 -07:00
Ganesh Pawar 6b80f010f5 delete attachments: Add confirmation dialog.
Fixes #22814
2022-09-29 17:10:26 -07:00
Tim Abbott c99a40803b message_edit: Add 'message' to tooltip for view source.
Fixes part of #22537.
2022-09-29 11:20:02 -07:00
Akarsh Jain 72cc5d6bd2 message_actions: Rename Edit to Edit message and Collapse to Collapse message.
This commit renames Edit to Edit message and Collapse to Collapse message
for better readability and to match the Delete message and
Copy link to message options.
2022-09-29 10:29:51 -07:00
Lauryn Menard a6232cfc69 templates: Use help link widget in invite user modal.
Updates the help center link in the invite user modal to use the
help_link_widget.
2022-09-28 16:03:40 -07:00
Sahil Batra fda471ab80 settings: Italicize text inside parens for presence_enabled setting. 2022-09-27 10:43:51 -07:00
Sahil Batra f151a4aa11 settings: Add option in settings_checkbox to show some text in parens.
There are cases where we add some text in italics inside parens along
with the label in checkbox settings.

This commit adds option to settings_checkbox template so that we can
directly use it and not require to duplicate the settings_checkbox
code and thus we now use settings_checkbox template for
enable_read_receipts setting.
2022-09-27 10:43:51 -07:00
Steve Howell 8fc811dfa9 unread: Add UI support for marking messages as unread.
Fixes #2676.

Co-authored-by: Aman Agrawal <amanagr@zulip.com>
Co-authored-by: Tim Abbott <tabbott@zulip.com>
2022-09-23 16:45:43 -07:00
Sahil Batra 37fefb374c settings: Refactor code of realm-default of notification batching period.
Previously realm-level default of email notification batching period
setting was handled as a special case in populate_data_for_request.

But now we have added some functions to handle time limit settings and
this commit changes the email notification batching setting to be
handled similarly.
2022-09-23 16:24:16 -07:00
Sahil Batra 55cf61eaf3 settings: Do not show save-discard widget till custom input is not changed.
We now show save-discard widget on changing the message edit and delete
limit setting dropdown from any value to "Custom" only after value inside
the custom input is changed. This makes sense as the setting value is
not actually changed unless the custom input is not changed and also
makes the behavior consistent with realm-level default of notification
batching period setting.

After this change, the dropdown element and custom input element are not
considered as different setting elements for code purposes and are
treated as single setting like the realm-level default of notification
batching period setting. And thus we remove the prop-element class
from the custom input elements of these settings.
2022-09-23 16:24:16 -07:00
Sahil Batra 6b876bdf70 settings: Send only changed settings to server for msg edit subsection. 2022-09-23 16:24:16 -07:00
Sahil Batra 3fa7e68058 settings_config: Change time_limit_dropdown_values to a list.
This commit changes time_limit_dropdown_values from map to
list like we have email_notifications_batching_period_values.

This change will help us in further commits for refactoring
the message edit and delete settings related code.
2022-09-23 16:24:16 -07:00
Sahil Batra 17aba277c5 settings: Change id and name of message delete limit dropdown.
We change the id and name of message delete limit dropdown to
"id_realm_message_content_delete_limit_seconds" and
"realm_message_content_delete_limit_seconds" respectively.

This is a prep commit for sending only changed settings in
message editing section to the API.
2022-09-23 16:24:16 -07:00
Sahil Batra 1e9c65b759 settings: Change id and name of message edit limit dropdown.
We change the id and name of message edit limit dropdown to
"id_realm_message_content_edit_limit_seconds" and
"realm_message_content_edit_limit_seconds" respectively.

This is a prep commit for sending only changed settings in
message editing section to the API.
2022-09-23 16:24:16 -07:00
Lauryn Menard d5b7551f09 frontend: Implement 'invisible mode' feature.
Transitions the frontend of the web app to no longer use the
user status `away` field for setting a user's activity status
to be 'unavailable' (which is now a deprecated way to access
a user's `presence_enabled` setting).

Instead we now directly use and update the user's `presence_enabled`
setting for this feature.

Renames frontend code related to the feature to `invisible_mode`
vs `away`.

We lose node test coverage in `user_status.js` because we are now
using `channel.patch` to send these user setting updates to the
server.

Removes the temporary updates to `server_events_dispatch.py` (and
related tests) made in a previous commit, since we no longer have
or need the `away_user_ids` set.
2022-09-23 12:27:54 -07:00
Yogesh Sirsat 5248f1c40b settings_bots: Change text "profile picture" to "avatar". 2022-09-23 12:06:51 -07:00
Yogesh Sirsat 0b3dd4755e settings_bots: Make it possible to add new bots from org settings.
Adding an "Add a new bot" button to Organization settings > Bots,
which opens a `Add a new bot` form modal from `settings_bots.js`.

Fixes #20309.
2022-09-23 12:06:51 -07:00
Yogesh Sirsat 6db88f0d39 settings_bots: Move "Add a new bot" tab inside a modal.
"Add a new bot" tab from personal `settings > bots` moving this
into a modal form, so we can trigger this form from other places
too without duplicating the code.

Fixes part of #20309.
2022-09-23 12:06:51 -07:00
Sahil Batra 086147fdc4 settings: Move display_in_profile_summary checkbox to center.
We move display_in_profile_summary checkbox in the custom
profile fields table to center. We also need to move heading
subsequently to the center.
2022-09-21 11:06:54 -07:00
Yogesh Sirsat a3094d0f26 custom_profile_fields: Toggle new "display_in_profile_summary" field.
Custom profile fields table `CSS` changed to fit the new "Display"
column of checkboxes, checkboxes are for select/deselect custom
profile field to display in profile popover.

New option "Display in profile summary" added in create and edit
custom profile fields form, with the help of this the user can
pick max of 2 custom profile fields except for `LONG_TEXT` and
`USER` fields to display in his user profile popover.

Checkboxes will go in a disabled state, with an explanatory tooltip,
if we've already passed the limit of 2 fields with this setting
enabled.

Fixes #21215.
2022-09-20 17:03:57 -07:00