Commit Graph

14409 Commits

Author SHA1 Message Date
Sahil Batra e53a76bc03 settings: Rename get_message_edit_or_delete_limit_setting_value function.
This commit renames get_message_edit_or_delete_limit_setting_value
function to get_time_limit_setting_value, so that we can use the
same function to get value for email notification batching setting
value.
2022-09-23 16:24:16 -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 6b876bdf70 settings: Send only changed settings to server for msg edit subsection. 2022-09-23 16:24:16 -07:00
Sahil Batra ed070000e8 settings: Extract function to show/hide custom input.
This commit extracts a function to show or hide the custom
input of message edit and delete limit setting and to set
the initial value of custom input while showing it.
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
Sahil Batra 0dfcc14ebb settings_org: Rename changed_val variable to proposed_val.
This commit renames changed_val variable to proposed_val
in check_property_changed function for better readability.
2022-09-23 16:24:16 -07:00
Tim Abbott 155787512f css: Modal read receipts CSS to modal.css. 2022-09-23 16:21:31 -07:00
Riken Shah ff899e5c31 read_receipts: Disable showing read receipts for Notification Bot msgs.
The implementation is simple, we just check if the
the message sender is a notification bot to decide if we
should show the read receipts list.

We also update the modal content styling to match the padding at the
top of the modal.

Fixes #22905
2022-09-23 16:20:25 -07:00
Tim Abbott 80e4dcb042 settings: Remove trailing period for reactions setting.
All of our other settings labels don't have a trailing period.
2022-09-23 12:27:54 -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 5248f1c40b settings_bots: Change text "profile picture" to "avatar". 2022-09-23 12:06:51 -07:00
Yogesh Sirsat 601bd796a1 bots: Live update add new bot button on changing bot_creation_policy. 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
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
Aman Agrawal 5ef1b1f5da portico: Fix footer text overflow in different languages.
Fixes #22946
We fix width of footer sections and let the text overflow within.
2022-09-23 10:49:48 -07:00
Mateusz Mandera a359362845 delete_topic: Add retry logic in the webapp. 2022-09-22 15:01:43 -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
David Rosa 4549529714 help: Document "Mark messages as read on scroll" mobile app feature.
Adds section on how to configure whether messages are automatically
marked as read.
Adds instructions to manually mark all messages as read, or mark all
messages in a stream or topic as read.
Adds the all messages tab image icon.

Fixes: #22915.
2022-09-22 10:36:41 -07:00
Aman Agrawal 5d76f67247 rendered_markdown: Fix alignment of icons in code blocks. 2022-09-22 10:35:33 -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
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 a446f05c98 settings: Disable save btn for invalid values of batching period setting.
We disable the "Save changes" button for invalid values in custom
input of realm-level default of email notification batching period
setting.
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
Sahil Batra 25223539d1 settings_org: Move update_save_button_state function to module level.
We would use update_save_button_state for realm-level default of
notification batching setting also in further commits.
2022-09-19 20:20:53 -07:00
Sahil Batra 2933f079b8 settings: Modify update_save_button_state to use it for other settings.
This commit modifies update_save_button_state such that it can be used
for other time-limit settings too.
2022-09-19 20:20:53 -07:00
Lauryn Menard 7a0d659f14 templates: Add HTML title element to templates that extend base/portico.
Adds HTML title elements to templates that extend either `base.html`,
`portico.html` or `portico_signup.html`, and that are not website
portico landing pages that will use the `PAGE_TITLE` variable to set
the HTML title element (see following commit in series).

Also, updates some templates for missing translation tags.

As a general rule, we want the title element (and page content)
translated. Exceptions that are updated in this commit are templates
used in the development environment, analytics templates that are used
by staff and templates related to Zephyr.
2022-09-19 20:17:17 -07:00
Aman Agrawal 683a5e7c23 view_code_in_playground: Fix tooltip being partially hidden. 2022-09-19 14:11: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
Purushottam Tiwari 4db6c51fb1 stream_edit: Fix warning in confirm dialog modal from sub-unsub modal. 2022-09-18 16:02:08 -07:00
Ganesh Pawar a1ac78f34e delete custom emoji: Add confirmation dialog.
Fixes part of #22812.
2022-09-17 11:55:33 -07:00
Ganesh Pawar 4c32972274 modals: Add `data-simplebar` to `login` and `api key` modal.
c439b9d3af added `data-simplebar` to
the `dialog_widget` module, but these modals don't use it. So, add it
separately.
2022-09-17 11:45:36 -07:00
Yogesh Sirsat 2a9145c212 user_profile: Initialize user type fields only when necessary. 2022-09-16 17:51:34 -07:00
Yogesh Sirsat 9416427dc2 settings_bots: Open bots streams tab from personal settings > bots.
UI in settings for bot owners to unsubscribe their bots from streams,
Personal settings > Bots > Bot info card > hashtag icon.

Fixes: #22460
2022-09-16 17:51:34 -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 45307affc0 popovers: Text change from "Owner" to "Bot Owner" in profile popover. 2022-09-16 17:51:34 -07:00
Sahil Batra 05b7ca01c4 settings: Disable "Joining the organization" settings for admins.
This commit disables the settings in "Joining the organization"
subsection for admins as they can be changed by only owners.

We also move the tooltip mentioning "Only owners can change..."
to the subsection heading.
2022-09-16 15:27:52 -07:00
Sahil Batra 6ddc83d034 settings: Fix typo in id of "Joining the organization" subsection. 2022-09-16 15:27:52 -07:00
Yogesh Sirsat 8d04e2b4c3 custom_profile_fields: Display deleted options in confirmation modal.
While editing custom profile fields, when user delete option(s) of
select type profile field, display that deleted option(s) in delete
option confirmation modal.

Follow-up: 21878
2022-09-16 15:04:01 -07:00
Yogesh Sirsat 1c2b90eae9 custom_profile_fields: Update text of delete options confirmation modal. 2022-09-16 15:04:01 -07:00
Yogesh Sirsat 2328dc0d4e custom_profile_fields: Confirmation modal for delete profile field. 2022-09-16 15:04:01 -07:00
Yogesh Sirsat c4233d2472 custom_profile_fields: Display success status after add/edit fields.
Display success status "Saved" for consistency in settings UI, after
successful request of Add or Edit custom profile fields.

Follow-up: #21878
2022-09-16 15:04:01 -07:00
Aman Agrawal 155540c0e3 popovers: Fix alignment of icons in sidebar and msg action popovers.
The regression was introduced in c8f346b5e5.
Reverted the change that caused the regression and introduced a
new fix.
2022-09-16 11:47:44 -07:00
Aman Agrawal 2aaf3c3c76 Revert "popovers: Align icons and content in middle."
This reverts commit 948dc3a629.
2022-09-16 11:47:44 -07:00
Anders Kaseorg 82f9014970 stream_list: Fix another “subscribed” typo.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-09-15 16:55:15 -07:00
Aman Agrawal 948dc3a629 popovers: Align icons and content in middle.
The icons like `x` for delete message were displayed below the
text in alignment due to a regression.
2022-09-15 12:14:15 -07:00
Ganesh Pawar 0b2c149268 edit user: Place deactivate button outside the `form` element in modal.
Pressing `Enter` on an input in the `Manage user/bot` form triggers
a click on the `Deactivate` button. This commit prevents that.

Fixes #22961.
2022-09-15 12:13:35 -07:00
Ganesh Pawar c439b9d3af modal: Make the modal content scrollable instead of the whole modal.
Earlier, if the content of the modal (apart from the header and footer)
overflowed, the whole modal would become scrollable which would hide
the modal header and footer on scrolling. This commit makes only
the modal content scrollable and keeps the modal header and
footer static.
2022-09-14 15:45:36 -07:00
Ganesh Pawar 7f8f954897 bots: Remove redundant overflow CSS.
This was added to avoid the `owner` dropdown field from being
only partially visible in the `Manage bot` modal. But, now the
`owner` field is moved up in the modal so this isn't needed.
2022-09-14 15:45:36 -07:00
aadiljaleel 654bab1d19
popovers: Replace full profile avatar border with box-shadow.
This makes the visual border appear outside the image, not overlapping its edges.

Fixes: #21265
2022-09-14 09:26:53 -07:00
Tim Abbott 0da9fdf28f Revert "read_receipts: Use 'one person' instead of '1 person'."
This approach will be confusing for translators for languages where
the same conjugation is required "21" as for "1".

This reverts commit 53cf974b89.
2022-09-13 11:54:19 -07:00
Ganesh Pawar f58620c7ec org settings: Move invitations required checkbox to the top.
This commit moves the
"Invitations are required for joining this organization" checkbox
in `Organization permissions` settings to the top.
2022-09-13 11:39:21 -07:00
Yogesh Sirsat ce14df0f4f custom_profile_fields: Display data of default external type while edit.
Display values of "name" and "hint" field in non-editable way while
editing default external account type profile fields.
2022-09-13 11:38:47 -07:00
Yogesh Sirsat c1cf691080 custom_profile_fields: Remove redundant empty val set from edit form. 2022-09-13 11:38:47 -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
Lauryn Menard fe7d7b48db help-docs: Use `<kbd>` HTML elements for references to keyboard keys.
Updates references to keyboard keys in the help center docs to use
`<kbd>` HTML elements, which also means updating them to be as the
key would appear on a keyboard.

Previously, uppercase and lowercase letters were used to indicate
when/if the `Shift` key was being used, and even that was not
consistent throughout the documentation.

For CSS styling, adds a similar rule for `<kbd>` elements that is
used in `/static/styles/app_components.css`. And updates the CSS
class used in `/static/js/portico/help.js` for `adjust_mac_shortcuts`
accordingly.

Also, takes advantage of revising these pages for making small
updates for current help center documentation practices.
2022-09-13 11:16:14 -07:00
Lauryn Menard 899f535b39 forms: Update create organization part of registration form.
Adds a legend to the "org-registration" fieldset where the user
inputs info about the new organization. Previously, there was only
a legend for the "user-registration" fieldset. Also, increases
the opacity of CSS rule for the legend color so that they are
more visible.

Removes the hint text about what the organization URL value is
used for since it is pretty clear from the field's name.
2022-09-13 10:41:03 -07:00
yogesh sirsat f3578912fa custom_profile_fields: Disable "External account type" select field.
Disable "External account type" select field from External account type
profile field edit form, doing it because this select field is not
editable and it is incorrectly looks like editable.
2022-09-12 14:29:11 -07:00
Yogesh Sirsat aa7fddbc1d custom_profile_fields: Display data of default external type fields.
Display default values of "name" and "hint" field in uneditable way
while creating new default external account type profile fields.
2022-09-12 14:29:11 -07:00
N-Shar-ma ca2c0f7e21 i18n: Internationalized placeholder text "Question" for `/poll`. 2022-09-11 14:10:07 -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
N-Shar-ma c4d9d1d33b typeahead: Simplify code path for highlighting after selection.
This makes the implementation more readable, and also dependant only
on the `highlight` object, not the detail that previously only slash
commands, which have an `item.placeholder`, used this code path.
2022-09-11 14:10:06 -07:00
Tim Abbott 53cf974b89 read_receipts: Use 'one person' instead of '1 person'. 2022-09-11 12:47:27 -07:00
Zixuan James Li 7565dec728 read_receipts: Add a link to the help docs of read receipts.
Because we are also rendering a link here, the message can no longer be
plain text.

Signed-off-by: Zixuan James Li <p359101898@gmail.com>
2022-09-11 12:42:30 -07:00
Zixuan James Li a6b017f0c6 read_receipts: Alter translation string in accordance with Transifex.
This is a proposed fix to allow the pluralization forms to correctly
show up in Transifex's UI for the translators.

Context can be found here:
https://chat.zulip.org/#narrow/stream/58-translation/topic/ICU.20Message.20syntax/near/1431813

This is a followup to #22837.

Signed-off-by: Zixuan James Li <p359101898@gmail.com>
2022-09-11 12:42:30 -07:00
sayamsamal c8f346b5e5 icons: Change mute icon from bell to speaker.
This icon is more standard, and lets us use a speaker icon for other
applications.

Fixes #21751
2022-09-09 17:32:19 -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
Tim Abbott f765d7f523 Revert "message_edit: Use `disabled` instead of `readonly` to disable controls."
This appears to have broken "Copy and close" in "View source".

This reverts commit 73cfab8ba8.
2022-09-09 16:34:43 -07:00
David Rosa 33a618d169 integrations: Add generic bot macro to relevant docs.
There are a handful of integration docs that instruct users to create
a bot and select the "Generic bot" type without using a helper macro.

Adds a new macro to replace these instructions, including a screenshot
of the latest UI for selecting a bot type.
2022-09-09 16:31:33 -07:00
David Rosa 620854d437 integrations: Add incoming webhook macro to relevant docs.
Several integration docs instruct the user to create a bot, but don't
specify that the type of bot should be "Incoming webhook".

Renames create-a-bot.md -> create-an-incoming-webhook.md for clarity,
and replaces all incomplete instructions with this macro.
Renames bot_types.png -> bot_types_incoming_webhook.png and updates
the image with a screenshot of the latest UI.
2022-09-09 16:31:33 -07:00
David Rosa 217915a50c integrations: Remove "Yo".
The Yo company shut down in 2016.
https://en.wikipedia.org/wiki/Yo_(app)#History

Removes `yo` instances from `zerver/lib/integrations.py`.
Removes `zerver/webhooks/yo`.
Removes `static/images/integrations/yo-app`.
2022-09-09 16:31:33 -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
Tim Abbott 5f626428de realm_user_settings_defaults: Fix alphabetization of fields. 2022-09-09 16:30:54 -07:00
Mateusz Mandera 95bc77ae4f help center: Update "SAML authentication" to follow help center guidelines.
Co-authored-by: Alya Abbott <alya@zulip.com>
2022-09-09 10:30:05 -07:00
Sahil Batra a4004e05a6 settings: Add help link with realm default of read receipts setting. 2022-09-09 09:31:04 -07:00
Sahil Batra bf97760544 settings: Add help link with user read receipts setting. 2022-09-09 09:31:04 -07:00
Anders Kaseorg 7d485aa58f docs: Correct more “webapp” to “web app”.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-09-08 20:23:28 -07:00
Het Patel 2151ef3a8f
search help: Fix incorrectly using "email" as the example email address.
Fixes part of #22866.
2022-09-08 11:06:32 -07:00
Purushottam Tiwari 7879f78917 user groups: Implement edit features in user group settings overlay.
Follow up for #22214.
2022-09-07 12:09:28 -07:00
Purushottam Tiwari b1c81e2e02 user groups: Implement General tab functionalities for group settings.
There will be one more follow up commit to this, that will
add support for editing memberships of user groups and will
complete preliminary version for user group edit settings.

Follw up for #22214.
2022-09-07 12:09:28 -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 bc317c0d0c
settings: Add confirmation dialog to delete data exports.
Fixes part of #22812.
2022-09-07 11:28:42 -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
Lauryn Menard 7f738803f0 help-docs: Rename organization language help center file.
Renames article about organization language used for automated
messages and invitation emails. Creates URL redirect and updates
links in repository (web app, help center and api documentation).

Prior to this change, the article was named:
'change-the-default-language-for-your-organization'.

Fixes #21949.
2022-09-07 09:45:37 -07:00
Anders Kaseorg 143a3350fa dependencies: Upgrade JavaScript dependencies.
jQuery is held at 3.6.0 due to
https://github.com/jquery/jquery/issues/5105.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-09-06 15:02:29 -07:00
Riken Shah 39a3944951 timepicker: Fix hours and minutes input getting squeeze in safari.
This issue is probably with the upstream bug in
`flatpickr` but we can fix it for us by specifying minimum
height to the input.

Fixes #22698
2022-09-06 12:57:24 -07:00
Sahil Batra bef9592d49 settings: Move custom input div inside the main setting div.
This commit moves "dependent-block" div inside the main
setting "input-group" div as the custom input is part of
that setting only. Also this will help in further refactoring
of settings code which will be done in next couple of PRs.

There are no changes visually, the space between settings
and inputs remain same.
2022-09-06 11:14:02 -07:00
Tim Abbott 03d385c1da pm_list: Remove unnecessary topic popover calls.
This was incorrectly copied from the topic_list logic in the original
implementation of a left sidebar private messages widget in
fd66d9f703.
2022-09-02 12:42:57 -07:00
rixant af1de04f97 user_status_ui: Add "At the office" option. 2022-09-02 09:00:10 -07:00
Tim Abbott 43a57494f9 settings: Fix incorrectly resolved merge conflict.
In 7b4f7b4a85, we replaced
do_settings_change the dialog_widget.send_api_request.

When 0a278c39d2 was rebased past that
change, the merge conflict was resolved incorrectly, resulting in
duplicate API requests.
2022-09-01 14:36:25 -07:00
Christopher Chong f1a3cdc4c6 integrations: Add Azure DevOps webhook integration. 2022-09-01 14:01:13 -07:00
jai2201 294be1661c unread: Use consistent background-color for unread count pills.
Change the background-color of all unread count pills in dark theme
to have 1 consistent type of color in complete application,
similar to how we have in light theme.

Fixes #21358.
2022-09-01 13:55:55 -07:00
jai2201 73cfab8ba8 message_edit: Use `disabled` instead of `readonly` to disable controls.
Currently when a user does not have the permission to edit the topic/content
of a message, the edit UI/view source UI correctly shows a greyed
out topic/message-content input field, however these fields incorrectly have a
click behavior, so to fix this we now would want to use `disabled` prop instead
of `readonly` attribute as `readonly` controls can still function and are still
focusable whereas disabled controls can not receive focus and are unclickable.

Fixes #22565.
2022-09-01 11:20:20 -07:00
Zixuan James Li 971729a338 read_receipts: Add pluralization for read_receipts.
Note that we do not include the situation when no one
has read the message yet. Though the ICU MessageFormat
has the capability to do that, that case has already
been handled in the if block.

Fixes #22830.

Signed-off-by: Zixuan James Li <p359101898@gmail.com>
2022-09-01 11:19:06 -07:00
Het Patel b6a4e38c9d
settings: Fix styling of preview organization profile button.
Fixes #22743.
2022-08-30 22:58:56 -07:00
Khushiyant 8609c441ff images: Move Giphy images into proper subdirectories.
The logo were only used in the integration documentation and belong in
static/images/integrations/giphy/; the in-app image is given its own
directory.

Fixes #22464.
2022-08-30 22:40:59 -07:00
Khushiyant bfd38b3297 images: Move error/loading images into subdirectories.
Fixes part of #22464.
2022-08-30 22:40:59 -07:00
Aman Agrawal bc937168cd left_sidebar: Remove outline from streams scrolling container.
Simplebar sets tabindex for `simplebar-content-wrapper` which
makes it focusable. The outline which comes with it when focused
is annoying, so we remove the outline.
2022-08-30 22:29:31 -07:00
Aman Agrawal 379c6acbea portico: Add page to list open organizations.
Fixes #22020
2022-08-30 16:02:06 -07:00
Aman Agrawal cf274577f4 landing_pages: Remove unwanted underline on link focus.
When a user clicks on a link it triggers `:focus` and an
underline is displayed. This is not intentional.

Also, for keyboard users, we have a surrounding outline box
for focus, so this underline is redundant in that case too.
2022-08-30 16:02:06 -07:00
Aman Agrawal 5d3c6aa857 integrations: Round top borders and remove box shadow.
This makes it look good with the new footer.
2022-08-30 16:02:06 -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
Tim Abbott 9aabe628ff bucketer: Store bucket_keys in reverse_lookup maps.
This makes it possible to fetch the bucket_key, not just the bucket
itself, given an item_id.
2022-08-29 12:49:08 -07:00
Eeshan Garg 5925ce16b1 demo-orgs: Disable billing and upgrade for demo organizations.
Disables submit buttons on billing / upgrade page for demo
organizations since they will need to become permanent
organizations before upgrading to Zulip Cloud Standard.

Also creates an alert banner on the same page that links to
the help center article on demo organizations.

Updates sub-headers on demo organizations help center
article to match link text and to follow general convention
of using imperative verb forms in help center subheaders.

Part of #19523.

Co-authored by: Lauryn Menard <lauryn@zulip.com>
2022-08-29 11:43:45 -07:00
Lauryn Menard 8a20884230 tippy: Initialize tippy in portico.
As a prep-commit for updating the billing / corporate pages for
demo organizations, initialize tippy.js with a default setting
for portico pages to use in general.
2022-08-29 11:43:45 -07:00
Lauryn Menard d5f4a93d6c bots: Refer to notification bot messages as automated notices.
Updates in-app and documentation references to automated messages
sent by the notification bot as automated notices (or automated
messages where more appropriate/clear), instead of notifications.

Also, makes some small related revisions / general clean ups to
`resolve-a-topic.md`.

Fixes #22188.
2022-08-29 10:54:08 -07:00
Anders Kaseorg 0612c29b02 dropdown_list_widget: Skip redundant jQuery object reconstruction.
Followup to #22747.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-08-26 12:17:08 -07:00
Anders Kaseorg 864abac946 js: Use jQuery .first() when appropriate.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-08-26 12:17:08 -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
Sean Heckathorne 6728ee1f0e compose: Clear preview UI when recipient change clears compose box.
Previously, we cleared the preview element only when cancelling
compose, which meant the compose box would be left in an invalid
state, showing a preview from a no longer active draft, if switching
recipients with it open.

Fix this by moving the call to clear the preview state to clear_box,
which is called in both the hide_box (close compose) and change
recipient code paths for clearing compose after not having sent a
message.

Fixes #22703.
2022-08-25 16:07:44 -07:00
nickgiann 011233d016 digest: Add header above plain text view of digest.
This commit adds a header above the plain text view of the digest to
be more clear about what the user is seeing.

A bit hacky, but the page is an internal development tool.

Fixes #21165.
2022-08-25 16:00:43 -07:00
Anders Kaseorg d123056000 settings_config: Add specialize_stream_notification_setting table.
This fixes a bug in commit 513207523c
(#21284) where handle_global_notification_updates would throw an error
on wildcard_mentions_notify because our API isn’t as symmetric as it
should be.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-08-25 13:02:48 -07:00
Anders Kaseorg 5387e56da7 settings_config: Add generalize_stream_notification_setting table.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-08-25 13:02:48 -07:00
Anders Kaseorg 77599d4db1 sub_store: Extract StreamSpecificNotificationSettings type.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-08-25 13:02:48 -07:00
Anders Kaseorg 4240b0400b user_settings: Extract {Stream,Pm}NotificationSettings types.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-08-25 13:02:48 -07:00
Anders Kaseorg 804be2f2a5 settings_config: Remove incorrect ‘Type’ suffix on type names.
‘Type’ only makes sense as a suffix on a type *of types*.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-08-25 13:02:48 -07:00
David Rosa 682367a3fd help: Document "View user profile" mobile app feature.
Adds instructions for mobile app users.
2022-08-25 11:05:07 -07:00
David Rosa a1e9ac145d help: Add info icon to mobile stream settings macro.
Replaces the unicode character ⓘ with the corresponding
SVG image icon that matches the mobile app's info button.
2022-08-25 11:05:07 -07:00
Tim Abbott 4ac4573c52 unread_ops: Harden against bugs involving recent topics.
In theory, this function should never be called when Recent Topics is
visible. But if it somehow is, ensure that we don't access
message_lists.current without first checking whether it's visible.
2022-08-24 16:13:56 -07:00
Tim Abbott 50f6d7ff73 message_lists: Avoid setting message_lists.current in recent topics.
The original change in 5f127c85f7 was
intended to make the loop in message_lists.js not include a
potentially stale message_lists.current in the event that one is
viewing recent topics.

We revert that change and instead do the simpler thing of explicitly
checking whether we're viewing recent topics.

I was not able to prove this code was responsible for incidents this
week where all messages were marked as read while working in "Recent
topics", but is suspicious.

Likely the correct thing is to set message_lists.current to undefined
in this code path; I'm pretty sure it's an orphaned message list that
is no longer visible when viewing topics.
2022-08-24 16:13:56 -07:00
David Rosa 104fd6566a help: Document "Private messages" mobile app feature.
Adds step-by-step instructions for mobile app users including the
corresponding image icons for the buttons that they should tap on
their screen.

Makes individual SVG image icons, for the help center docs, available
in `/static/images/help/`, instead of importing the entire set of
icons as dependencies.

Adds the icons for the "PMs" tab from https://feathericons.com, and
"Checkmark" and "Send" buttons from https://materialdesignicons.com.
Adds a new nested CSS selector to `.markdown img` so that the default
white border for images does not get applied to these icons.
2022-08-24 15:21:42 -07:00
Purushottam Tiwari 6242604b9d user groups: Fix hashchange logic for user group settings.
We were not handling hashchange for user group settings
under diffrent conditions. So this commit adds logic for
handling various diffrent cases of hashchange for user
group settings. We also take care that #groups only in
development environment.
2022-08-23 17:40:02 -07:00
Purushottam Tiwari c0acffb8a8 user groups: Set up right panel for user group edit.
This is preparatory commit that does basic UI set up for
user group edit in group settings overlay. This allows us to
write proper hashchange logic for user group settings overlay
under diffrent situations.
The work in this commit will be extended in further commits
to add proper UI and group edit logic.
2022-08-23 17:40:02 -07:00
Purushottam Tiwari a8c3be7fee user groups: Add new UI support for user group creation.
Add support for creation of user groups using right panel
of new user group settings overlay being developed as part
of https://github.com/zulip/zulip/issues/19526.

In further commits we will add support for editing user
groups using right panel of the overlay.

This commit also introduces a minor bug related hashchange
for #groups which would be a quick fix once we have UI
for group edit on #groups overlay.
2022-08-23 17:40:02 -07:00
Purushottam Tiwari c1cb5a6ef1 user groups: Set up right panel for user group settings overlay.
This is a preparatory commit to set up basic UI for right panel
in user group settings overlay. At this point we only ensure
the proper display of the two panels under different screen sizs.

Actual functionality for user group creation and user group
edit will be added in subsquent commits.
2022-08-23 17:39:52 -07:00
Purushottam Tiwari 072996141f user groups: Add filter for group list in group settings overlay. 2022-08-23 17:30:39 -07:00
Purushottam Tiwari 76aae8c5a0 user groups: Add user group rows in left for user group overlay. 2022-08-23 17:30:39 -07:00
Purushottam Tiwari 656f6a0fe9 user groups: Add overlay for user group settings.
Dedicated overlay for user group settings is added as part of
addressing zulip#19526.

The newely added overlay is currently empty and more UI
related to settings is to be added in further commits.
2022-08-23 17:30:39 -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
Sahil Batra 526914a996 settings: Set the custom input elem value to original value when hiding.
We now set the value inside custom input element of message and delete
limit setting to the original setting value when hiding the input in
process of changing the setting.

This fixes the bug of the save-discard button not hiding on doing
the following changes -
- Change the setting value from Anytime (or any other option) to custom.
- The save-discard widget appears. Now write something in custom input
box.
- Then change the setting value to the original value, which in this
case can be considered Anytime as mentioned above.

The save-discard widget should be hidden after above steps because
the setting value is changed to its already set value, but it does
not without doing the changes in this commit because
check_property_changed returns true for custom input element.
2022-08-23 16:17:25 -07:00
Sahil Batra ba0c5a2380 settings: Fix save button not being re-enabled correctly.
The "Save changes" button was not re-enabled if the initial
setting value was "Anytime" and then setting is changed to
"Custom" (which disabled the button since input is empty) and
then followed by changing to some other option.

This commit fixes the above mentioned bug. This bug was
introduced in #21837 where we added the functionality to
disable the save button.
2022-08-23 16:17:25 -07:00
Sahil Batra f3c15affd7 settings: Extract code for disabling save button in a function.
This is a prep commit so that we can reuse the function to enable
or disable the save button when changing the message edit and delete
setting dropdown.
2022-08-23 16:17:25 -07:00
Sahil Batra 1da7086c35 settings: Fix save button being disabled even for valid values.
On changing either one of message edit or delete limit setting
from "Any time" to "Custom", the "Save changes" button is not
enabled even after entering valid input.

We can see this bug if both the edit or delete limit setting is
set to "Anytime" initially and one of the setting is changed to
"Custom".

This is because the custom input for "Any time" case is empty even
though it is hidden and the check for disabling the button was
not checking whether the input is hidden or not.

This commit changes the code to consider the value in custom input
box only if the input is visible, i.e. the dropdown value is set to
"Custom".

This bug was introduced in #21837 where we added the functionality
to disable the save button.
2022-08-23 16:17:25 -07:00
Sahil Batra 1990a1ff99 settings: Hide save-discard widget correctly when setting is not changed.
This commit fixes the bug where save-discard was not hidden when message
edit or delete setting is first changed from "Anytime" to any other value
and then again to "Any time". The save-discard widget should be hidden
since the setting is value was "Any time" already.

The bug was because check_property_changed returned true for
"realm_message_content_edit_limit_minutes" and
"realm_message_content_delete_limit_minutes" for above case as value of
setting in page_params for "Any time" case is "null" and
get_input_element_value returned "undefined" as the custom input box is
empty for "Any time" case.

This bug was introduced in #21837 where we changed the input box to be
empty for "Any time" case.
2022-08-23 16:17:25 -07:00
Lauryn Menard 3de4fd5fbb recent-topics: Check topic exists when trying to revive focus.
When a message is deleted, if it was the only message in the topic
and it was the previously focused message in recent topics, then
the topic is no longer in the recent topics data.

In this case, we revive the focus to the adjacent message or, if it
was the last message in the view, the focus is reset to the search
bar.
2022-08-23 15:59:06 -07:00
Israel Ebonko 1f286ab283 integration: Add wekan integration.
Fixes #13086

Co-authored-by: Ganesh Pawar (ganpa3) <pawarg256@gmail.com>
2022-08-22 15:37:22 -07:00
Ganesh Pawar 544e472ec3 user profile modal: Don't close settings when opening modal.
Fixes #22572.
2022-08-22 15:32:18 -07:00
Sahil Batra cb15767df3 settings: Update label for realm-level default of send_read_receipts. 2022-08-20 15:38:34 -07:00
Anders Kaseorg 3e7d7ee86a integrations_dev_panel: Remove unused idempotent flag.
Followup to commit fde9b1d366 (#22753).

(This was a misuse of “idempotent”.  “Idempotent” means that
performing the request more than once in a row has the same effect as
performing it once; it says nothing about whether the response is
cacheable.)

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-08-19 16:45:09 -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 c84f35644d channel: Stop monkey-patching password change counts into XHR objects.
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
Tim Abbott bc0ca5f769 read_receipts: Fix rendering of avatars for some Gravatar users.
The previous logic was just using the `.avatar_url` field on objects
returned by `people.js`, which can be null/undefined.
2022-08-18 18:10:06 -07:00
Anders Kaseorg 89d22d143c message_edit: Repair incorrectly moved with_first_message_id function.
Commit 9aa5082d63 (#20673) incorrectly
changed the name of the error callback passed to channel.get.  This
prevented reporting of errors while moving a topic.  Fix it.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-08-18 17:39:25 -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
evykassirer 747ea8e84d copy-paste: Fix edge cases on message selection for copying.
When we detect that multiple messages are selected, copying will copy the
entirety of each message that is selected. [more conversation on that
here](https://chat.zulip.org/#narrow/stream/6-frontend/topic/triple.20click.20.2B.20copy.20paste.20bug/near/1398292).

This commit fixes a bug where we would select the entirety of a message
following a selection even when none of that last message's text was
selected (only some HTML element in the messages's container).

Fixes #18706.
2022-08-18 15:20:21 -07:00
evykassirer 96b2e18b0d copy-paste: Separate intial_end_tr logic into its own function.
Creates a new function get_end_tr_from_endc. This will make it
easier to add more logic to this function to fix a bug (#22350).
2022-08-18 15:20:21 -07:00
evykassirer 358416349e copy-paste: Stop treating selections with extra whitespace as multi-line.
A message selection that goes off the end of the last message in a topic
could still be a selection of only one message. We shouldn't assume that
it's multiple messages, and so there shouldn't be an assignment of
`skip_same_td_check = true`.
2022-08-18 15:20:21 -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 5f127c85f7 recent_topics_ui: Set current msg_list to home when RT is visible.
`current` should ideally be `undefined` here to reflect the
correct narrow state but to make sure background updates of
message_list go smoothly, we set it to home.
2022-08-18 12:30:30 -07:00
Sahil Batra 5cc5d15de1 settings_org: Reuse code to enable or disable delete limit setting.
This commit reuses set_delete_own_message_policy_dropdown to enable
or disable the time limit settings based on change in
delete_own_message_policy dropdown.
2022-08-18 11:50:50 -07:00
Sahil Batra 3a6de60fe0 settings_org: Pass value to set_delete_own_message_policy_dropdown.
This is a prep commit for deduplicating code and using this same
function set_delete_own_message_policy_dropdown for disabling or
enabling the limit setting while changing policy dropdown.
2022-08-18 11:50:50 -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 e0b593f67e js: Use .empty() instead of .html("").
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-08-17 16:04:55 -07:00
YashRE42 de663184f3 message_view_header: Color web public stream globe icon.
We forgot to change the selector here when we switched from a fa globe
icon to a .zulip-icon, which resulted in the new globe icon only having
the default color.
This commit makes the appropriate change.
2022-08-17 12:09:12 -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
N-Shar-ma 87a6c3924b compose: Allow ctrl + enter to send in preview mode as well.
When the user chose to send the composebox message on pressing ctrl +
enter instead of just enter, it only worked in writing mode but not in
the preview mode.

This change makes ctrl + enter send the message even in preview mode,
when that setting is chosen.

Fixes: #21670.
2022-08-16 14:35:47 -07:00
Tim Abbott 745b96ea46 compose: Fix enter returning user to preview mode.
I'm not sure whether the bug this fixes was a regression resulting
from d6d3683da0, or an old bug, but
focusing the compose box is not sufficient to end preview mode; we
should be calling the function that's explicitly for that.
2022-08-16 14:34:11 -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 9cc8a2bc80 refactor: Change hilite to highlight_query in search_suggestion.
This is a prep commit for #20494.
2022-08-16 13:56:33 -07:00
N-Shar-ma d63e127f5c refactor: Change highlight_person to person_highlighter in search.
This is a prep commit for #20494.
2022-08-16 13:56:33 -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 e52268aeee documentation (user): Document `/poll` in `?` help widget.
To make it easier for users to make polls, their syntax is documented
using an example along with its (non dynamic) rendered version.

Fixes: #18588.
2022-08-16 13:55:56 -07:00
N-Shar-ma 7115895bbc documentation (user): Remove redundant 2nd line from /me documentation. 2022-08-16 13:55:56 -07:00
N-Shar-ma d6d3683da0 compose: Focus 'Write` button on entering preview mode.
Till now, switching back to writing mode after preview mode, needed
the user to first focus on the `Write` (unpreview) button by tabbing
to it (if using keyboard) and then select it.

To make things easier, especially when using keyboard, now the `Write`
button will be automatically focused on entering preview mode, so
going back to writing mode only needs one 'Enter` keystroke.
2022-08-16 13:46:32 -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
Tim Abbott b05e70899d message_edit: Don't send topic/stream changes if inputs readonly.
This makes the logic for whether to send content, topic, and stream
changes obviously parallel.
2022-08-15 19:13:34 -07:00
Aman Agrawal c5489c9d2b message_edit: Don't send content to server if msg edit is disabled.
We ensure that if message edit is disabled, then we don't send
content in request to the server.

Refactored by tabbott to match the existing pattern for how we do this
for topic/stream edits.
2022-08-15 19:13:34 -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
jai2201 d557933a76 dipatch: Remove a stale comment.
This stopped being true in 1d7d686.
2022-08-14 22:56:03 -07:00
Tim Abbott e083a4bf46 drafts: Fix draft controls being offscreen on mobile web.
This was caused by an interaction with the controls being positioned
absolutely -103px from the right edge of the element, which is clearly
a hack.

Replace that with a simple `float: right` construction, with the top
padding aligned.

Fixes #22512.
2022-08-14 09:07:11 -07:00
Tim Abbott b67ff652de css: Remove Bootstrap legend CSS.
We inline this into the CSS for the one element where we use it.
2022-08-13 17:36:08 -07:00
Tim Abbott 1e018f9c23 css: Remove legacy bootstrap control* CSS.
We've removed all use of these CSS classes from the codebase.
2022-08-13 17:18:32 -07:00
Tim Abbott 0b350f23af settings: Remove useless .controls CSS.
These settings widgets have not had an object with the .controls CSS
class at least since they were given independent template files.
2022-08-13 17:11:36 -07:00
Tim Abbott e30e8c0e6d settings: Fix settings inputs broken in mobile sizes.
In 84e307581f, we removed the HTML that
these CSS rules applied to. (We incorrectly only tested that commit in
desktop sizes).

Also, the width: 100% rule both did not have sufficient priority to
apply, and also exceeded the size of the input. Fix this with a hacky
!important, since there's a good chance we'll replace these inputs
with a modal or something.
2022-08-13 17:11:36 -07:00
Ganesh Pawar d9410f37c1 signup: Remove stale highlighting function.
This function was introduced in
447dc0029a74c8ff47d13fa40ce97dc10f20b522; but we haven't been using
this highlighting feature; and the last control-group was removed from
the signl page in dc2bdb2aad.
2022-08-13 17:09:10 -07:00
Ganesh Pawar f6f85f98a7 portico: Remove usage of `control-group` and `control-label` class. 2022-08-13 14:59:37 -07:00
Sahil Batra 44266987ec settings: Disable the save button if custom time limit input is invalid.
We disable the "Save changes" button if the custom time input for
edit and delete time limit is 0, -ve values or empty.
2022-08-12 18:09:53 -07:00
Sahil Batra b5ff903ddc settings: Make custom input empty for "Anytime" case.
We set the custom input box empty for "Anytime" case for
message edit and delete limit settings. We also keep the
"Save changes" button disabled when changing from "Anytime"
to "Custom" since the input box is still empty.
2022-08-12 18:09:53 -07:00
Sahil Batra 3c1fbeb3c7 settings: Enable or disable delete limit setting before saving.
We enable or disable the delete limit setting immediately on
changing the "Who can delete their own message" dropdown
before saving the changes.
2022-08-12 18:09:53 -07:00
Sahil Batra f52e4ee602 settings_config: Use time_limit_dropdown_value for delete limit values.
Since, we removed the "never" option for edit-limit setting in
previous commits, we can now use same list for both edit-limit
and delete-limit setting values.
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
Sahil Batra 864fe7befb settings: Rename "Message editing" to "message and topic editing".
Fixes part of #21739.
2022-08-12 18:09:53 -07:00
N-Shar-ma cfa4973441 typeahead: Fix thin blue line bug when there is space after `>`.
When the user added space/s right after the topic typehead symbol `>`,
a thin blue line would be selected at the top of the typeahead menu.

To avoid this and to make stream and topic typeaheads' behaviour more
consistent with each other, space/s right after `>` is not allowed,
like it is not allowed right after `#`.

Fixes: #19124.
2022-08-12 16:47:06 -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
Dinesh 48d2783559 read_receipts: Add support for displaying read receipts.
Adds an API endpoint for accessing read receipts for other users, as
well as a modal UI for displaying that information.

Enables the previously merged privacy settings UI for managing whether
a user makes read receipts data available to other users.

Documentation is pending, and we'll likely want to link to the
documentation with help_settings_link once it is complete.

Fixes #3618.

Co-authored-by: Tim Abbott <tabbott@zulip.com>
2022-08-12 13:16:35 -07:00
Tim Abbott 828867c733 overlays: Allow calling open_modal with a modal already open.
Previously, our modal system prevented opening a modal when one was
already open. It appears this was implemented to work around the fact
that we're using Micromodal selectors to determine if a modal is open
(and those don't update until after an animation frame).

We'd like to support opening the full user profile and manage user
modals while read receipts is open. While we could work around this in
that place, it feels like one needs a lot of documentation in order to
add a setTimeout in those code paths.

So we instead make open_modal support this, with a guard to prevent
infinite recursion in case of future bugs.

Note that dialog_widget was already closing modals before opening the
next one, so this is a behavior change only for our 3 modals that do
not use dialog_widget.

(I'm not sure why the `dialog_widget` modals did not already require a
delay, but likely there's some CSS difference).

We likely will want to redo this to instead use a better state
tracking system.

See https://chat.zulip.org/#narrow/stream/49-development-help/topic/close.20and.20open.20another.20modal.20immediately
for discussion.
2022-08-12 13:16:35 -07:00
Dinesh 63d71ecb0c popovers: Use e.currentTarget for .view_user_profile event listener.
The previous version with e.target would give the element that was
clicked lying inside an element with '.view_user_profile'.

One would usually expect "data-user-id" to be attached to the
same element with ".view_user_profile" instead of any of its children.
So, to just look for "data-user-id" in the element with that class,
instead of any of its chidren, this commit changes e.target to
e.currentTarget.
2022-08-12 13:16:35 -07:00
Sahil Batra 43fb872f3f settings: Add UI for changing read receipts realm_user_default.
Fixes #22657.
2022-08-12 11:25:35 -07:00
Sahil Batra 894879d1fe settings: Change label of send_read_receipts setting.
The previous label was ambiguous and suggested one needed to have sent
a message in a given conversation to see read receipts.
2022-08-12 11:25:16 -07:00
Sahil Batra 8302337aa9 settings: Add tooltip for user read receipts setting.
We show tooltip for user read receipts setting mentioning
that the organization has disabled read receipts setting
when an organization does so. We hide the tooltip when
organization read receipts setting is enabled.

We also fix the alignment of "i" icons with label and headings
at various places by moving it 1 pixel below. There may be
some places where it is not fixed, but those will be fixed
separately.
2022-08-12 11:21:44 -07:00
Sahil Batra 103115dad6 settings: Add checkbox for enable_read_receipts setting. 2022-08-12 11:21:43 -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
evykassirer 3ddb2b1457 drafts: Move padding from draft rows to whole list.
This is a refactor with no visible change. It allows other elements
to more easily be added to the draft list and have the same padding.
2022-08-11 16:36:56 -07:00
Rishabh-792 91a0e14778 settings: Fix text alignment in save and discard buttons.
The text inside save/discard widget buttons was misaligned with
respect to the icon in the button. To align it properly, we add
vertical-align and a reduced line-height property to the span.

Fixes: #20583.
2022-08-11 16:12:18 -07:00
Biki-das c387e7c2ec settings: Fixes alignment of save/discard widget with text.
Resolves the issue by aligning the buttons with the text.

It's not entirely clear why text-bottom is the correct alignment, but
visually it seems to be correct.

Fixes: #20583.
2022-08-11 16:06:03 -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
Tim Abbott 7d77f496bd message_events: Fix buggy variable reuse.
Previously, the topic_edited and stream_changed variables were
incorrectly used outside the loop over events, in a way that meant
we'd use the values of these from the last event, when we clearly
meant to use whether, for example, the current stream was changed.

In practice, it's rare for a client to process multiple message edit
events at the same time, but this will happen anytime a client is
offline for a few minutes during which several edits occur.
2022-08-09 16:06:21 -07:00
Tim Abbott d0fb83c2eb message_events: Reorder to better organize variables. 2022-08-09 16:06:21 -07:00
Tim Abbott 675c42f40b message_events: Use new_stream_id consistently and add comments. 2022-08-09 16:06:21 -07:00
Tim Abbott 95c1f3b696 update_messages: Add old_stream_id variable for readability.
Having a parallel to new_stream_id seems better than accessing the
original event object directly for only one of these.
2022-08-09 16:06:21 -07:00
evykassirer 4c8079c49a drafts: Update drafts when topics are moved.
We've for years done this for the currently open compose box state,
and it seems very natural to do this for drafts as well.

Fixes #22068.
2022-08-09 16:06:21 -07:00
Ganesh Pawar 29288993e8 invites: Remove stale use of `control-group` class.
The invitee emails html doesn't contain the `control-group`
class.
2022-08-09 10:36:27 -07:00
Ganesh Pawar 84e307581f minor: Remove usage of `control-group` and `control-label` class. 2022-08-09 10:36:27 -07:00
Ganesh Pawar 91723afbae minor: Remove stale `control-label` CSS.
None of the removed classes/id's make use of the `control-label`
class.
2022-08-09 10:36:27 -07:00
Tim Abbott 98c7427bfc message_edit: Remove Bootstrap cruft from message edit form.
* Remove likely useless use of `controls` Bootstrap class.
* Remove outer control-group elements, which just added 10px bottom margin, and
  were always used with .no-margin, which removed that margin :).
* Rename message-edit-timer-control-group to message-edit-timer, since
  it isn't a control-group.
2022-08-06 22:28:40 -07:00
Tim Abbott 9c1c0016ed css: Clean up message edit form CSS somewhat.
* Remove Bootstrap `form-horizontal` class and !important override
  required by it.
* Standardize on 10px bottom margins; this fixes subtle bugs in some
  sizes.
2022-08-06 22:28:40 -07:00
anurastogiji 1921dce7c7 message_edit: Swap propagate_mode with checkboxes in message edit form.
Previously, we had you select where to send notifications before
specifying which messages you're moving, which seems like the wrong
decision hierarchy.

Fixes #19973.
2022-08-06 22:28:40 -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
Julia Bichler 0a278c39d2 settings: Send email after deactivating user.
This adds a feature where an admin can choose to send an email
with custom content to an user after they deactivated them.

Fixes #18943.
2022-08-06 21:41:53 -07:00
Yogesh b8a760b14e compose: Improve tooltip on compose box "x" button.
In compose box, the "x" button tooltip text changed to
"Cancel compose and save draft" except when unsent
message length is short(<3).

Also in help(?) > keyboard shortcuts, text for `Esc`
changed to "Cancel compose and save draft".

The help center page updated with the above changes.

Fixes #21599.
2022-08-06 20:46:46 -07:00
madrix01 45743ea195 recent_topics: Improve keyboard navigation around unread count.
Following c31ab1bcb5, the keyboard
navigation in Recent Topics has been buggy, because the number of
columns with actionable elements now varies with whether the topic
has any unreads.

Fix the keyboard dead reckoning logic to understand that there's a
different number of columns depending on whether the unread count is
present.

This does not fully make the experience nice, but it's enough to tide
us over for now.

Fixes: #21654.
2022-08-06 19:54:34 -07:00
Tim Abbott 7767ed217d recent_topics: Fix overly wide unread count focus outline. 2022-08-06 19:54:29 -07:00
madrix01 c5fed915cf recent_topics: Extract arrow key navigation into seperate functions.
This is preperatory commit for #21654.
We extract the logic for arrow key navigation when focused on table to
separate functions so it is easy to add more functionality in future
and will not clutter the switch block.

Fixes a part of: #21654
2022-08-06 19:35:12 -07:00
evykassirer 99d1c5a1f3 compose: Ensure we don't warn unresolved topic if not composing for a topic.
In future commits, it will become possible to have a non-null
`compose_state.topic()` while in private message view, because
we'll be keeping that state for switching between the stream
and private message views. See #21853 for further context.
We don't want to warn about a resolved topic unless the topic
is actively visible in the compose box.
2022-08-06 19:31:41 -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 5c8fcee0a3 custom_profile_fields: Remove unnecessary field_form objects.
This commit is a preparatory commit of "custom_profile_fields: Edit
custom profile field form into modal."

The object returned by get_profile_field_info, which contained jQuery
objects for the profile-field-row and profile-field-form elements, was
just a source of unnecessary indirection, since none of the functions
consuming it accessed the row.
2022-08-05 17:26:56 -07:00
yogesh sirsat f885535a7c custom_profile_fields: Add form ID to add new custom profile field form.
This makes it easy to support submitting this form when pressing enter
by passing the `form_id` parameter to `dialog_widget.launch()`.
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
yogesh sirsat c60cdc46e3 custom_profile_fields: Change class from control-group to input-group.
This is a preparatory commit for commit "Edit custom profile
field form into modal."

Above mentioned commit will use class input-group instead of
control-group so here we are already changing it to input-group.
2022-08-05 17:26:56 -07:00
yogesh sirsat d0f5b38f65 custom_profile_fields: Control-group to input-group class correction.
There is no control-group class to hide/show in custom profile fields
list instead there is input-group class, kind of little typo I guess
from this 9e343f1 commit.
2022-08-05 17:26:56 -07:00
Ganesh Pawar 5697f7f269 archive stream: Update modal text.
Fixes #22658.
2022-08-05 15:55:13 -07:00
Julia Bichler 2f399d3470 stream settings: Live update the stream privacy icon.
This live updates the stream privacy icon in the general stream
settings after changing the privacy setting of the stream.
2022-08-03 17:46:06 -07:00
evykassirer 1167bb79ef compose: Match top right buttons' color to other compose buttons. 2022-08-03 17:08:01 -07:00
evykassirer 0524e1b40d compose: Rename show_box to show_compose_box.
This lets us remove a comment to clarify this.
2022-08-03 17:05:15 -07:00
Aman Agrawal ac8d984f7c tippy: Hide tooltip for inline images if the reference is removed.
Spamming the `s` shortcut when hovered on an image can cause the
tooltip to be displayed at the top left corner. This is caused by
original reference of the tooltip being removed from DOM. The
re-rendering is happening so quickly that tippy is not able to hide
the tooltip in time.
2022-08-03 16:20:11 -07:00
Aman Agrawal a43c4afb0b tippy: Move MutationObserver logic into a function.
So that it can be used elsewhere in the code.
2022-08-03 16:19:23 -07:00
Aman Agrawal 06deeb3239 bottom_whitespace: Extract to a dedicated handlebars template.
We'll be supporting changes its content in coming commits.
2022-08-03 16:14:42 -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 9d831b50b7 settings: Disable spectator access option for limited plans.
We also show upgrade banner along with disabling the setting.
We also hide the web-public stream creation policy dropdown in
such case as we do when enable_spectator_access is False.
2022-07-31 18:02:36 -07:00
Sahil Batra 477fb2964c settings: Make spacing consistent between outgoing webhook bot inputs.
We make the spacing between inputs of config data for outgoing webhook
bots in bot-edit form consistent with the other inputs.
2022-07-31 17:06:03 -07:00
Sahil Batra 9ac6160d35 settings: Remove edit_bot.hbs and CSS for non-existent classes.
Since we updated the bot edit form opened from "Personal"settings
section to be same as that opened from organization settings
section, we do not require this file anymore.

Fixes: #22033.
2022-07-31 16:56:03 -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
Sahil Batra d4189fa6ca settings: Allow editing config data of bots from admin edit modal.
We now allow admins to edit configuration of outgoing webhook
and embedded bots from the edit form in "Organization" settings
section. In next commit we would deduplicate the code to use same
modal in both "Organization" and "Personal" settings sections.
2022-07-31 16:56:03 -07:00
Sahil Batra 7f53699a3a settings: Add avatar change option to bot edit modal in org settings.
This commit adds option to change bot avatar from the admin bot-edit
form. This is a prep commit for making bot edit forms in both
"Personal" and "Organization" settings sections same.

We do not use dialog_widget.submit_api_request now since we need
to pass processData and a couple of other parameters with the
request since we are sending a file also as part of data. And
also we add code to show loading spinner which was previously
handled by submit_api_request.
2022-07-31 16:56:03 -07:00
Sahil Batra 59fd88928f settings: Show confirmation modal when deactivating bot.
We now show confirmation modal when deactivating bot from
personal settings section. Since we have added deactivate
option in the bot-edit modal opened from admin settins page
and we would replace the modal opened from personal settings
with that modal, it would be good to show the modal consistently.

This commit also moves confirm_bot_deactivation function from
settings_users.js to settings_bots.js to avoid cyclic dependencies.
2022-07-31 16:56:03 -07:00
Sahil Batra f9a5c39908 settings: Move show_edit_bot_info_modal to settings_bots.
We move show_edit_bot_info_modal function to settings_bots.js
as this code will be used for modals opened from the personal
bot settings section as well when we would make both the modals
same and this will help us in avoiding cyclic imports.
2022-07-31 16:56:03 -07:00
Sahil Batra 25df7088e5 settings: Fix "for" attribute of label in admin_human_form.hbs.
The "for" attribute of label of full-name input in
admin_human_form.hbs was set to "full_name" which is already the
ID of full name input in profile section and not the input in
this form.

As a result, the modal was being closed on clicking on that
label. This commit for now just updates the "for" attribute
for full-name input to the correct ID.
2022-07-31 16:56:02 -07:00
Sahil Batra 4dbe34cc89 settings: Fix "for" attribute of labels in edit_bot_form.hbs.
The "for" attribute of label of full-name input in
edit_bot_form.hbs was set to "full_name" which is already the
ID of full name input in profile section and not the input in
this form.

As a result, the modal was being closed on clicking on that
label. This commit for now just updates the "for" attribute
for full-name input to the correct ID.
2022-07-31 16:56:02 -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
Swapnil Gore 4129a8f8bc
settings: Remove extraneous banner from settings tabs.
This fix excludes the bots and invitation settings tabs from having the 
organization_settings_tip.hbs template being inserted in them.

Arguably we should invert the meaning of this block so the default is
that these notices don't appear, but it's hard to be sure whether we're more
likely to add a new setting panel that is normal settings or a data table.

Fixes: #19967.
2022-07-28 21:54:59 +00: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
Aman Agrawal ca275c4c10 integrations: Convert `integration-main-text` selector to class.
This can now be used in multiple places.
2022-07-28 19:04:43 +00:00
Ganesh Pawar 0ed590594d delete message: Updated modal text. 2022-07-28 09:47:25 -07:00
Rishant Rokaha b16d2cc55c
settings: Improve wording in delete user group confirmation modal.
Fixes #22593.
2022-07-28 09:44:42 -07:00
Lauryn Menard b89e0f6771
settings: Fix references to new user and stream announcements.
Fixes some in-app and documentation references to to new user
announcements and new stream announcements that were still using
'notifications' to refer them. These were missed in the original
pass for updating this language.
2022-07-28 09:33:09 -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
sahil839 594724b834 stream: Do not hide stream email on live update after unsubscribing.
We currently show stream emails for subscribed and unsubscribed
streams in stream settings overlay and don't show them for never
subscribed streams.

There is a bug where we show the empty container without email on
live update after unsubscribing and then we completely hide the
email element after we switch the stream and come back to it
again. But then we again show emails for unsubscribed streams
after reload, to preserve the beahviour of showing the emails of
unsubscribed streams.

This commit fixes this bug by not hiding stream email on live
update after unsubscribing and also showing them after switching
between different streams and makes it consistent with showing
emails for unsubscribed streams.

Fixes #22308.
2022-07-27 16:07:01 -07:00
anurastogiji 32615c81f2 popovers: Add topic auto-complete to "Move topic" menu.
We add topic auto-complete to the left sidebar menu as sometimes user
may want to merge the topic they are moving with an existing topic.

With a tweak by tabbott to remove a now incorrect comment.

Fixes #19876.
2022-07-27 16:01:03 -07:00
Ganesh Pawar e59512764d modal: Use font-weight 600 for modal title. 2022-07-27 14:37:32 -07:00
Anders Kaseorg 35778fa100 overlays: Remove unused support for Bootstrap modals.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-07-26 17:48:31 -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
Tim Abbott 83fa5741ca css: Scope edit_bot_form custom CSS. 2022-07-26 17:00:01 -07:00
om2137 6013a1f4fc css: Use more consistent visuals for edit bot form.
* Use more consistent font style, both within the form and with the
  rest of the app.
* Use more consistent spacing.

Fixed #21410.
2022-07-26 16:58:43 -07:00
Julia Bichler 4be2f0ed10 stream_settings: Use tooltips.
This changes the stream settings ui so that it uses
tooltips instead of titles.
2022-07-25 17:13:23 -07:00
Aman Agrawal 594b3abadc landing_pages: Fix gradient mismatch with background on wide screens.
Make the gradient end in white color to match the background.
This avoids a weird line in the background at the end of the
gradient.
2022-07-25 16:55:13 -07:00
Aman Agrawal 2e4a525669 plans: Improve design of faq answers. 2022-07-25 16:55:13 -07:00
Sahil Batra 28799c5d84 settings: Mention about sponsorship in upgrade banner.
We mention about sponsorship in upgrade banner to non-business
organizations. The message for business organizations is same
as before.

There is no explicit hover behavior for banners for org types
other than business, as banners are not themselves links in
such cases and only parts of text inside the banner are links.

Fixes #22161.
2022-07-25 16:53:37 -07:00
Anders Kaseorg 9094a591e4 common: Remove unnecessary polyfills for IE.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-07-23 15:36:40 -07:00
Julia Bichler 7758317250 message-editing: Change default move option. 2022-07-23 15:35:28 -07:00
Sahil Batra 74476317fd compose: Remove validation for stream named "announce".
Originally, DEFAULT_NOTIFICATION_STREAM_NAME was set to
"announce" and we also showed warning in frontend when
user was composing message to "announce" stream and if
the stream had more than 60 subscribers.

But we changed DEFAULT_NOTIFICATION_STREAM_NAME to "general"
in d46b125bf2. That commit did not remove the frontend code
for showing warning and this commit removes it since there
is no "announce" stream by default now, and we would not
want to show warning when sending to "general" since that
stream could be used for many discussions and it would not
be nice experience to show warning everytime.
2022-07-22 17:19:40 -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
yogesh sirsat 5697c047fc settings_bots: Display "Deactivate bot" button inside bot edit modal.
Fixes: #22482
2022-07-22 16:57:40 -07:00
yogesh sirsat 34c01d80cb settings_bots: Display "Manage bot" modal from bots profile summary.
Fixes part of: #22482
2022-07-22 16:57:40 -07:00
yogesh sirsat fcd49871eb profile_summary: Clarify "Bot" user in bot profile summary.
A bot is technically a special case of a user, in terms of how they're
stored in the database at least, but for end users, we avoid referring
to them that way.

Fixes part of: #22482
2022-07-22 16:57:40 -07:00
Ganesh Pawar e16e7630e6 minor: Add `z-index` to `message_time` class.
This fixes the issue of the timestamp in a message not
being clickable at smaller widths.
2022-07-22 16:39:53 -07:00
Alex Tereschenko eb5fc54859 settings_org: Adjust var/function names after moving to settings_checkbox.
After moving to settings_checkbox in Authentication Methods UI,
mentions of "table" in the related JS variable/function names
are no longer meaningful and may be confusing. Change them to "list".
2022-07-22 16:38:47 -07:00
Alex Tereschenko 9142aab8ba settings_org: Use settings_checkbox in Authentication Methods UI.
Per review feedback in #21002, replace HTML table with a series
of settings_checkbox components for Authentication Methods UI.

Fixes #21001.
2022-07-22 16:38:47 -07:00
Aman Agrawal 768d7630af footer: Reduce links for self-hosted installations on signup pages.
On registration and login pages on self-hosted Zulip servers,
it is not helpful and confusing to show the full navigation footer
for the Zulip website. Instead, we should show a minimal footer.

Fixes #21776
2022-07-22 15:46:42 -07:00
sayamsamal bfc1901289 user_profile_modal: Move profile avatar to the top on smaller screens.
Moving the profile avatar to the top on smaller screen sizes adds to
the general responsiveness of the profile modal.
2022-07-22 15:28:05 -07:00
sayamsamal a5088db6f1 user_profile_modal: Fix long values flowing under the profile avatar.
When some value is very long as in the case of a long email address,
the text used to flow and hide under the profile avatar. We want the
values to be seen at all times, even if they need to be broken into
multiple lines.
2022-07-22 15:28:05 -07:00
sayamsamal d810c285e3 user_profile_modal: Move user status to right and add status icon.
The user status appears out of place among the profile fields and thus
placing it under the avatar avoids any discontinuity between the profile
fields. This also adds the status icon beside the user status.
2022-07-22 15:28:05 -07:00
sayamsamal aebff0fd61 user_profile_modal: Move avatar in full profile to the right.
The placement of the avatar on the right makes the full profile modal
UI consistent with Settings > Profile UI. This also helps the custom
profile fields appear more in line with the default profile fields.

Fixes #21805
2022-07-22 15:28:05 -07:00
sayamsamal 867af1f7f2 user_profile_modal: Move the "User ID" field below the "Email" field.
This makes the Full Profile layout consistent with the Manage User
layout. Also, since both email id and user id are used to identify a
user, they should be placed together.
2022-07-22 15:28:05 -07:00
sayamsamal 2854eacc7f user_profile_modal: Fix label alignment for non-English languages.
This fixes the issue in which the lengthy labels would either overflow
or affect the alignment of the profile fields.
2022-07-22 15:28:05 -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
ritikBhandari 8b880e8942 org-settings: Update "Notifications" header and subheaders.
Updates header "Notifications" to "Automated messages and emails".

Updates these subheaders in that section:
 - "New stream notifications" to "New stream announcements"
 - "New user notifications" to "New user announcements"
 - "Notifications language" to "Language for automated messages
   and invitation emails".

Co-authored by: Lauryn Menard <lauryn@zulip.com>
2022-07-19 17:32:47 -07:00
Alex Vandiver 2d218366cc js: Only trigger reload-on-focus once.
We have observed infrequent storms of accesses (tens of thousands of
requests to minute) to `/` after an event queue expires.  The current
best theory is that the act of reloading the page itself triggers a
focus event, which itself triggers a reload before the prior one had
had time to do anything but send the network request.

Since the `focus` event here is merely as a backstop in case the
synchronous reloading and deferred reloading fail, we need only run it
once.
2022-07-19 17:29:42 -07:00
Alex Vandiver 8c1c02d164 js: Prevent scheduling a non-immediate reload while one is happening.
Prevent a non-immediate reload from being scheduled while an immediate
reload is already in progress.  This is highly unlikely in practice,
but is a reasonable safeguard.
2022-07-19 17:29:42 -07:00
Alex Vandiver 95ad507658 js: Ensure that reload.initiate cannot fall through.
A `reload.initiate({immediate: true, ...})` *should* not return, as it
should trigger a `window.location.reload` and stop execution.

In the event that it continues execution and returns (for instance,
due to being in the background and reloads being suppressed for
power-saving -- see #6821), there is no need to fall through and
potentially schedule a 90-second-later retry.
2022-07-19 17:29:42 -07:00
Julia Bichler ccbdbe4e3b message-editing: Reword move message menu. 2022-07-19 11:50:28 -07:00
Sahil Batra 2b30c3c37c settings_profile_fields: Show confirmation modal when deleting option.
We show a confirmation modal when deleting option of a select-type
field mentioning number of users who are using that option. We also
show the modal if no user has selected that option. We show the modal
only in edit-form and not while creating a new profile field. We do
not show the modal when removing a newly added option during editing
the field.

Fixes #22145.
2022-07-15 16:51:24 -07:00
Sahil Batra 57e0261ff6 settings_profile_fields: Keep option value constant.
Previously, the value for an option of the select type custom
profile field was set as "order - 1". This commit changes it
to remain same even when we reorder the options or delete an
option. When we add a new option, its value is set as 1 more
than largest value already used.

This helps is eliminating various bugs in this subsystem, where
user's choice is changed unexpectedly when reordering or deleting
options.

Discussion -
https://chat.zulip.org/#narrow/stream/378-api-design/topic/custom.20profile.20fields.20option.20deletion.
2022-07-15 16:51:24 -07:00
Julia Bichler 2fcd8d5e21 message_edit: Immediately show propagation menu for topic edits.
This immediately shows the menu for which messages to move when the
user can edit the stream/topic of a message, but not the content of
the message. This balances the concern that this menu might feel like
clutter when doing a content edit with the fact that most of the time
when one visits this menu without content edit permissions, one will
want to be reassured that one can choose which messages to move.

Fixes #19196.
2022-07-15 15:31:33 -07:00
jai2201 511c589e2d message-edit: Add maxlength attribute for editing topic names. 2022-07-15 15:16:55 -07:00
jai2201 97ffeb0b7e message-edit: Avoid hardcoding maxlength for message_edit_form. 2022-07-15 15:16:55 -07:00
jai2201 3853a65a4c compose: Avoid hardcoding maxlength for stream/topic names.
Note that previously, the limit for stream names was 30, even though
stream names have been up to 60 characters in length for years.
2022-07-15 15:15:48 -07:00
jai2201 96be6678e4 stream-edit: Restrict users to maxlength in input for `Stream name`. 2022-07-15 15:10:40 -07:00
jai2201 475b442963 stream-edit: Avoid hardcoding maxlength for stream description. 2022-07-15 15:10:40 -07:00
jai2201 51f2a7f5f4 stream-settings: Rename variables for stream name/description maxlength. 2022-07-15 15:10:40 -07:00
evykassirer be3222dcf0 Move function declaration out of for loop. 2022-07-14 15:16:53 -07:00
Sahil Batra af01107b59 sub_store: Remove role field and SubscriptionRole type.
This commit removes role field from StreamSubscription
type and also removes SubscriptionRole type 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
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 0d20d132b7 settings_bots: Declare bot types as global variables in the module.
We declare bot type variables globally in the module rather than in
set_up function as we would extract a new function in further commit
that will use these.
2022-07-13 16:34:55 -07:00
Sahil Batra 6a56c0dc8c settings_users: Rename get_bot_owner_widget_and_set_role_values.
This commit renames get_bot_owner_widget_and_set_role_values to
edit_bot_post_render, since we will modify the function to do
a couple of more things in further commits and this would be
an appropriate name rather than mentioning all the things in
the name.
2022-07-13 16:34:55 -07:00
Sahil Batra 45f0a138c3 settings: Rename admin_bot_form.hbs to edit_bot_form.hbs.
We rename the file because in further commits we will use
the same modal for the bot edit form in Personal settings
section and that can be done by bot-owners who are not
admins.
2022-07-13 16:34:55 -07:00
Sahil Batra a57358c5be settings_bots: Remove redundant code.
This commit removes the redundant code to update the
"src" attribute of bot avatar on changing avatar added
in f7ca0117e6.

We do not need to add version to the url since the backend
already sends url with latest version number and also we
already re-render the bots page after recieving realm_bot/update
event.
2022-07-13 16:34:55 -07:00
Anders Kaseorg a7263583db landing-page: Remove unused hero-screen class.
It’s unused since commit 7f32c26731.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-07-13 16:32:01 -07:00
Alya Abbott 4b8556ed13 images: Move /apps images into dedicated apps image directory. 2022-07-13 15:14:19 -07:00
Alya Abbott d15e9f7721 images: Move /hello images into dedicated directory. 2022-07-13 15:14:19 -07:00
Alya Abbott 07851077d4 images: Move /features images into dedicated features directory. 2022-07-13 15:14:19 -07:00
Alya Abbott 7b729a07fb images: Move /for/events background image into events images directory. 2022-07-13 15:14:19 -07:00
Alya Abbott 5eccf9743c images: Move /why-zulip images to static/images/landing-page/why-zulip/. 2022-07-13 15:14:19 -07:00
Alya Abbott 7e3388dd9e images: Move /team images into landing-page directory. 2022-07-13 15:14:19 -07:00
Alya Abbott 454c6db177 images: Move /history images into landing-page directory. 2022-07-13 15:14:19 -07:00
Alya Abbott 2f4b73350c images: Move live /features images into landing-page directory. 2022-07-13 15:14:19 -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
YashRE42 900a776293 buddy_list: Rename other_key to new_key in buddy_list.insert_new_html.
This is a prep commit for adding a two section layout to the
buddy_list. It frees the "other_key" name which we intent to use
extensively in future commits.
2022-07-13 14:34:43 -07:00
Christopher Chong 5362a6b555 integrations: Add RhodeCode webhook integration.
Fixes #19627.
2022-07-13 14:10:00 -07:00
Tim Abbott f93d3f37a8 images: Commit updates from running optimize-svg.
It appears that dependency updates mean that this tool produces
slightly different output.
2022-07-13 14:06:00 -07:00
Riken Shah 5fdd93cf32 message_scroll: Hide scroll to bottom button when using keypress.
We added  `is_keypress_scrolling` flag in `message_scroll.js` to keep
track of if keypress is used for scrolling.

Fixes #21844.
2022-07-13 13:56:10 -07:00
Riken Shah 3ba89e7779 message_scroll: Use CSS transition for scroll to bottom button.
We are abandoning jQuery animation because it build up queue
when there is continous switch in animation state.
i.e When user goes ↑↓↑↓↑↓… at the bottom.

Also added `aria-hidden` to `#scroll-to-bottom-button-container` so
that this widget doesn't interfere with screen readers.
2022-07-13 13:50:55 -07:00
Tim Abbott 737145e4e0 i18n: Simpify default_language conditional. 2022-07-12 17:25:43 -07:00
Aman Agrawal f28e89d8b7 popovers: Use css_variables for media queries. 2022-07-12 17:23:15 -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
evykassirer a434b0ef19 Move hide_mark_as_read_turned_off_banner to unread_ui from narrow. 2022-07-12 16:28:34 -07:00
evykassirer ce399cf08f mark as read: Fix button styling for medium-sized screens. 2022-07-12 16:28:34 -07:00
Ganesh Pawar 507dc0127c draft: Fix vertical ellipsis color on hover. 2022-07-12 12:18:56 -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
aparna-bhatt f97fa80433 stream settings: Remove background click handler in "Manage Streams".
This click handler reset the stream creation form; it's not clear why
that behavior would be useful, or why we'd want anything to happen
when clicking in these background areas, so the correct thing to do is
just remove the handler.

Fixes: #21785
2022-07-08 14:32:02 -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