Commit Graph

5015 Commits

Author SHA1 Message Date
evykassirer aebdf6af8c drafts: Fix topic update logic handling of incomplete drafts.
This fixes a couple significant issues with the drafts logic:
* Previously, we would move drafts even when !going_forward_change; this
  is inconsistent with the compose box logic on the previous line.
* The drafts.rename_topic() function did not handle drafts with
  incomplete stream/topic fields correctly, throwing an exception in
  that case; this resulted in user-visible live update problems
  because code after the drafts.rename_topic call would not be
  executed.
2022-10-21 15:33:03 -07:00
Lauryn Menard c9044f7acd recent-topics: Rename to "Recent conversations" in web-app and docs.
Replaces instances of "recent topics" in the web-app and documentation
to be "recent conversations".

Renames both `recent-topics.md` files in the help center to be
`recent-conversations.md` and updates/redirects links to new URL.

Does not update instances of "recent topics" in frontend code comments
and does not update the main overview changelog, for now.

Does not change case study text where "recent topics" was referenced
in a quote, but does change generic text references to be "recent
conversations".
2022-10-21 10:28:19 -07:00
Yogesh Sirsat 0b0a8f4659 user_info_popover: Fix overflow of bot owner list item. 2022-10-20 10:35:11 -07:00
Aman Agrawal e3f22a9907 recent_topics: Add mention indicator in row for unread topics.
Fixes #22984

Add an `@` icon in unread topics where user is mentioned.

We track a new set of `stream_id:topic` pairs for the unread mentions
so that recent topics instantly knows if a topic is unread and mentioned
or not.
2022-10-19 16:26:42 -07:00
Sahil Batra cde4377789 message_edit: Allow editing "no topic" message from modal in all cases.
Previously, we allowed editing topic of "no topic" message, when other
conditions were not met, only from recipient bar but it is allowed
irrespective of other condtions. This commit fixes it to show the
"Move message" option and icon for "no topic" messages irrespective
of other conditions.
2022-10-19 12:02:22 -07:00
Sahil Batra eed728fb59 hotkey: Use "m" hotkey for moving messages.
Fixes #23113.
2022-10-19 12:02:22 -07:00
Sahil Batra 10668b080e message_edit: Remove NO_LONGER from editability_types.
Previously, NO_LONGER type was just used to display
the text in the bottom-right of message edit form
which we have removed now, so we can remove `NO_LONGER`
type now.
2022-10-19 12:02:22 -07:00
Lauryn Menard 8089910dcb narrow: Update browser title when in a narrow search view.
Sets a default value of "Search results" for complicated narrow search
views and updates logic to use `filter.get_title` as a helper to
generate better titles for some common search views.

Does not update the existing behavior for narrow searches that have
"pm-with" or "group-pm-with" operators.

Note as of this change, the default search title and titles generated
from `filter.get_title` will be translated into the user's preferred
language.

Fixes #22952.
2022-10-18 17:13:51 -07:00
Lauryn Menard 857324a164 filter: Return 'undefined' title for narrows with search operator.
Updates `filter.get_title` to return 'undefined' for any narrow
with a search operator. Previously it would return a title if
the search operator was paired with a common narrow, but those
results were not being used when building the message view
header and will not be used for setting the browser title.

Prep commit for rewriting `update_narrow_title` to use
`filter.get_title` as a helper for setting browser title text.
2022-10-18 17:13:51 -07:00
Lauryn Menard f3e118f241 filter: Add stream name that was searched for to unknown stream title.
When the narrow/search for a stream is undefined because either the
stream does not exist or the user is not subscribed to the private
stream, format the title that's used in the message view header to
include the stream name that was searched for.

Prep commit for rewriting `update_narrow_title` to use
`filter.get_title` as a helper for setting browser title text.
2022-10-18 17:13:51 -07:00
Lauryn Menard 5f42425982 filter: Update default title for `streams:public` narrow.
Updates default title for `streams:public` narrow to be
"Messages in all public streams".

Prep commit for rewriting `update_narrow_title` to use
`filter.get_title` as a helper for setting browser title text.
2022-10-18 17:13:51 -07:00
Lauryn Menard c1b430d602 filter: Add titles for messages with alerts and unread messages.
In `filter.get_title`, add cases for the two missing "is" operators,
"alerted" and "unread".

Prep commit for rewriting `update_narrow_title` to use
`filter.get_title` as a helper for setting browser title text.
2022-10-18 17:13:51 -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
Ganesh Pawar 4df8c6610f gear menu: Add organization info.
Fixes #22205
2022-10-13 23:45:25 -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
Julia Bichler 4bb381fc80 message_edit: Support sending notifications with topic changes.
Previously we did not send notification for topic-only edits.
Now, we add backend support for sending notification to topic-only
edits as well.

We would add support for this in webapp in further commits since
message edit UI will be updated as well. We just make sure that no
notifications are sent when editing topic using pencil icon in
message header.

We also change the API default for moving a topic to only notify the
new location, not the old one; this matches the current defaults in
the web UI.

Includes many tests.

We also update the puppeteer tests to test only content edit as
we are going to change the UI to not allow topic editing from
message edit UI. Also fixing the existing tests to pass while
doing topic edits is somewhat complex as notification message
is also sent to new topic by default.

Fixes #21712.

Co-authored-by: Aman Agrawal <amanagr@zulip.com>
Co-authored-by: Tim Abbott <tabbott@zulip.com>
2022-10-11 11:35:41 -07:00
Anders Kaseorg 762a2d8da4 dependencies: Upgrade JavaScript dependencies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-10-11 10:50:57 -07:00
Anders Kaseorg 748ad53f83 dependencies: Remove formdata-node, node-fetch.
Node.js 18 has these built in.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-10-11 10:50:57 -07:00
sayamsamal 19e292989c misc: Improve app title bar for stream and topic views.
We want to be able to differentiate between the stream and the topic
in the title bar, but the current implementation displays both the
steam name and the topic name in the same way which becomes difficult
to comprehend at a glance.

In this commit, we make the following changes,

- <stream_name> to #<stream_name> (when viewing the entire stream)

- <topic_name> to #<stream_name> > <topic_name> (when viewing a topic)

These changes help us differentiate between a stream and a topic with
with a quick glance.

Fixes #22969.
2022-10-07 16:43:50 -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
evykassirer 61a782d252 drafts: Don't update draft count when successfully sending messages.
Fixes #21757.

Previously the draft count would briefly increase between the action
of sending a message and the success of sending that message.
Now the draft count will only increase if the message fails to send.
2022-10-07 11:26:36 -07:00
Sahil Batra 12ba5cb814 settings: Add default label and hint when creating "Prounouns" custom field.
Label and hint can be edited, but we just fill it by default values for
convenience.
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
Tim Abbott f0b8ae4fbe message_fetch: Fix calling pm_list.update_private_messages twice.
This also adds a comment noting a remaining performance bug we have in
this code path, namely fetching messages for a streams narrow will do
unnecessary work.
2022-10-04 16:46:08 -07:00
evykassirer 8a9e68e026 emoji: Finish script to generate emoji_names.py with CLDR data.
This script pulls from our previously custom-written emoji strings
and fills in the rest from CLDR. It also removes 4 custom emoji which
collide with some of the new CLDR names (they will now just be called
by their CLDR name).
2022-10-04 12:29:35 -07:00
Zixuan James Li 4e51499ba0 composebox_typeahead: Fix invalid id reference.
We renamed the id from "subject" to "stream_message_recipient_topic" in
d7c2577ffb.

It is concerning that the tests are not actually failing while this id
has been wrong. The test case might have some redundant parts or is set
up incorrectly.

Signed-off-by: Zixuan James Li <p359101898@gmail.com>
2022-10-04 11:59:22 -07:00
Zixuan James Li 13d09d03f9 node_tests: Minor cleanup for "subject" references.
This cleans up "subject" from test data and variable names. No extra
change is required for this kind of change as they are only locally used
in the test cases.

Signed-off-by: Zixuan James Li <p359101898@gmail.com>
2022-10-04 11:59:22 -07:00
Zixuan James Li 07050394b9 reload: Remove get_reload_topic.
This finishes up the work from 057ee6633a.
We had this "get_reload_topic" helper for user that has "topic"
encoded as "subject" from a older release. This is unlikely to cause
problem now because we no longer use "subject" for reloading since 2018.

Signed-off-by: Zixuan James Li <p359101898@gmail.com>
2022-10-04 11:59:22 -07:00
Zixuan James Li 1e64aa9b79 drafts: Remove support for legacy drafts with "subject".
This removes the temporary get_draft_topic helper from utils and remove
references to draft.subject.

This finishes up the work from
9861cdfeb6. Since 2018 we had stopped
referring to the "subject" property, it is considered safe to remove
this code now. It's impossible to directly upgrade to the current
release without substantial downtime for upgrading the OS, so this
logic is unlikely to provide any future benefit.

Signed-off-by: Zixuan James Li <p359101898@gmail.com>
2022-10-04 11:57:47 -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
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 009e06d868 settings: Extract a function to set msg edit and delete limit setting.
Since set_msg_edit_limit_dropdown and set_msg_delete_limit_dropdown
have almost same code except the ID of elements, we extract a common
function set_time_limit_setting and both the above functions call
this new function only.

We can use this function for topic edit limit setting which will be
added in further commits.
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 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
Lauryn Menard 5accbf38bf frontend: Update `away_user_ids` for presence_enabled update events.
Because the web app has the capacity to update the presence_enabled
user setting directly, we need to temporarily ensure that the
user profile popover is also updated to the correct text/value.

This can be removed once the web app client transitions to use
the presence_enabled setting for the 'invisible_mode' feature.
2022-09-23 12:27:54 -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
evykassirer bca41fd29f reload: Preserve unused reload tokens for a week.
Previously, we deleted all reload tokens on each reload, which
created a race condition if there were multiple tabs open.

Now, we continue to delete tokens after using them, but if a
token is not used it is preserved for a week before being deleted.

Fixes #22832.
2022-09-23 10:59:59 -07:00
Tim Abbott 09c6ee6468 settings: Fix redraw_bots_list when adding/removing bots.
The ListWidget component needs to be provided with an updated list of
elements to display in order for it to show new items when
rerendering.
2022-09-22 12:31:28 -07:00
Kartik Srivastava cb20419cdb muted_users: Change incorrect test label. 2022-09-22 08:40:28 -07:00
Kartik Srivastava 5ec3db06a9 user_topics: Rename muting.js to user_topics.js.
This renames muting.js (in `frontend_tests/node_tests`) to
user_topics.js. This file will now contain all the tests
related to the new user_topics data structure.
2022-09-22 08:40:28 -07:00
Kartik Srivastava b35e9dab51 node tests: Extract muted_users.js from muting.js.
This extracts tests for muting users from muting.js
(in `frontend_tests/node_tests`) into a new file
muted_users.js. Now, all the tests in muting.js
are for testing muting of topics.
2022-09-22 08:40:24 -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
yogesh sirsat cd71fdea60 popovers: Display custom profile fields in user profile popover.
Displaying custom profile fields in user profile popover, as mentioned
in the issue.

In `popovers.js` filtering out only those custom profile fields, which
are not `LONG_TEXT` or `USER` fields and their values are not empty.

Custom profile fields rendering in profile popover the same way use
similar rendering logic as in the user's full profile modal.

Fixes: #21215
2022-09-20 17:03:57 -07:00
Lauryn Menard 9177ac7a4c buddy-data: Remove unimplemented `user_circle_status` description.
In #11882, the alternate tooltip text/behavior for user status
circles was removed from the implementation, but not from the
buddy list data.

This commit removes the `buddy_data.status_description` function
and related frontend tests. There are no remaining instances of
`user_circle_status` in the codebase.

Prep commit for transitioning from 'unavailable' user status
feature to 'invisible mode' user presence feature.
2022-09-20 10:04:11 -07:00
Sahil Batra b3b6449034 settings: Enable and disable the save button in change_save_button_state.
We now enable and disable save button when changing inputs for custom time
limit settings in change_save_button_state function only which shows or hide
the save-discard widget instead of handling them in "change" event handlers.

This fixes the bug of save button flashing to its enabled state from
disabled state before hiding after clicking on "Discard" as now button
is re-enabled only after save-discard widget is hidden and it is disabled
if required before being shown.

Note that there is still a bug for message edit and delete limit settings
where the save button flashes to enabled state when setting is changed to
the original value instead of clicking on "Discard". This bug is not present
for email notification batching setting in a follow-up PR.

This commit also renames update_save_button_state function to
enable_or_disable_save_button to avoid confusion with
change_save_button_state function.
2022-09-19 20:20:53 -07:00
Sahil Batra fa63045b49 settings: Rename dropdown value for custom option for msg limit settings.
This commit renames dropdown value for custom option for message edit
and delete limit settings to "custom_period" to make it consistent
with the value for email notification batching setting and thus
we can avoid code duplication in further commits.
2022-09-19 20:20:53 -07:00
Lauryn Menard 5441ec7d16 buddy-data: Remove unused `get_my_user_status` function.
As of 297379029d, the data for the current user's buddy list
row no longer uses the '(unavailable)' or '(you)' text generated by
`buddy_data.get_my_user_status`. This commit removes the function
and related frontend tests.

Remaining instances of `my_user_status` in the codebase are related
to the CSS rule in `right_sidebar.css`, which is still relevant.

Prep commit for transitioning from 'unavailable' user status
feature to 'invisible mode' user presence feature.
2022-09-19 14:09:21 -07:00
Ganesh Pawar a1ac78f34e delete custom emoji: Add confirmation dialog.
Fixes part of #22812.
2022-09-17 11:55:33 -07:00
yogesh sirsat d3b4b1cefd stream_bots: Display unsubscribe button on bots full profile modal.
Displaying unsubscribe button on bots full profile modal, allowing bot
owners to ubsubscribe their bots from streams.

Admins can also unsubscribe any bot from any subscribed streams from
bots full profile modal.

Fixes part of: #21402
2022-09-16 17:51:34 -07:00
Yogesh Sirsat 23fbd38b4c bots: Display full user profile modal for bots.
This commit can display a full user profile modal for bots too,
by clicking on "View Full Profile" in the profile info popover
same as normal users.

Fixes part of: #21402
2022-09-16 17:51:34 -07:00
Yogesh Sirsat 2328dc0d4e custom_profile_fields: Confirmation modal for delete profile field. 2022-09-16 15:04:01 -07:00
Sahil Batra b9248c75f4 stream: Add do_change_can_remove_subscribers_group and field to objects.
This commit adds do_change_can_remove_subscriber_group function for
changing can_remove_subscribers_group field of a stream. We also add
can_remove_subscribers_group_id field to stream and subscription
objects.

This function will be helpful for writing tests in next commit.
We would add API and UI support to change this setting in further
commits.
2022-09-14 16:03:11 -07:00
Lauryn Menard 04fd1c8773 keyboard-shortcuts: Simplify `adjust_mac_shortcuts`.
Since we are updating the help center documentation to use `<kbd>`
HTML elements when documenting keyboard keys and shortcuts, we no
longer need to support `<code>` HTML elements in
`adjust_mac_shortcuts`.
2022-09-13 11:21:10 -07:00
Anders Kaseorg 0aff5e16ee puppeteer_tests: Skip apparently broken part of message-basics test.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-09-12 17:19:05 -07:00
Anders Kaseorg 02fceb7eb6 puppeteer_tests: Avoid some ElementHandle casts.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-09-11 17:41:41 -07:00
Anders Kaseorg 78eed03574 puppeteer_tests: Fix compose test trying to click local echoes.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-09-11 17:41:41 -07:00
N-Shar-ma 20620e68a4 compose: Add format hinting for spoilers.
Until now, whenever typeahead autocompleted the spoiler syntax, there
was no indication if and how a visible header to the hidden content
could be added.

Now when autocompleting, the word "Header" is added as a placeholder
and highlighted, hinting at the format.

Fixes: #20868.
2022-09-11 14:10:07 -07:00
Anders Kaseorg dfda6d2895 puppeteer_tests: Remove jQuery dependency.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-09-11 12:53:20 -07:00
Anders Kaseorg 96f15e3665 puppeteer_tests: Add helper to correctly test @class in an XPath query.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-09-11 12:53:20 -07:00
Anders Kaseorg 663f1a387d puppeteer_lib: Explode CommonUtils class.
This may have originally made sense as a class that managed the
browser state, but it has since turned into a dumping ground for
mostly pure functions that don’t make sense to instantiate.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-09-11 12:53:20 -07:00
Anders Kaseorg 5ea44bc4ee puppeteer_tests: Convert now-deprecated waitForXPath, $x methods.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-09-09 21:33:41 -07:00
evykassirer 3f66a9ef2b messagebox: Add classnames to mark which messages contain which mentions.
This is part of redesigning messages (#22059). This commit adds
classnames to messages with mentions, differentiating direct mentions
from wildcard mentions from usergroup mentions, and this set us up
for a future commit where we'll have those different kinds of messages
be displayed in different colors.
2022-09-09 17:05:26 -07:00
Raghav Luthra 4dad9fa158 user_settings: Add user setting to control the user list style.
Added a user_list_style personal user setting to the bottom of
Settings > Display settings > Theme section which controls the look
of the right sidebar user list.

The radio button UI includes a preview of what the styles look like.

The setting is intended to eventually have 3 possible values: COMPACT,
WITH_STATUS and WITH_AVATAR; the final value is not yet implemented.

Co-authored-by: Tim Abbott <tabbott@zulip.com>
2022-09-09 16:30:54 -07:00
Riken Shah 3176733914 puppeteer: Fix dropdown click flake in `admin.ts`.
The reason for the flake was we were not waiting enough
time for the dropdown to render search results when we
type `rome`

To fix this, We are waiting until the dropdown input value
evaluates to be `rome`.

We also update variable name from
`verona_in_dropdown` to correct `rome_in_dropdown`.
2022-09-09 08:56:48 -07:00
Ganesh Pawar 10a0bf4de4
settings: Add confirmation dialog to delete linkifiers.
Fixes part of #22812.
2022-09-07 11:29:18 -07:00
Ganesh Pawar 92b4bb7ffc
settings: Add confirmation dialog to delete code playgrounds.
Fixes part of #22812.
2022-09-07 11:28:08 -07:00
Anders Kaseorg 7e6e98aefb puppeteer_lib: Fix get_element_text typing.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-09-06 15:02:29 -07:00
Kartik Srivastava 0d9b1547ce user_topics: Rename set_muted_topics to set_user_topics.
We should now rename set_muted_topics to set_user_topics as with
the new user_topic event, there will be various types of user-topic
configurations to handle other than just muting topics.
2022-08-29 17:24:08 -07:00
Kartik Srivastava 03d9418010 user_topics: Use user_topics page_param instead of muted_topics.
Since we are replacing muted_topics with user_topics, the web app
should now be using the user_topics page_param to construct the
muted_topics map. Also, the UI should now use the user_topic event
instead of muted_topics to handle topic updates.

This updates user_topics.js to use the new user_topics page_param to
initialize the muted topics map. This also replaces the "muted_topics"
clause in server_events_dispatch.js with a "user_topic" clause.
2022-08-29 17:24:08 -07:00
Kartik Srivastava cf4bbf1ba5 user_topics: Add set_user_topic helper function.
As we plan to move towards using `user_topics` instead of
`muted_topics`, this helper method will be used to set an
individual `user_topic` event in the corresponding data
structure in the web app.
2022-08-29 17:24:08 -07:00
Lauryn Menard f03eed5231 keyboard-shortcuts: Document browse back and forward in history.
Documents in help center `/keyboard-shortcuts` and in the app `?`
menu the shortcuts used by browsers for navigating back and forward
through the open tab's history, which are made to work in Zulip.

Also, updates `adjust_mac_shortcuts` to update the shortcut keys
for users with Mac user agents.

Fixes #18542.
2022-08-29 15:20:49 -07:00
jai2201 663e9fe3fc unread: Indicate which topics have unread @-mentions.
Fixes #21637.
2022-08-29 12:49:08 -07:00
jai2201 fee877e99c unread: Indicate which streams have unread @-mentions.
Fixes part of #21637.

Co-authored-by: Tim Abbott <tabbott@zulip.com>
2022-08-29 12:49:08 -07:00
evykassirer d04385dd1f drafts: Stop mocking compose_state in node tests.
Testing actual code is better here (and usually) instead of
mocking out function calls with what we think they should respond.
2022-08-29 11:46:02 -07:00
evykassirer 69685c2864 drafts: Create a section to show drafts from the current conversation.
Fixes #21716.

By allowing users to view drafts that are addressed to their current narrow,
we hope to help them more easily find and continue previously drafted
messages.
2022-08-25 23:12:31 -07:00
evykassirer bc2149d1ef people: Extract emails_to_full_names_string helper.
This code that previously lived in a larger function is needed by
another function in PR #22127.
2022-08-25 17:48:50 -07:00
Tim Abbott 95dfde121c docs: Update global links to new contributing guide URL.
Logically, these are part of the previous commit, but won't pass CI
until ReadTheDocs has built the previous commit and generated the
target page.
2022-08-25 11:25:02 -07:00
Purushottam Tiwari ff2db9c235 user groups: Rename settings_user_groups to settings_user_groups_legacy.
A preparatory commit to have legacy user group settings logic
as we move forward to redesign the user group settings.

This is done so that current user group settings are functional
while we are working on the redesign, and also to make it clear
that most of the code in this file will be deleted and developers
should avoid spending much time on it.
2022-08-23 17:30:39 -07:00
Anders Kaseorg d923096882 channel: Remove pending_requests list.
It’s been unused since commit 2eacc7317d
removed the only caller of abort_all and commit
ef815e9e79 removed abort_all itself.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-08-19 12:17:40 -07:00
Anders Kaseorg fde9b1d366 channel: Remove idempotent retry loop.
This was added by commit 7f174213ed, and
appears to have been designed for responses that are *successful* but
falsy. Logically, these should not implicitly represent a failure to
be retried if it were.

Note from tabbott: The background is that this idempotent retry loop
was a hacky workaround for a bug we never understood but saw daily in
production. Especially during server restarts / client reloads,
something would result in 200 responses with no data being seen by the
frontend, despite the Django server not having received/processed the
request. Fortunately, this strange failure mode appears to have
stopped happening in late 2019, so we can delete this hack.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-08-19 12:14:41 -07:00
Anders Kaseorg 4391bc324b node_tests: Remove unused message_lists mock from dispatch test.
It became unused in commit b8661b6633
(#22452).

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-08-18 22:27:24 -07:00
Anders Kaseorg 7200c9f8e4 zjsunit: Support asynchronous overrides.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-08-18 16:21:04 -07:00
Anders Kaseorg b0dba411d9 js: Skip redundant jQuery object reconstruction.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-08-18 16:11:13 -07:00
Tim Abbott 303bbee2a2 message_lists: Remove cases for table_name being undefined.
The table_name property was only ever undefined for the
special all_messages_list object.

In 6f764ce4b3, we downgraded that object
to only have a MessageListData; as a result, we now never construct a
MessageList or MessageListView without `table_name` set correctly.
2022-08-18 12:30:30 -07:00
Aman Agrawal b8661b6633 message_lists: Add a function to return rendered message_lists.
This function returns home message_list and the current narrowed
message_list if it is different than home.
2022-08-18 12:30:30 -07:00
Aman Agrawal 9a282ff9ad message_fetch: Refactor stub into the mocked `MessageListView`. 2022-08-18 12:30:30 -07:00
N-Shar-ma 87cb449d08 search_suggestions: Fix bug where space in stream names did not show.
For multi word stream names, searching for particular phrases, like
the entirety of any word in it, caused no space to show before and/or
after that word. For example, searching for `core` resulted in
`**core**team` (the space between `core` and `team` missing).

The cause of this bug was that the immediate container was `div` with
`display: flex` and so spaces at the ends of its immediate child
elements: text nodes and `strong`  elements - were not respected. This
is fixed now by wrapping all the `description_html` text in a `span`
element (while the optional user_pill_context stays in another `span`
as before).
2022-08-18 11:22:08 -07:00
Anders Kaseorg dad0d51ada node_tests: Reenable asynchronous event_status test.
Fixes #20180.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-08-18 08:55:31 -07:00
Anders Kaseorg a4a233b189 zjsunit: Support asynchronous tests.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-08-18 08:55:31 -07:00
Anders Kaseorg 485fe8556e zjsunit: Defer run_test execution to the end of the test module.
This is consistent with Jest and other standard test runners, and is
necessary to support asynchronous tests.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-08-18 08:55:31 -07:00
Anders Kaseorg d4923a12e1 node_tests: Use a spec-compliant FormData implementation.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-08-18 08:53:55 -07:00
Anders Kaseorg e0b593f67e js: Use .empty() instead of .html("").
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-08-17 16:04:55 -07:00
Riken Shah 6e725fb3c3 puppeteer: Fix flake in `user-deactivation.ts`.
The reason for the flake was we were not waiting enough
time for the deactivation row to render.

To fix this, We are relying on the input from the user
deactivation screen to focus.
2022-08-17 11:58:16 -07:00
Riken Shah 6f2f3504b5 puppeteer: Fix flake in`navigation.ts`.
The reason for the flake was we were not waiting for the
settings modal to open completely.

To fix this we now wait until the profile tab is focused to
detect if the settings modal is open completely (i.e ready
for the interaction).
2022-08-17 11:38:21 -07:00
Lauryn Menard a85d589254 stream_events: Use `is_muted` event instead of `in_home_view` event.
Updates `stream_events.js` to use the subscription update event that
is now being sent for the `is_muted` stream property, instead of the
event sent for the `in_home_view` property.

Because the server is still sending events for `in_home_view`, keeps
it as a property processed by `update_property` function, but does
nothing with the event. Adds temporary test for coverage.
2022-08-16 16:52:15 -07:00
Kartik Srivastava 47e5ccf086 user_topics: Rename muted_topics.js to user_topics.js. 2022-08-16 14:39:24 -07:00
Oliver Pham 2ed650f596 search_suggestion: Show profile pictures in autocomplete suggestions.
Because the typeahead.js list items are currently just text, a user's
full name and avatar should be displayed in `input_pill`. To use
`input_pill`, a separate Handlebars partial view was created to
provide a mandatory container (`<div class="pill-container">`) for
`input_pill` and a flex container (`<div class="search_list_item">`)
for vertically aligning the text.

The description of each suggestion (i.e `description_html`) is
rendered as raw HTML, so every special character (e.g. whitespace)
should be HTML-escaped. This enables highlighting the substring in
each search suggestion that matches the query.

Fixes: #20267
2022-08-16 14:17:42 -07:00
N-Shar-ma 865023802e refactor: Change description to description_html in search suggestions.
This is a prep commit for #20494.
2022-08-16 13:56:33 -07:00
N-Shar-ma 08e111501d compose: Refocus composebox when clearing prevew mode.
When switching back to writing mode after preview mode, the composebox
would be out of focus and so the the cursor would semingly get lost.

Now on clearing the preview mode, the composebox is focused and so the
cursor is seen blinking at it's original position.
2022-08-16 13:46:32 -07:00
Anders Kaseorg e8a30060ee js: Enable no-jquery/no-constructor-attributes.
https://github.com/wikimedia/eslint-plugin-no-jquery/blob/master/docs/rules/no-constructor-attributes.md

The motivation for this rule is a subtle caveat buried in the
documentation:

https://api.jquery.com/jquery/#jQuery-html-attributes

“While the second argument is convenient, its flexibility can lead to
unintended consequences (e.g. $( "<input>", {size: "4"} ) calling the
.size() method instead of setting the size attribute).”

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-08-16 13:42:28 -07:00
Riken Shah 6242602276 puppeteer: Fix `subscribe_toogle.ts` long pending flake.
The issue with the existing code is that we use the
`page.waitForSelector` function to detect if the element
is visible and interactable.

`page.waitForSelector` only ensures that the element is
visible and doesn't guarantees that the element is
interactable. Most of the time it is enough but sometimes
it is too fast and our test fails.

To fix this we change our approach to check the button
text on the stream settings page (`/#streams/stream_id`).
Either it could be `Subscribe` or `Unsubscribe`.
2022-08-16 13:01:31 -07:00
Ganesh Pawar e758ec400b alert word: Convert inline form to modal. 2022-08-15 19:07:38 -07:00
Tim Abbott 4a34b7d18e left-sidebar: Make Subscribe to more streams more informative.
The "Subscribe to more streams" widget has always had this tension
between "Subscribe" vs. "Create" in a way that felt like whatever we
wrote could be confusing. To address this, we enhance the component to
advertise whether additional existing streams that the user can
subscribe to actually exist or not.

- When the user has N>0 streams they can subscribe to, we display
"Browse N more streams".

- When the user has no streams they can subscribe to (i.e. they're
already susbcribed to all the ones they could join) but the user has
permission to create streams, we show a "Create a stream" link.

- If the user doesn't have permission to subscribe to or create any
streams, we don't show a link at all.

Fixes #21865.

Co-authored-by: Jai soni <jai_s@me.iitr.ac.in>
2022-08-15 12:32:43 -07:00
Sahil Batra 577abbd434 node_tests: Remove duplicated code in settings_org tests. 2022-08-12 18:09:53 -07:00
Sahil Batra 0c67c7d269 settings: Add checkbox for whether message editing is allowed or not.
This commit adds a checkbox for allow_message_editing setting and
thus we also remove the "Never" option from the time limit dropdown
as unchecking the newly added checkbox will mean the same.

We also disable the time limit input if message editing is not
allowed.

This commit also changes the label for time limit dropdown.

Fixes part of #21739.
2022-08-12 18:09:53 -07:00
Sahil Batra a1f40ccda5 message_edit: Make zero invalid value for message_content_edit_time_limit_seconds.
This commit changes the code to consider zero as an invalid value for
message_content_edit_time_limit_seconds. Now to represent the setting that
user can edit the message anytime, the setting value will be "None" in
database and "unlimited" will be passed to API from clients.
2022-08-12 18:09:53 -07:00
jai2201 aa700ff59d pm_list: Handle narrow functions separately for pm_section.
This commit is a preparatory commit for #20870, it introduces
`handle_narrow_deactivated` and `handle_narrow_activated`
functions in pm_list.js, separately from top_left_corner.js,
to reduce the complexity of handling private messages section
separately.
2022-08-12 15:26:00 -07:00
Anders Kaseorg 1f9573d527 Revert "pm_list: Handle narrow functions separately for pm_section."
This reverts commit 46b289cbda.

This commit didn’t pass Node tests independently of the PR #21726 that
it was split from, because pm_list is mocked.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-08-11 18:12:12 -07:00
jai2201 46b289cbda pm_list: Handle narrow functions separately for pm_section.
This commit is a preparatory commit which introduces
`handle_narrow_deactivated` and `handle_narrow_activated`
functions in pm_list.js, separately from top_left_corner.js,
to reduce the complexity of handling private messages section
separately.
2022-08-11 17:39:04 -07:00
jai2201 45c53d217e pm_list_data: Fix minor typos in comments on the tests. 2022-08-11 17:39:04 -07:00
Tim Abbott 40086c4406 puppeteer: Disable user deactivation test for now. 2022-08-11 17:19:41 -07:00
Riken Shah 7cda08445c puppeteer: Fix `test_narrow_public_streams` test in `message-basics.ts`.
It was introduced in
56b2b838ee commit.

It fixes `test_narrow_public_streams` test which checks
that, there are no bookends in ` /streams/public`. The
issue was there were no bookends by default when we
were checking in the Denmark stream. We fix this by
unsubscribing from the Denmark stream which will
create a bookend.
2022-08-10 16:16:50 -07:00
jai2201 1986b37a04 message_edit: Close message edit UI after message is moved.
Currently, if we navigate to some other topic/stream
while the message is being moved, the message edit UI
still remains open as we do not get its `row` in
`message_lists.current` since the message has not moved yet
to the stream/topic we navigated.

Hence the correct thing to do would be to delete
the message_id from `currently_editing_messages` if it
exists there but we cannot find the row.

Fixes #21724.
2022-08-09 16:24:44 -07:00
Adam Sah 56b2b838ee narrow: /streams/public should not have bookends.
Fixes #18280.
2022-08-09 16:21:39 -07:00
madrix01 c1b5021d84 stream_list: Sort muted to end of sections and add labels.
The stream list left sidebar currently has 3 sections:
* Pinned (+ Muted pinned streams)
* Active (+ Muted active streams)
* Inactive streams

Previously, these sections were separated by horizontal lines, which
did not provide an easy way to discern why there were sections. We add
labels to these section dividers to help with this.

Additionally, within each section, we now sort all muted streams to
the bottom, so that they general minimal clutter.

Fixes #19812.
2022-08-06 21:59:23 -07:00
N-Shar-ma e671decd29 typeahead: Update characters allowed before @-mentions.
Now the following characters are allowed before @-mentions, stream
references (starting with #) and emojis (starting with :) - space, (,
{, [, ", ', /, <.

Earlier only the opening brace type characters and space was allowed.
2022-08-06 19:29:39 -07:00
yogesh sirsat 87ba3c1549 custom_profile_fields: Convert edit profile field form into a modal.
This allows this component to follow existing design patterns, rather
than being its own unusual element with various quirks.

The implementation is approximately the same as before I just migrated
"Edit custom profile field" form into modal, like "Add new custom
profile field" form modal.

Fixes: #21634
2022-08-05 17:26:56 -07:00
yogesh sirsat 526b55c6fc custom_profile_fields: Convert new profile field form to a modal.
This lets us remove this fairly ugly user interface widget, which was
inconsistent with the rest of the settings UI.

The implementation is approximately the same as before I just migrated
"Add new custom profile field" form into a modal, status update
notifications about these forms will be displayed inside their modal,
and made some little design changes as discussed on CZO.

Fixes part of: #21634
2022-08-05 17:26:56 -07:00
Anders Kaseorg 27eed09a84 dependencies: Upgrade JavaScript dependencies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-08-04 13:52:06 -07:00
Sahil Batra f3e1b6eaa2 node_tests: Define locally echoed messages correctly in tests.
Currently locally echoed messages are checked using locally_echoed
field in get_editability. Previously it used local_id field but it
was changed in 0e25055c1d. Tests for get_editability used local_id
till now, but the tests were passing as the message was not allowed
to edit due to time limit. This commit fixes the tests to use
locally_echoed field instead.
2022-08-03 15:59:51 -07:00
N-Shar-ma 13ef0b5b04 left-sidebar: Use -, _ and / additionally as stream word separators.
Uptil now only space was used as a word separating character when
searching streams. This meant that searching for "xyz" would not turn
up a stream named "stream-xyz" as one would expect.

Since -, _ and / are likely to be used as word separators in stream
names, these 3 are added as word separators for streams. The utility
function `filter_by_word_prefix_match` is refactored by adding an
optional `word_separator_regex` argument.

Fixes: #19700.
2022-08-02 15:55:07 -07:00
Sahil Batra 1455f290f2 settings_bots: Use same modal that is used in admin bot-edit form.
We change the edit form opened from "Personal" settings section
to be same as the form opened from "Organization" section.
2022-07-31 16:56:03 -07:00
Anders Kaseorg b945aa3443 python: Use a real parser for email addresses.
Now that we can assume Python 3.6+, we can use the
email.headerregistry module to replace hacky manual email address
parsing.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-07-29 15:47:33 -07:00
Ivan Toymentsev cd0821084c upload: Locally verify file size before uploading the file.
With an extended comment by tabbott.

Fixes #21978.
2022-07-28 14:15:04 -07:00
yogesh sirsat f264795770 deactivate_users: Change submit button text of confirmation modal.
Change submit button text of both bot and user deactivation confirm
modal from "Confirm" to "Deactivate".
Calling `launch()` function from `dialog_widget.js` because
`confirm_dialog.js` set submit button text to "Confirm".
2022-07-27 17:09:48 -07:00
yogesh sirsat 9f21e34592 settings_users: Add ? in deactivate confirmation modal title. 2022-07-27 17:09:48 -07:00
yogesh sirsat d090347ea9 settings_bots: Change of text in bot deactivate confirmation modal.
Also, add `?` at the end of title of the this modal.
2022-07-27 17:09:48 -07:00
Nikhil Maske 249d2a5d55 confirm_deactivate_user: Provide additional information about user.
Providing additional information like number of invites and number of
bots owned by deactivating user in the confirm_deactivate_user modal
will help the administrator if they need to do any follow-up work.

Fixes #20973.

Completed-by: Ganesh Pawar <pawarg256@gmail.com>
2022-07-26 17:03:02 -07:00
Anders Kaseorg 0bf7d76fb2 zjsunit: Fix mock_esm call site detection.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-07-22 19:30:55 -07:00
Sahil Batra aa7bd76e5d compose: Show same error message everytime user is not allowed to post.
We do not show different error messages for different values of post
policy values if user is not allowed to post making it consistent with
other settings like wildcard mention settings and organization settings.

This also helps us deduplicate some code as we use almost same code
for excluding the streams to which user is not allowed to post from
the dropdown in moving messages UI.
2022-07-22 17:19:40 -07:00
Sahil Batra 18dda7b485 message_edit: Do not show streams to which user cannot post.
We do not show the streams to which user cannot post in the dropdown
list widget for moving messages between streams.
2022-07-22 17:19:40 -07:00
Lauryn Menard 35e9e4cd3b keyboard-shortcuts: Add class to arrow keys for Mac shortcuts.
The <kbd> elements in `static.templates.keyboard_shortcuts.hbs`
that are arrow keys have a class of "arrow-key". This adds that
class to arrow keys that are updated via `adjust_mac_shortcuts`.

Follow-up task due to changes introduced in #22330.
2022-07-20 11:05:15 -07:00
Sahil Batra 2bcd55dade settings_config: Remove stream-admins option for wildcard mention policy.
This commit removes the stream-admins option for wildcard mention policy
in webapp since we are not moving forward with stream administrator
concept and instead working on new permssions model as per #19525. There
is no functional change, we only remove the by_stream_admins_only key and
instead use by_admins_only with the correct code value.
2022-07-13 17:07:44 -07:00
Sahil Batra 093a74bd54 models: Remove "role" field from Subscription.
This commit removes "role" field from subscription
objects since we are not moving forward with stream
administrator concept and instead working on new
permssions model as per #19525.
2022-07-13 17:07:44 -07:00
Anders Kaseorg c520890f54 node_tests: Remove low-hanging uses of __Rewire__.
When we were preparing the conversion to ES modules in 2019, the
primary obstacle was that the Node tests extensively relied on the
ability to reach into modules and mutate their CommonJS exports in
order to mock things.  ES module bindings are not mutable, so in
commit 173c9cee42 we added
babel-plugin-rewire-ts as a kludgy transpilation-based workaround for
this to unblock the conversion.

However, babel-plugin-rewire-ts is slow, buggy, nonstandard,
confusing, and unmaintained.  It’s incompatible with running our ES
modules as native ES modules, and prevents us from taking advantage of
modern tools for ES modules.  So we want to excise all use of
__Rewire__ (and the disallow_rewire, override_rewire helper functions
that rely on it) from the tests and remove babel-plugin-rewire-ts.

Commits 64abdc199e and
e17ba5260a (#20730) prepared for this by
letting us see where __Rewire__ is being used.  Now we go through and
remove most of the uses that are easy to remove without modifying the
production code at all.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-07-13 16:27:30 -07:00
YashRE42 20f36431ec presence: Rename hbs templates to not have the word "user".
This is a prep commit for enabling a two section layout in the
buddy_list. The sections will be for "users" and "others".

Hence, this commit performs a simple rename of:
- `user_presence_row.hbs` -> `presence_row.hbs`
- `user_presence_rows.hbs` -> `presence_rows.hbs`
And then a search and replace of `user_presence_row` to
`presence_row` (which also handles the second rename).

It also makes one modification in buddy_list.js where it changes a
template variable we're passing from "users" to "row_members".
2022-07-13 14:34:44 -07:00
Aman Agrawal df6ad8154a default_language_modal: Add more space around languages displayed.
We use 3 columns on wide screens and come down to 1 column on
narrow screens to ensure that the languages are properly
displayed.
2022-07-12 17:23:15 -07:00
evykassirer 1b24bfcc31 mark as read: Fix banner not closing when x is clicked.
Previously, the X in the mark-as-read banner did nothing.
2022-07-12 16:34:26 -07:00
Lauryn Menard 32d396fdc7 help-docs: Remove `mac-cmd-style` CSS rule.
Removes the `mac-cmd-style` CSS rule that was introduced in
d3e8348 when support for updating keyboard shortcuts with
the `Ctrl` key to the Mac cmd key, `⌘`, was added.

Removing the rule makes the font-size and font-family CSS more
consistent with other keyboard shortcuts in the documentation.

Also, removes the parameter in `adjust_mac_shortcuts` that added
the CSS class / rule to these specific keyboard shortcuts.
2022-07-12 12:17:41 -07:00
Anders Kaseorg d3f2203459 input_pill: Remove random IDs.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-07-11 11:44:47 -07:00
Anders Kaseorg fc6b4ff6aa input_pill: Identify pills by DOM nodes, not random IDs.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-07-11 11:44:47 -07:00
Anders Kaseorg 4d0fca8285 zjsunit: Merge with_field, with_…_disallowed into with_overrides.
This increases consistency and saves a bit of code, but more
importantly, it makes it much easier to switch between these APIs
while refactoring tests.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-07-11 11:35:49 -07:00
N-Shar-ma 082e9adcea typeahead: Don't match descriptions for streams and user groups.
Uptil now, both names and descriptions of streams and user groups were
matched to show the typeahead suggestions. This led to unexpected
behaviour like for a clear mention of a certain stream, the typeahead
menu suggested a completely different stream which had a mention of
the first stream in it's description.

To prevent such bugs and also since description matching is not really
useful for streams and user groups, only names will be matched.
2022-07-08 14:28:29 -07:00
Lauryn Menard 24d1d08553 mac_shortcuts: Render shortcuts with `Fn` key correctly.
Updates the `adjusts_mac_shortcuts` function to render shortcuts
with the `Fn` key as a separate html element (e.g. `Fn` + `arrow`)
instead of rendering the shortcut as one block (e.g. `Fn + arrow`).

Also, because keyboard shortcuts should be rendered with each key
as a separate html element, updates `adjusts_mac_shortcuts` to
only change html elements that are an exact match to a keyboard
key. Html elements with whitespace will be ignored (e.g. `Enter`
becomes `Return`, but `Enter or Backspace` is not changed though
it previously would have been changed to `Return or Delete`).

Fixes #22112 (in combination with #22273).
2022-07-07 17:38:26 -07:00
Ganesh Pawar c6d636ef48 realm_domains_modal: Migrate modal to dialog_widget. 2022-07-07 14:56:45 -07:00
Anders Kaseorg 4ebcc9ba95 puppeteer_tests: Fix type errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-07-06 17:23:16 -07:00