Commit Graph

12749 Commits

Author SHA1 Message Date
aryanshridhar 54a1c73c78 message_edit: Replace checkboxes with settings_checkbox partial.
This commits replaces the custom `send_notification` message_edit
checkboxes with our `settings_checkbox` partial.

The main intention is to also support the feature of selecting a
checkbox by clicking over its corresponding label as we have
in the case of the organization settings checkboxes.

Due to above change, this commit also removes the redundant
`break-row` HTML class along with it styles.
2021-07-21 10:43:18 -07:00
Sahil Batra 7662b088f5 sponsorship: Fix alignment of inputs in sponsorship form.
All the inputs of form has 'width: 100%' property but then
also the width of inputs were different because of box-sizing
property. The select input had 'box-sizing: border-box' style
but the others did not, so this commit adds this style to
the other inputs - text type input and the textarea input,
to fix the alignment.

Adding 'box-sizing: border-box' changes the actual height of
the normal text type input because the default input height
of 20px set by bootstrap now includes padding and border also,
so we add 'height: 30px' style to make its height same as the
select input.

Fixes #19332.
2021-07-21 08:58:09 -07:00
Aman Agrawal 3c024b2fba portico: Add /for/education, /for/events, /for/research pages.
These modern landing pages cover use cases previously not detailed on
our website. Technically, we had a /for/research page before, but it
wasn't finished or linked everywhere.

Removed "function-url-quotes" stylelint rule
since I need to use quotes in url to use an
svg as list bullet point. There are spacing issues
using it as an image. Also, using quotes in url
is actually the recommended way to do it otherwise
there could be issue with escaping.
2021-07-20 22:37:52 -07:00
Vishnu KS 199d3859fb billing: Make create_ajax_request accept callback function.
This is a prep commit for the Stripe checkout migration.

create_ajax_request function used to create an ajax request to our
billing API and on completion redirect to one of the URLs in our
website. The stripe migration requires the ajax request function to
execute Stripe javascript code post the request completion to redirect
to Stripe checkout page. So this commit updates the function to accept a
callback function which gets executed post the request completion.
2021-07-20 14:43:38 -07:00
Priyank Patel 231c536cad settings_data: Break circular dependency with people. 2021-07-20 14:28:48 -07:00
m-e-l-u-h-a-n c7be17eb73 stream settings: Use buddy list logic for filtering users.
Our logic for filtering subscribed users in stream setting was
buggy and gave irrelevant filters based on email matching.

We correct it by using same logic as we use for filtering in
buddy list.
2021-07-20 14:27:58 -07:00
Eeshan Garg 09a3ebf1e4 landing_page: Link to case studies in the top navigation. 2021-07-20 12:35:11 -07:00
Eeshan Garg 13e566815d landing_page: Fix top navigation dropdowns for mobile screens.
A recent PR introduced a bug where navigation dropdowns on the
landing page would not open for tablet/mobile screens. This
commit fixes that issue by using the proper media query to
differentiate between touch and mouse-based devices.
2021-07-20 11:33:56 -07:00
sahil839 b5b7862571 settings: Use '/settings' endpoint for changing notification settings.
We have merged the '/settings/display' and 'settings/notifications'
endpoints to '/settings' in backend. This commit updates the frontend
code to '/settings' endpoint for updating notification settings
instead of '/settings/notifications' endpoint.
2021-07-19 21:14:33 -07:00
sahil839 bbee0fdf6f settings: Use '/settings' endpoint for changing display settings.
We have merged the '/settings/display' and 'settings/notifications'
endpoints to '/settings' in backend. This commit updates the
frontend code to '/settings' endpoint for updating display settings
instead of '/settings/display' endpoint.
2021-07-19 21:14:33 -07:00
Alya Abbott 89724e5bb4 billing: Edit helper text on sponsorship application
* nonprofit -> non-profit
* Edit pass on defautl helper text to use more user-oriented language.
2021-07-19 17:26:45 -07:00
m-e-l-u-h-a-n b23fd2f1f3 stream settings: Move subscription_result template to stream_settings.
This commit moves stream_subscription_request_result.hbs to
stream_settings folder to have a consistent file structure
for stream setting templates.
2021-07-19 10:54:11 -07:00
m-e-l-u-h-a-n 70aa957e55 stream settings: Move stream list templates to stream_settings.
We move templates related to listing streams in left pannel of
stream settings overlay to stream_settings folder by making
following changes:

* Rename `subscriptions.hbs` to `browse_streams_list.hbs`.
* Move `settings_stream_list.hbs` to stream_settings folder.
* Rename `subscription.hbs` to `browse_streams_list_item.hbs`.
* Move `settings_stream_list_item.hbs` to stream_settings folder.
2021-07-19 10:54:11 -07:00
m-e-l-u-h-a-n 62c9b2916e stream settings: Move small independent templates to stream_settings.
We do following changes to two small independet templates used
in stream_settings area:

* Move subscription_setting_icon.hbs to stream settings folder
  to have a consistent folder structure for stream settings templates.
* Rename `subscription_count.hbs` to `subscriber_count.hbs`.
* Move `subscriber_count.hbs` to `stream_settings` folder.
2021-07-19 10:54:11 -07:00
m-e-l-u-h-a-n a61048e167 stream settings: Move subscription_table_body.hbs to stream_settings.
Following changes are done to subscription_table_body.hbs:

* Rename subscription_table_body.hbs to stream_settings_overlay.hbs,
  to have a uniform naming pattern for stream settings templates.

* Move it to stream_settings folder.
2021-07-19 10:54:11 -07:00
m-e-l-u-h-a-n 1a5566bf9b stream settings: Move stream_creation_form.hbs to stream_settings. 2021-07-19 10:54:11 -07:00
m-e-l-u-h-a-n cf0f74c7ce stream settings: Move stream_types.hbs to stream_settings folder. 2021-07-19 10:54:11 -07:00
sahil839 0594207180 realm_logo: Rename realm_logo.rerender to realm_logo.render.
As realm_logo.rerender is now used for initial rendering of
logo as well in c8849f8, so we rename this function from
rerender to render.
2021-07-19 09:45:29 -07:00
Dinesh dd1fccd2c2 tippy: Fix blueslip error on edit history timestamp hover.
The timestamp in edit history ui also has .message_time.
We had a tippy hover event attached to .message_time
whose code assumes it to belong to an actual message
which caused an error on hovering the message timestamp
in edit history.

This commit fixes it by making the selector more specific.
2021-07-19 09:34:52 -07:00
Tim Abbott a5afbb60ff ui_init: Initialize people before right_sidebar.
Because the right_sidebar initialization calls user_has_permission, in
organizations that has a waiting period before users become full
members, and only full members can send invitations, Zulip will throw
an exception on startup.
2021-07-19 00:33:02 -07:00
Tim Abbott 0268a4d06a css: Use separate CSS for create_stream_plus_button.
This part of the second commit in #19218 was actually important to the
first commit working.
2021-07-18 23:52:39 -07:00
Tim Abbott 4e876191c3 billing: Fix typo in Standard spelling. 2021-07-18 21:18:55 -07:00
Tim Abbott d7ef0c7232 billing: Fix options and help text for sponsorship requests.
This makes several changes:

* Fixes a bug where the help text explaining our policies was not displayed.
* No help text was defined for many organization types.
* Copy-edits the help text somewhat.
* Offers all of the organization type options.
* Removes the 100% coverage requirement because it's annoying to test
  the e.currentTarget click handler.
2021-07-18 20:48:27 -07:00
Alya Abbott 12d9ad957c billing: Clean up sponsorship form helper text.
- Change to match proposed hero text.
- Fix incorrect statement about event sponsorship; commercial
events should not be sponsored.
2021-07-18 12:15:33 -07:00
sahil839 ceb5333352 images: Rename loader.svg to loader-white.svg for clarity.
We rename loader.svg to loader-white.svg as this svg contains
white rectangles for clarity as we have also added loader-black.svg
which is same but with black rectangles instead of white.
2021-07-18 11:44:17 -07:00
sahil839 fb53556cef loading: Use img tag for loading indicator instead of object tag.
We use img tag for showing the loading spinner in message edit form
and dialog-widget submit button, instead of object tag because using
object tag gives the following error- "Refused to display
'https://chat.zulip.org/' in a frame because it set 'X-Frame-Options'
to 'deny'." in the browser console.

As mentioned by Anders in czo, this is probably because we’re loading
the SVG using an <object> tag as if it’s totally-not-an-IE3-ActiveX-
control.

We also need to add a new svg file similar to loader.svg with the
change that the retangles are filled with black color. This needs
to be done because we cannot get access to the svg document if we
use img tag and so we cannot change the color of rectangles using
jquery as we were doing before to show the spinner depending on
day/night mode. So, now we just set the src attribute of img tag
to the correct svg file depending on day/night mode.

Discussed in #issues > loading tail-spin.svg denied by X-Frame-Options.
2021-07-18 11:44:17 -07:00
sahil839 be8e7fdfb6 upload_widget: Use img tag for tail-spin.svg instead of object tag.
We use img tag for showing the loading spinner in image_upload_widget
instead of object tag because using object tag gives the following
error "Refused to display 'https://chat.zulip.org/' in a frame because
it set 'X-Frame-Options' to 'deny'." in console.

As mentioned by Anders in czo, this is probably because we’re loading
the SVG using an <object> tag as if it’s totally-not-an-IE3-ActiveX-
control.

Discussed in #issues > loading tail-spin.svg denied by X-Frame-Options.
2021-07-18 11:44:17 -07:00
m-e-l-u-h-a-n f377f8a963 stream settings: Move stream setting modals to stream_settings folder.
We do following changes in this commit to have a uniform file
structure for stream setting templates.

* Move change_stream_info_modal.hbs to stream_settings folder.
* Rename subscription_stream_privacy_modal.hbs to
  stream_privacy_setting_modal.hbs.
* Move stream_privacy_setting_modal.hbs to stream_settings folder.
2021-07-18 11:36:39 -07:00
m-e-l-u-h-a-n 36c8923797 stream settings: Move subscription_settings.hbs to stream_settings.
This commmit does following two changes to subscription_settings.hbs:

* Rename subscription_settings to stream_settings to have a uniform
naming pattern for stream settings.
* Move it to stream_settings folder.
2021-07-18 11:36:39 -07:00
m-e-l-u-h-a-n 662d485c15 stream settings: Move stream_settings_checkboxes.hbs to stream_settings. 2021-07-18 11:36:39 -07:00
m-e-l-u-h-a-n ee7188e625 stream settings: Move subscription_type.hbs to stream settings folder.
We do follwing changes in this migration:
* Rename subscription_type.hbs to stream_permission_description.
* Move it to stream_settings folder.
2021-07-18 11:36:39 -07:00
m-e-l-u-h-a-n cc983f2b5a stream settings: Move stream privacy icon template to stream_settings.
This commit does following two changes:
* Rename subscription_privacy template to stream_privacy_icon so
that its purpose is clear from its name.
* Move it stream_settings folder.
2021-07-18 11:36:39 -07:00
m-e-l-u-h-a-n c213ed575a stream settings: Move stream description templates to stream_settings. 2021-07-18 11:36:39 -07:00
m-e-l-u-h-a-n d82da45564 stream settings: Migrate stream member list template to separate folder. 2021-07-18 11:36:39 -07:00
m-e-l-u-h-a-n 661ce2dc25 stream settings: Rename subscription_members.hbs to stream_members.hbs.
This is preparatory commit for migrating stream settings related
templates into a separate folder and have a common naming scheme
for them.
2021-07-18 11:36:39 -07:00
m-e-l-u-h-a-n a63a23087f tooltips: Remove unnecessary checks for message action buttons in tippy.
We handled tooltips for failed message action buttons separately
through our default tippy-zulip-tooltip class because of
a diffrent html structure for these buttons. But as we refactored
html for those buttons to have same structure as for other buttons
in message action this extra check is no more needed.
2021-07-18 11:33:32 -07:00
m-e-l-u-h-a-n e7b1de8ace message view: Show failed message icon tooltips similar to other icons.
We had tooltips bound to failed message action icons, because of
slightly different html structure for these action buttons as
compared to other message action buttons. There were some minor
problems due to this. First there was difference of delay
in which we show other normal action button tooltips. Second
we had to add extra checks to handle tooltip content for these
buttons in tippyjs module.

This is fixed by having same html structure for failed message
buttons as for other message action buttons.
2021-07-18 11:33:32 -07:00
aryanshridhar 594c66edc5 move_topic: Improve the style for dropdown toggle button.
Earlier, the `stream_header_colorblock` wasn't properly styled
with the dropdown toggle button from a UI perspective. This was so
because they had a few space between them due to inconsistencies
in their border radius.

This commit adds an border-radius property to the move topic
dropdown toggle button to eliminate the above issue and
improve it's overall look.
2021-07-16 12:58:15 -07:00
aryanshridhar f4e44228a7 message_edit: Improve the style for dropdown toggle button.
Earlier, the `stream_header_colorblock` wasn't properly styled
with the dropdown toggle button from a UI perspective. This was so
because they had a few space between them due to inconsistencies
in their border radius.

This commit adds an border-radius property to the message_edit
dropdown toggle button to eliminate the above issue and
improve it's overall look.
2021-07-16 12:58:15 -07:00
aryanshridhar 1a2782f95d message_edit: Adjust the height of stream_header_colorblock.
Previously, the message edit `stream_header_colorblock` used
to incorrectly extend down till the textarea which caused
the UI to be buggy.

Fixed this by adding a `margin-bottom` property similar to
what we did in case of Move topic dropdown.

This minor change accidentally was missed within commit
7c25bd1aa8.
2021-07-16 12:58:15 -07:00
Tim Abbott 8f74261d48 drafts: Delete old drafts on page load, not modal launch.
This fixes a bad user experience where clicking to open the drafts
modal causes the number of drafts that you're looking at to suddenly
change.
2021-07-16 12:50:51 -07:00
aryanshridhar af4bd34873 stream_create: Remove unnecessary export keyword.
There's no need for the `create_handlers_for_users`
function to be exported as it's called within its
scope itself.
2021-07-16 08:53:56 -07:00
aryanshridhar d8e2fa5f9c stream_create: Avoid re-initialization of event handlers.
Previously, Everytime the user triggers the Stream create UI
by pressing the `Create stream` button, the
`create_handlers_for_users` function would reinitialize which
created duplicate event handlers for its elements.
This could lead to multiple click events being triggered over the
same element.

One such example was filed as #19255, where the click event was
triggering twice and hence the "Copy from stream" dropdown
would remain folded (closed).

Fixed this by - Initializing the `create_handlers_for_users` function
within the main `set_up_handlers` function, which is triggered only
once upon the opening of Stream create UI.

Fixes #19255.
2021-07-16 08:53:56 -07:00
Wesley Aptekar-Cassels 21fbc94e37 css: Remove some redundant styles.
These links (in addition to the recent topics one) were all already set
as block elements by a rule further up in this same file.
2021-07-15 15:08:50 -07:00
sahil839 711aca3fde settings: Show correct email in user-info form.
This commit fixes the bug of showing custom email to admin in
the user-info form even when email_address_visibility is set
to admins only.

This commit fixes it to show the correct email according to
email_address_visibility values.
2021-07-15 14:26:40 -07:00
Priyansh Garg 3136c08904 compose: Fix compose top-right buttons misalignment. 2021-07-15 14:12:29 -07:00
Eeshan Garg 6036524651 landing_page: Restructure top-level navigation.
This commit restructures the top-level navigation on our landing
page using dropdowns in a manner that allows us to advertise some
important pages to our visitors:

- Use cases for companies, open source projects, and communities.
- Miscellaneous pages about the product are now accessible from the
  "Product" dropdown.
- "Resources" are a few key resources our users may want to consult
  if they need help or support.
2021-07-15 10:56:47 -07:00
Eeshan Garg faa695e86d registration: Collect organization type on sign-up. 2021-07-15 09:58:27 -07:00
sahil839 2f44a08b37 settings: Convert settings_overlay.html to handlebars template.
Fixes #18796.
2021-07-15 08:59:23 -07:00
aryanshridhar 7c25bd1aa8 message_edit: Refactor message_edit to use dropdown_list_widget.
Implemented dropdown_list_widget in message_edit UI
which enables the functionality to search for streams
while moving a particular message across streams.

This matches the UI we have in the "move topic" widget.

Fixes #18416.
2021-07-15 08:27:55 -07:00
sahil839 6a3f22480d settings_emoji: Rename can_admin_emoji to can_delete_emoji. 2021-07-14 14:57:09 -07:00
sahil839 61acf68aa4 emoji: Allow emoji authors to delete the emoji always.
Previously, non-admin emoji authors were allowed to
delete the emoji only if add_emoji_by_admins_only
was false. But, as add_emoji_by_admins_only setting
is for who can add emoji and not delete emojis, it
should not affect the behavior of deleting emojis
and users should always be allowed to delete the
emojis which. they added themselves
2021-07-14 14:57:08 -07:00
Kerry Jackson 5d91a34119 search_icon: Fix contrast color of icon.
Fixes #19053.
2021-07-14 14:53:45 -07:00
sahil839 e736d9d275 settings: Add moderators and full members options in user-group setting.
This commit adds moderators and full members options for user group
settings in frontend.
2021-07-14 14:38:44 -07:00
sahil839 1148937c7b settings: Show tip always in user group settings page.
This commit changes the behavior to show the tip, explaining
which user roles are allowed to edit user groups, to user
with all roles because it is better to show the user which
other roles are allowed to edit. Previously the tip was shown
to non-admin users only.
2021-07-14 14:38:43 -07:00
Tim Abbott a5eb3abc52 css: Fix settings alignment for dialog widget modal. 2021-07-14 13:32:26 -07:00
Tim Abbott c5b455d5c2 dialog_widget: Simplify rendering logic.
This makes the templates a lot more readable.
2021-07-14 13:32:26 -07:00
Tim Abbott e0135e278d dialog_widget: Fix race focusing submit button.
Opening the modal before adding the on_shown handler makes it possible
that the modal could full appear before the handler runs.
2021-07-14 13:32:26 -07:00
Tim Abbott 6fb0d414b4 dialog_widget: Remove is_confirm_dialog variable.
Making the controls declarative makes the system more flexible for
future use cases.
2021-07-14 13:32:24 -07:00
sahil839 fd55df9f7c settings: Use dialog_widget for bot-edit form and remove edit_fields_modal.
This commit changes the bot-edit modal to use dialog_widget instead of
edit_fields_modal.

This commit also removes edit_fields_modal module as it is no longer used.
2021-07-14 13:02:26 -07:00
sahil839 0b21ca725e settings: Use dialog_widget for edit-user-info modal.
This commit changes the edit-user-info modal to use
dialog_widget instead of edit_fields_modal.
The edit_fields_modal module will be removed in
further commits to avoid code duplication.
2021-07-14 13:02:26 -07:00
sahil839 e0ab9e52b5 settings: Use dialog_widget for edit-linkifier modal.
This commit changes the edit-linkifier modal to use
dialog_widget instead of edit_fields_modal.
The edit_fields_modal module will be removed in
further commits to avoid code duplication.
2021-07-14 13:02:26 -07:00
sahil839 f6d8204d23 dialog_widget: Color of button should be according to use of modal.
We show red color for confirmation modals and green for other
modals with input fields.

As of this commit, only confirmation modals use dialog_widget but
some other modals with input fields will be migrated to use
dialog_widget.
2021-07-14 13:02:26 -07:00
sahil839 dff374a48b frontend: Remove html_submit_button paramter passed to dialog_widget.
We used html_submit_button to pass text to be present in the modal
submit button. There are only two possible options as of now -
"Confirm" and "Save changes" and the correct one can be determined
using is_confirm_modal parameter. So, we remove this paramter for
now and we can add it later if we have more type of modals using
this widget.
2021-07-14 13:02:25 -07:00
sahil839 ec3c5547ff frontend: Add dialog_widget module and refactor confirm_dialog.
This commit adds a new dialog_widget.js file containing most
of the code of confirm_dialog.js with some minor changes and
changes confirm_dialog to be a wrapper around dialog_widget.js.
We pass 'is_confim_dialog' as true in dialog_widget for a
confirm_dialog modal. This commit also renames confirm_dialog.hbs
and confirm_dialog_heading.hbs to dialog_widget.js,
dialog_widget.hbs and dialog_widget_heading.hbs respectively.
2021-07-14 12:58:00 -07:00
sahil839 71969f5196 confirm_dialog: Add post_render support in confirm_dialog.
This will be used by other modals when we will migrate
those to use the same code as that of confirm_dialog.
2021-07-14 12:21:24 -07:00
sahil839 c87c4f92ee confirm_dialog: Rename variables and classes used in templates.
This commit renames the variables, functions used in confirm_dialog.js
and classes and ids used in confirm_dialog.hbs.

This change is made so that we can easily migrate edit_fields_modal to
use this same code with some more changes.

We will change the file names and correspondingly import variables in
the next commit.
2021-07-14 12:21:24 -07:00
Gaurav Pandey 269f6fb577 compose: Fix overlaping expand-compose icon.
The expand-compose icon currently overlaps with the
recipient input field of private message compose box.
Reduce the size of the division to fix overlap.
2021-07-14 11:40:16 -07:00
Gaurav Pandey 5e97ec9ad9 narrow: Do not mark messages as read in mentioned narrow.
The current behaviour marks messages as read when in mentioned
narrow. This is not the ideal behaviour, hence do not mark them
as read.

Fixes #19098.
2021-07-14 11:39:46 -07:00
akshatdalton 66ba35d7fe search_operators: Add info about `is:resolved` keyword. 2021-07-13 23:48:45 -07:00
akshatdalton 272901326c narrow_banner: Add banner for no resolved topics found search. 2021-07-13 23:36:24 -07:00
akshatdalton fe9693c824 search_suggestion: Add suggestion support for `is:resolved` keyword. 2021-07-13 23:35:41 -07:00
akshatdalton 6a45379a30 resolve topic: Add frontend support for `is:resolved` search keyword/filtering.
This commit adds the frontend support for `is:resolved` search
keyword. Test cases are added for the same.

Fixes: #18990.
2021-07-13 23:18:41 -07:00
Aman Agrawal a748a2f03c subscription_settings: Improve look of create stream button.
Use the same styling used in send button of compose box.
2021-07-13 16:58:30 -07:00
aryanshridhar 1a3c719967 about_zulip: Indicate the copy icon to be clickable.
Added CSS property of cursor as pointer to the copy
icon in about_zulip section which indicates the
icon to be clickable.

(This minor adjustment was probably missed in a74b52db22)
2021-07-13 16:55:15 -07:00
m-e-l-u-h-a-n 7c0c75b6ca stream settings: Fix scroll issue in subscriber list in stream settings.
As we want subscriber list to occupy rest of available space
in the tab, we use relative units (vh) and calc to set the
max-height property dynamically without losing scroll behavior
for stream list.
2021-07-13 16:50:32 -07:00
Riken Shah 644cd18dfd refactor: Move "send button" related code from `compose_validate.js`.
This commit moves "send button" related code from
`compose_validate.js` to `compose.js` as it makes more
sense there.
2021-07-13 16:45:29 -07:00
Tim Abbott 41dbe8ee6b recipient bars: Make unresolve topic CSS match resolve topic.
This avoids showing a highlighted checkmark for resolve topics, which
looks weird given that the topic name itself contains a "resolve
topic" checkmark.
2021-07-13 09:13:14 -07:00
Riken Shah 801ebba7c7 compose: Avoid showing empty msg error when send by enter is enabled.
We are doing this to avoid annoying behavior, when
"enter sends" is enabled, and the user accidentally hits
"Enter" and has to deal with the error message.

Fixes #19182
2021-07-13 08:29:55 -07:00
Riken Shah 0dbc7e0d21 compose: Improve how we handle over character limit message error.
We improved it in the following ways:
* Show the error message with the maximum character
limit.

* Disable the send button.

* When the user tries to send the message via hotkeys
i.e, When "Press enter to send" is enabled or the user
uses "Shift" + "Enter" shortcut, Flash the red border
around the compose box.

Also renamed `check_and_set_overflow_text` to
`check_overflow_text` for better clarity.
2021-07-13 08:29:55 -07:00
Riken Shah 43e7c2c7fa css: Remove `important` rule from `over_limit` class.
The main reason for doing this is to allow flashing
`box_shadow` animation when the user tried to send
over character limit message.
2021-07-13 08:29:55 -07:00
Riken Shah 4cce23b564 compose: Hide sending indicator when the message failed validation.
This bug was found when the user tries to send a
over character limit message, i.e It has failed the
validation but it still shows the "Sending..." text.
2021-07-13 08:29:55 -07:00
Tim Abbott 0bf13ce5db portico: Add Technical University of Munich case study.
This isn't linked yet, since the main place we'll link to is isn't
added yet.
2021-07-09 13:04:38 -07:00
Priyank Patel 519e8471c9 ts: Convert upload_widget to TypeScript. 2021-07-09 12:42:31 -07:00
Priyank Patel 92912a3b1c ts: Convert compose_error module to TypeScript. 2021-07-09 12:42:31 -07:00
Priyank Patel 97a27eb239 ts: Convert watchdog module to TypeScript. 2021-07-09 12:42:31 -07:00
Priyank Patel fdedced521 ts: Convert password_quality module to TypeScript. 2021-07-09 12:42:31 -07:00
Priyank Patel 5a65a47b21 ts: Convert message_parser module to TypeScript. 2021-07-09 12:42:31 -07:00
Priyank Patel 261df2b4dc js: Rename muting_ui module to muted_topics_ui. 2021-07-09 10:00:45 -07:00
Priyank Patel 05c3164bb8 js: Split out muted_users_ui from muting_ui module. 2021-07-09 10:00:45 -07:00
aryanshridhar 4cd2fab7b0 user_popover: Replace custom email tooltip with tippy tooltip.
This commit essentially migrates our custom email tooltip
to tippy tooltip for displaying user's email when their
names would overflow past the right edge of user popover.

This also removes the `email_tooltip` and `tooltip_holder` HTML
classes aloong with their CSS styles as they no longer used.
2021-07-09 09:55:22 -07:00
m-e-l-u-h-a-n 781179c56a subs: Rename subs.js to stream_settings_ui.js.
We use subs as a common variable name for a collection of stream
data structure used in settings, in lot of modules. So this
rename clears a bunch of related shadowed variables.
2021-07-09 09:38:58 -07:00
m-e-l-u-h-a-n a41d5e58f9 stream settings: Improve UI for editing stream permissions.
This now is much more similar to our normal settings UI.
2021-07-08 17:53:58 -07:00
m-e-l-u-h-a-n 8987fed001 stream settings: Fix hover issue with message retention label.
Another minor issue fixed in this commit is behaviour of cursor
on hovering message retention setting label. We fix it by changing
this element this to be a div instead by label. It could be fixed
by adding a css rule for this instead of changing it to div rather
than label but this looked more stable to future refactors.
2021-07-08 17:53:58 -07:00
m-e-l-u-h-a-n 2daa4eb755 stream settings: Fix label issues with stream permission settings.
Labels for stream post/privacy value settings were not properly
linked with their input element so clicking on labels did not
toggle radio buttons. We fix this by having inputs elements inside
label elements to have correct linking.
2021-07-08 17:53:58 -07:00
m-e-l-u-h-a-n 5de4b2dfbd stream settings: Improve stream name in stream permissions description.
We remove icons (hash | lock | globe) in permission description of
an stream, as it is pretty obvious as we use them at quite a number
of places with stream names, also it does not fits well with rest of
the text in that area.
2021-07-08 17:53:58 -07:00
m-e-l-u-h-a-n 66cf0ae9ff stream settings: Improve stream permissions description in settings.
Previously stream permissions were hard to find and understand
as they were displayed like a paragraph in description format.

We improve them by using a list item for each different permission.
2021-07-08 17:53:58 -07:00
m-e-l-u-h-a-n 64339e6b60 minor: Improve heading for different stream setting subsections. 2021-07-08 17:53:58 -07:00
m-e-l-u-h-a-n 889229ba16 stream settings: Improve message for no description streams. 2021-07-08 17:53:57 -07:00
m-e-l-u-h-a-n 85230e1953 stream settings: Use full space in subscribers tab for listing them.
We increase the height of the widget used for listing subscribers
in stream settings to 100% so that it occupies the remaining
space in the tab.
2021-07-08 17:47:14 -07:00
m-e-l-u-h-a-n 060ae0226c stream settings: Move stream email to General settings tab. 2021-07-08 17:47:14 -07:00
m-e-l-u-h-a-n 8a2cc75e0e stream settings: Clean unnecessary elements in stream settings. 2021-07-08 17:47:14 -07:00
m-e-l-u-h-a-n e8030fadc6 stream settings: Improve title for stream settings based on content.
We had a common title `stream settings` for two cases
when no stream was selected and also when settings for
a particular stream were shown.

To improve this situation we now show `Settings for {stream_name}`
when settings for a particular stream are shown.
2021-07-08 17:47:13 -07:00
m-e-l-u-h-a-n cb4797e3b7 stream settings: Re-design stream settings page using tab-switchers.
We move away from a single scrollable page to have a tabs settings
structure instead.
This commit consists of the minimal changes required to set up toggler
component. And the subsequent commits would include all the UI UX
changes required for updating the layouts.

Co-authored-by: Ryan Rehman <ryanrehman99@gmail.com>
2021-07-08 17:47:13 -07:00
akshatdalton 8c9b2012ca topic_edit_form: Restyle topic edit save button with logo colours.
Similar to what mentioned in 2e196fd5d3
previous sea-green colour didn't meet the WCAG AA standard
guidelines for color contrast. This changes meets WCAG AAA
standard.
2021-07-08 17:45:42 -07:00
akshatdalton 834e8c0b63 tooltip: Improve tooltip visibility for message control buttons.
This change ensures that the tooltip doesn't hide by the
selected message blue border.
2021-07-08 17:41:22 -07:00
akshatdalton 13671b87f5 recipient_row: Shift topic edit form code to the above of external link.
When editing a topic name (and the topic name has some link
in it) through the recipient bar, the external link icon
overlaps with the stream name. Shifting the code now
ensures that the external link icon would appear to the
right of the topic edit form box.

Also see: https://chat.zulip.org/#narrow/stream/9-issues/topic/topic.20edit.20recipient.20bar
2021-07-08 12:39:01 -07:00
aryanshridhar 9049fb3bd4 users: Remove redundant compute_show_invites function.
This commits removes the redundant `compute_show_invites` function
which computes the `show_invites` page parameter in `lib/users.py`.

It is so because, commit 13399833b0 removed
the `show_invites` context variable passed in index.html.
Hence, the `show_invites` page_param key is no
longer required to compute in backend as it can be switched with
`settings_data.user_can_invite_others_to_realm()` in the frontend.

This commits also removes the `test_compute*` tests in
`test_home` that concerned with the `show_invites` page parameter
as they are no longer required.
2021-07-08 12:37:47 -07:00
Aman Agrawal 8b692943e7 css: Directly use `only-visible-for-spectaros` class to hide elements. 2021-07-08 12:33:56 -07:00
Aman Agrawal 4c0c067136 actions_popover: Hide irrelevant options for spectator. 2021-07-08 12:33:56 -07:00
Aman Agrawal 2e196fd5d3 compose: Restyle compose send button with logo colours.
Previous sea-green colour didn't meet the WCAG AA standard
guidelines for color contrast. This changes meets WCAG AAA
standard.
2021-07-08 12:06:55 -07:00
Ganesh Pawar 4df2fd2b61 hotkey: Disable hotkeys when a modal is open. 2021-07-08 12:04:19 -07:00
Anders Kaseorg dc1342825b Revert "compose: Convert pasted url to named link."
This reverts commit 5a61c9bb14 (#18849),
which had a number of bugs:

• It had a poor interaction with Ctrl+Shift+L resulting in double link
  formatting.
• It didn’t work at all in Firefox.
• It didn’t check whether what you’re pasting into is even a compose
  box.
• On pasting into the message edit box, it would throw “Error: Cannot
  read property 'text' of undefined”.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-07-08 12:00:22 -07:00
Priyam Seth ca54997767 compose: Fix the color or expand/collapse compose box in night mode.
Follow-up: #17667
2021-07-08 11:33:37 -07:00
sahil839 91d2960252 confirm_dialog: Disable the cancel button also while loading.
We disable the cancel button of dialog while loading because
the action cannot be cancelled even afer clicking cancel.
2021-07-08 09:43:32 -07:00
sahil839 6b995050b0 confirm_dialog: Fix loading spinner in confirm button in night mode.
We change the color of loading indicator to black only if we are not
using night mode, and in night mode indicator remains white.
2021-07-08 09:43:32 -07:00
sahil839 cd333cf157 message_edit: Fix loading spinner in message-edit button in night mode.
We change the color of loading indicator to black only if we are not
using night mode, and in night mode indicator remains white.
2021-07-08 09:43:32 -07:00
sahil839 a3f7639af3 settings: Extract code for checking night-mode setting.
We extract the code for checking night mode setting on
the basis of color_scheme value and using matchMedia when
color_scheme is set to automatic. This is currently used
in rendering the correct logo only.

This is a prep commit for fixing loading indicator not
visible on message-edit button in night-mode.
2021-07-08 09:43:32 -07:00
Steve Howell 8ffe22fc15 slash commands: Remove /settings command.
It's easy enough for power keyboard users to just use "g"
to get to settings, and it's certainly easier for
mouse users to just go to the menu.
2021-07-08 10:47:52 -04:00
Dinesh 5f684bf119 markdown: Change timezone to time zone in <time> tooltip.
This makes it consistent with the second line.
2021-07-08 10:10:11 -04:00
Tim Abbott c61a42615c Revert "stream_sidebar_row: Use tooltips for showing stream name on hover."
This reverts commit be240c2820.

This commit didn't get a positive reception on chat.zulip.org.
2021-07-07 21:20:15 -07:00
Tim Abbott 718caf453e move_topic_model: Fix the line-height of dropdown-toggle button.
Our dropdown-toggle buttons are meant to have the same size as select
elements, but looked weird if you selected a stream with non-English
characters in its name.

We fix this by copying some styling details settings from our common
input/select styling.

Fixes #18479.
2021-07-07 17:46:24 -07:00
Tim Abbott 98b5f01d14 third: Prevent typeahead from going off top of screen.
This is by no means the ideal solution, since we are likely to occlude
your cursor, but it prevents the user experience from being clearly
broken.
2021-07-07 16:47:30 -07:00
Signior-X 6cf33c4275 compose: Add support for full size compose box.
This commit makes a working toggler in compose_actions that adds the
compose-fullscreen class to the compose that removes the max-height
from the compose textarea and adds flex elements above so that the
height automatically adjust with the device height. This results in
making the compose box full screen sized.

The compose_height.js maintains the state of the height of the compose
box. Also, when the compose box is closed, the compose box is reset to
it's default behaviour and original height. So, everytime user need
not toggle off the compose full size and only for specific message
it is used.

It also adds destroy autosize on compose_height state change.
It destroys the autosize of textarea when the full
screen sized compose box is toggled on. And everytime when it is
turned off, it reinitialises the autosize. This also adds a
condition in autosize_textarea to only autosize when composebox
is not in full height state.

Fixes #17660
2021-07-07 16:47:30 -07:00
Tim Abbott 739ee1d15f templates: Improve labels for the edit stream name modal. 2021-07-07 16:13:50 -07:00
Anders Kaseorg 83120f218b compose: Don’t convert absolute upload URLs to relative.
Especially not by trying to edit markdown with a context-ignorant
unescaped regexp.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-07-07 15:41:52 -07:00
Anders Kaseorg e0f4013b21 upload: Don’t convert relative upload URLs to absolute.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-07-07 15:41:52 -07:00
m-e-l-u-h-a-n 6eaf111bde message-editing: Add autocomplete suggestions for topic editing.
We extends composebox_typeahead to support autocompletion
suggestions on editing the topic of a message from message
edit form as well as from recipient bar.

Tweaked by tabbott to have correct keyboard interaction without
needing to patch Bootstrap.

Fixes: #16368.
2021-07-07 15:18:39 -07:00
akshatdalton 11c37bca8f composebox_typeahead: Open typeahead immediately when @ is entered.
This change ensures that we pop up the typeahead when one
has entered just `@`. This will make clear to the user
about the @-mentions feature in Zulip.
This also makes us consistent with expectations from other
chatting apps like Slack, Discord, etc.

Added few test cases and modified the present ones.

Fixes: #19142.
2021-07-07 14:29:22 -07:00
Tim Abbott 572dbafd06 lint: Fix useless units on 0. 2021-07-07 12:54:21 -07:00
Priyam Seth 62d9f28211 compose_area: Fix compose_area pasted message bigger than max_length.
Fix a bug where the compose box cut the message without warning the user
the message pasted was longer than the allowed. It was fixed by stopping
cutting the message off and showing an indicator whenever the limit exceeds
and removing the indicator as soon as message gets less than that.

The cut off for showing the indicator is set as 90% of the limit.

Fixes #15909
Co-authored-by: João Maurício <carvalho.joaomauricio@gmail.com>
2021-07-07 12:18:18 -07:00
Priyam Seth e976512b3c compose: Fix compose box getting close on copying code.
This commit adds an exception in click-handlers.js so that
when mouse clicks on .copy-codeblock, the composebox is not
closed.

Fixes #19130.
2021-07-07 10:47:23 -07:00
Tim Abbott 739fcfb5aa topic links: Add tooltip explaining link.
We show the text, which is either the linkifier label or the URL
(depending what generated the topic link).

For the desktop app at least, we probably as a follow-up want to also
show the URL.

(Though maybe it'd be better to just make the desktop app display the
URL).
2021-07-07 10:33:39 -07:00
Aman Agrawal 578f93b2f3 tippy: Set default placement of tooltips to top.
Generally, tooltips placed at top look good. If the tooltip cannot
fit at top, it will by default be placed at opposite side.

Removed the unnecessary top placement definitions.
2021-07-07 10:23:31 -07:00
Aman Agrawal be240c2820 stream_sidebar_row: Use tooltips for showing stream name on hover.
We add some additional delay so that user doesn't have to see
them every time but it is the delay is short enough so that
a user can view the full name of long streams without waiting
too long.
2021-07-07 10:09:33 -07:00
Anders Kaseorg 98194b9316 blueslip: Remove SAVE_FRONTEND_STACKTRACES setting.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-07-07 09:26:02 -07:00
Signior-X 5a61c9bb14 compose: Convert pasted url to named link.
This commit changes the pastehandler to have a case when
a url is tried to paste on composebox. It instead of
directly pasting it, changes the content as we do using
ctrl + shift + L, just the difference is here it uses,
the copied text instead of url and cursor moves forward.

Fixes #18692
2021-07-06 17:56:02 -07:00
Signior-X 3bdc7432b9 refactor: Move wrap_text_with_markdown into compose_ui.js.
This commit makes it possible to use wrap_text_with_markdown_outside
compose.js.

Part of #18692
2021-07-06 17:55:58 -07:00
Tim Abbott 2cb1be096e ui_init: Fix order of realm_logo rendering.
This needs to run after the navbar has been initialized.  Bug caught
by our puppeteer tests.
2021-07-06 17:51:00 -07:00
aryanshridhar c6828767fa navbar: Migrate to handlebars.
This commit migrates the `navbar.html` Django template
to handlebars by creating a new file as `navbar.hbs`
within `/static/templates` which is then rendered
using `ui_init` module.

As a part of migration, we also remove the `search_pills_enabled`
and `embedded` parameters from the context attribute as they
are no longer needed now.

Fixes part of #18792.
2021-07-06 16:46:50 -07:00
Priyansh Garg 3294e8dbe0 compose-box: Insert quoted content at the cursor position.
Right now, on clicking `quote and reply` on any message, the quoted
message is always inserted at the top of compose-box irrespective of
the current cursor position. Also, after insertion of the quoted
message, the cursor is shifted at the end of the compose box.

This commit changes this behaviour to insertion of quoted message
at the current cursor position with a newline at the end of quote
and moving the cursor position to that newline after insertion.
A newline is added at the beginning of quoted message only if there
was some content already present in compose box before the previous
cursor position.

Tested on Google Chrome and Firefox browsers on Ubuntu dev environment.

Fixes: #16836
2021-07-06 16:38:17 -07:00
akshatdalton ea4587071a tooltip: Improve tooltip placement for search users icon in right sidebar.
Similar to the previous commit, the tooltip was not
completely visible in this case and this bug was
similar to the one corrected in recipient bar icons.
2021-07-06 15:26:53 -07:00
akshatdalton d693b77f49 tooltip: Improve tooltip placement for User sidebar title.
Here, the tooltip was partially visible. This bug was similar
to the one that is corrected for recipient bar icons.

I have removed the class attribute `tippy-zulip-tooltip`
for Filter stream title as this will be handled by the
new changes.
2021-07-06 15:26:53 -07:00
sahil839 8fe401c38c confirm_dialog: Rename confirm_dialog_yes_button class.
This commit renames confirm_dialog_yes_button class to
confirm_dialog_submit_button. This will help in keeping
a general class name when deduplicating the code for
confirm_dialog and edit_fields_modal.
2021-07-06 15:15:50 -07:00
sahil839 055d7113f2 confirm_dialog: Rename html_yes_button to html_submit_button.
This commit renames the html_yes_button parameter of confirm
dialog widget to html_submit_button and also all the related
variables in confirm_dialog.js.
This will help in keeping a general name when deduplicating
the code for confirm_dialog and edit_fields_modal.
2021-07-06 15:15:50 -07:00
sahil839 eaf69bbf16 edit_fields_modal: Show error message in the body not heading.
Placing error message at the top of the body looks better than
placing it below the heading.
2021-07-06 15:15:50 -07:00
sahil839 0ebcb17397 confirm_dialog: Change the style and position of error message element.
This commit changes the error message element of confirm_dialog to be
above the text of dialog and to be a nice box using already defined
"alert" class.
2021-07-06 15:15:50 -07:00
sahil839 19362f393e edit_fields_modal: Rename modal_body_html and modal_label.
This commit renames modal_body_html and modal_label to
html_body and html_heading respectively. This change
will help us easily deduplicating the confirm_dialog
and edit_fields_modal code.
2021-07-06 15:15:50 -07:00
sahil839 0edb413121 css: Remove unused css.
This was missed in 98bb0f7b2.
2021-07-06 15:15:50 -07:00
Priyam Seth ba44f4161a compose: Make a function to hide compose error.
This commit creates compose_error.hide() function that
can be used to hide compose_error alerts.
2021-07-06 15:15:26 -07:00
Tim Abbott fc0035f050 portico: Stop using 0.5 opacity for documentation titles.
opacity 0.5 is pretty hard to read.
2021-07-06 10:37:44 -07:00
Eeshan Garg 5a94bfcb88 docs: Add proper backlink to the homepage from /help and /api.
Currently, the "Home" link at the top takes one to the doc root,
i.e., /help or /api. This is a little misleading since "Home"
seems to be more synonymous with the Zulip homepage.

This commit adds a proper backlink to the top logo that takes you to
the homepage and renames "Home" to be more specific. The text after
"|" will now take you to the doc root instead (/help or /api). Note
that this allows us to link the /help and /api pages from the
homepage while ensuring that backlinks allow the visitor to get back
to the homepage.
2021-07-06 10:35:41 -07:00
Aman Agrawal 17eed06eb1 message_view_header: Don't include stream name is tooltip.
This fixes the bug where stream name overflows out of the tooltip
background.
2021-07-06 08:41:44 -07:00
Wesley Aptekar-Cassels 187737ce5a message_body: Rename "Condense" to "Show less".
See discussion on CZO:
https://chat.zulip.org/#narrow/stream/137-feedback/topic/.22Condense.22.20vs.20.22Collapse.22
2021-07-05 20:15:14 -07:00
Priyam Seth 57340a888c compose: Extract "compose_validate.js".
This commit first moves the compose.validate() function out
with the functions that are needed by it. Then one by one
checked for which function is now not needed in compose.js.

This moves all validation related functions out of "compose.js"
to "compose_validate.js".

Splitting compose announce variables out of compose.js.

This commit moves the "user_acknowledged_all_everyone" and
"user_acknowledged_announce" out of compose.js to reduce
cyclic dependency of compose_validate on compose.js.

Moving wildcard mentions to compose_validate.

The wildcard mention settings are mostly used while validating.
Also to reduce the cyclic dependence of compose in
compose_validate, the related wildcard mentions are moved out to
compose_vaidate.js.

This also converts reset_acknowledged functions to set values
by passing values.
2021-07-05 19:21:56 -07:00
aryanshridhar 13399833b0 right_sidebar: Migrate to handlebars.
This commit migrates the `right_sidebar.html` Django template
to handlebars by creating a new file as `right_sidebar.hbs`
which is then rendered using `ui_init` module.

It also removes the tests in `test_home` due to the template
migration, since these elements aren't rendered on the backend
anymore.

We also remove `test_compute_show_invites_and_add_streams*`.

Fixes part of #18792.
2021-07-05 18:58:24 -07:00
aryanshridhar 8fb7ff7637 left_sidebar: Migrate to handlebars.
This commit migrates the `left_sidebar.html` Django template
to handlebars by creating a new file as `left_sidebar.hbs`
which is then rendered using `ui_init` module.

These are the minor changes introduced by virtue of template
migration -
 - The `compute_show_invites_and_add_streams` function now
   only concerns with the invite_to_realm_policy.
 - Renamed the `compute_show_invites_and_add_streams` function
   to `compute_show_invites` due to the above change.
 - Fixes relevant `test_home.py` tests due to the above
   changes.

Fixes part of #18792.
2021-07-05 18:49:43 -07:00
Tim Abbott 65acbfa4c4 navbar: Remove buggy nth-last-child logic.
We've been unhappy with this fragile nth-last-child logic since the
big navbar rewrite a few years ago.

Now that we have TippyJS tooltips in the navbar area, it actually
causes a bug: Hovering the "subscribe count" widget makes the search
icon jump.

Fix this by just adding a CSS class to the two elements that are
intended to be modified by this logic.
2021-07-05 18:20:25 -07:00
Dinesh a7ec1dce0f markdown: Rewrite tooltips for <time> elements.
This now uses TippyJS, which enables a more friendly format.
2021-07-05 18:09:47 -07:00
Dinesh 6ce2662df5 timerender: Extract timezone offset string generation to a function. 2021-07-05 18:08:18 -07:00
Gaurav Pandey 18c546e4b5 left-sidebar: Add support for showing resolve-topic-prefix.
We currently have the resolved topics prefix shown as part of
the topic name in the left sidebar. However this causes inconsistency
while showing topic names. Hence this adds support for showing the
prefix in the cutter to the left of the topic name.

Fixes #18989.
2021-07-05 18:02:40 -07:00
sahil839 d620ad0969 message_edit: Scroll back to original position after closing edit form.
This commit changes the code to scroll to the top after closing the
message edit form to make sure the cursor it at same position and
the scroll does not distract the user when the request of message
edit is processing. Though the scrolling is not visible distinctly
in much case and is visible only when there is some delay, but it
is fine to change this code as the logic is correct and to be on
safer side.
2021-07-05 17:24:28 -07:00
sahil839 8e7ad58557 message_edit: Show loading indicator inside the button.
We now show loading indicator inside the 'save' button
instead of hiding the buttons to show the loading
indicator. Both the save and clear buttons are disabled
when the request is processing. We do not change color
of the buttons just change the cursor to indicate that
button are disabled and nothing happens on clicking them.

The reason for disabling the cancel button is that it
is actually not possible to cancel the action once
loading has started, so it is actually better to disable
it only such that users are not confused.

This commit adds a wrapper div element around the button
because we wanted to add two css properties to the button-
 'pointer-events: none' such that nothing happens on click
and 'cursor: not-allowed' to indicate that buttons are
disabled. But these boht styles cannot be added to same
element because 'pointer-events: none' overrides the
'cursor: not-allowed' style and normal cursor is visible.
That's why we add a wrapper to add 'cursor: not-allowed'
style to it and add 'pointer-events: none' to the button.
2021-07-05 17:24:28 -07:00
Priyank Patel 3f0110d9c0 ts: Convert ui_util module to TypeScript. 2021-07-05 17:04:06 -07:00
Priyank Patel 31893d9e10 ts: Convert components module to TypeScript. 2021-07-05 17:04:06 -07:00
Priyank Patel 4fa4309338 ts: Convert loading module to TypeScript. 2021-07-05 17:04:06 -07:00
Priyank Patel a8cdc968cc ts: Convert csrf module to TypeScript. 2021-07-05 17:04:06 -07:00
Priyank Patel 35738e148b ts: Convert padded_widget module to TypeScript. 2021-07-05 17:04:06 -07:00
Priyank Patel 0aff593ed9 blueslip: Correctly type more_info parameter as optional.
This was incorrectly typed as a required argument before.
2021-07-05 17:04:06 -07:00
akshatdalton f80419509e message_view: Add resolve topic button in message recipient bar.
Now, one can (un)resolve the topic from 2 places:

1. Stream popovers.
2. Message recipient bars.

Fixes: #18988.
2021-07-05 16:53:55 -07:00
akshatdalton 505502a993 tooltips: Use TippyJS instead of HTML title in recipient bars.
Additional changes are added in `tippyjs.js` to ensure
that the tooltip doesn't hide behind the message
box or it is not limited by the parent container, in
case of recipient bar icons.
2021-07-05 16:53:55 -07:00
m-e-l-u-h-a-n c0afe9d8f4 templates: Wrap subscription settings into 3 respective sections.
We wrap the general stream name, description and type properties in
a "general_settings" div.

The "regular_subscription_settings" div was already present, so the
only change made was renaming this to "personal_settings".

We also wrap the email and adding of members settings in a new
"subscriber_settings" div.

This is a prep commit which will be helpful when we want to display
only one section and hide the other two.

Co-authored-by: Ryan Rehman <ryanrehman99@gmail.com>
2021-07-05 14:36:45 -07:00
m-e-l-u-h-a-n 9cb8e1b286 streams: Eliminate content-editable to change stream info.
The current system to change stream information like Stream name and
description isn't consistent with what we use everywhere else. It's
also slightly difficult to maintain.

Co-authored-by: Pragati Agrawal <pragati22066@gmail.com>
2021-07-05 14:35:15 -07:00
Pankaj Patil 88b25d0c21 stream settings: Change icon and tooltip for Archive stream.
Fixes #19049.
2021-07-05 14:34:29 -07:00
sahil839 4875f6d3bb settings: Add status-and-availability help link with presence setting. 2021-07-05 14:27:56 -07:00
sahil839 7eb183fdf7 settings: Move presence-enabled setting to 'Account & privacy'.
The presence setting is more suited in 'Account & privacy'
section as it is not related to notifications in anyway
and resembles privacy of user by allowing user to hide
his status of being online.
2021-07-05 14:27:56 -07:00
Anders Kaseorg 99533b4aa2 js: Fix, and check for, non-ES5 syntax in webpack bundles.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-07-05 13:32:37 -07:00
Priyam Seth 985e95041d compose: Add trigger for new private message.
This commit adds a new trigger for compose.start that is
"new private message". It will clear the message recipients
whenever compose.start is called with this trigger.

This solves the bug, when a person is in a PM narrow and
clicks the new private message button, it opens the
composebox with the recipients filled out with whoever
you're narrowed to, rather than opening a new, blank PM.

CZO link for the issue
https://chat.zulip.org/#narrow/stream/9-issues/topic/.22New.20private.20message.22.20isn't/near/1222712
2021-07-05 11:56:46 -07:00
Tim Abbott 53e2193b10 narrow: Remove unused import of stream_topic_history. 2021-07-05 10:29:49 -07:00
Tim Abbott a5a958d18a narrow: Narrow to new/empty topics with Ctrl + . shortcut.
This shortcut now renarrows to an empty topic, rather than to the
stream, as long as the topic input is nonempty.

This was debated in the original implementation of this feature:
https://github.com/zulip/zulip/pull/9511#discussion_r190323319

Having seen the experience in practice, the current behavior is
surprising and we should migrate to the other option originally
considered. In particular, the argument that "narrowing to the stream
would still tell you the topic is empty" turns out to be inaccurate,
since the history within the stream may not be in the most recent
messages in the stream.

Fixes #19122.
2021-07-05 09:52:19 -07:00
Wesley Aptekar-Cassels 963b884d74 message_view_header: Make subscription count tooltip open downwards.
This causes it to not cover up the stream description. See CZO thread:
https://chat.zulip.org/#narrow/stream/137-feedback/topic/users.20subscribed.20tooltip.20direction
2021-07-05 08:17:52 -04:00
Dinesh ef5abb3f33 recent_topics_timestamp: Fix tooltip.
d779a1c tweaked `get_full_datetime` to return a string instead
of a {date, time} object. This function is used for recent topics
too but wasn't fixed to use the string.

This resulted in showing 'undefined undefined' in tooltip.
2021-07-03 06:59:55 -04:00
m-e-l-u-h-a-n 63fcc740a8 minor: Make group tab selector in profile modal more specific.
This is just to have a common pattern in stream and group tab.
2021-07-02 13:53:46 -07:00
m-e-l-u-h-a-n a428e546b8 minor: Make stream tab selector in profile modal more specific.
It is changed to avoid having an id that is too generic
and could invite unwanted bugs.
2021-07-02 13:53:46 -07:00
m-e-l-u-h-a-n 5dfd11673a CSS: Fix alignment of private and web-public streams in profile modal. 2021-07-02 13:53:46 -07:00
Priyank Patel cfc2d7c842 util: Remove unused code for lower_bound.
We currently do not need support for passing first and last index to
the lower_bound function, so we just remove it.
2021-07-02 11:37:01 -07:00
Gaurav Pandey 782fca79c4 copy_link: Add onSuccess listener to copy clipboard.
Previously, we showed a `Copied!` alert on copying link to a message
irrespective of the fact that the link was copied or not.
Hence add an event listener that shows the `Copied!` tooltip only
if the action was successful.

Fixes #19019.
2021-07-02 11:33:37 -07:00
Gaurav Pandey b1474ddaa6 copy_message: Add onSuccess listener to copy clipboard.
Previously, we showed a `Copied!` alert on copying a message
irrespective of the fact that the message was copied or not.
Hence add an event listener that shows the `Copied!` tooltip only
if the action was successful.

Fixes #19019.
2021-07-02 11:33:37 -07:00
sahil839 4f6658e98d hashchange: Call highlight_toggle after activate_section_or_default.
If highlight_toggle is called before activate_section_or_default,
then 3 hash change event take place for single hash change.
For example if hash is changed from "#settings/profile" in the
browser to "#organization/organization-permissions", then the
cycle is-
"#settings/profile" -> "#organization/organization-profile" ->
"#organization/organization-permissions".

This is because "highlight_toggle" also leads to call of
"activate_section_or_default" with section as default section
(i.e. organization-profile) then the correct section is opened
again as activate_section_or_default is called in hashchange.js
after highlight_toggle.

The middle hash of the above example depends on the last open
section in organization area or is the default section which is
"organization-profile" when overlay is opened first time after
reload.

This is also consistent with the code for opening overlay from
gear menu where "highlight_toggle" is called later.
2021-07-01 17:49:04 -07:00
sahil839 b5dfc02844 hashchange: Fix bug when directly chaning hash in settings overlay.
Reproducer:
* Open the settings overlay from gear menu, the profile (user profile
not organization profile) is opened.
* Note the current hash in browser is "#settings/profile".
* Now directly change the hash to be "#organization/organization-permissions".

You will notice that the content is fine, but there is problem in left
sidebar and the hash. The left sidebar content is still of user
settings and not organization settings and the hash in the browser is
"#settings/organization-permissions".

Now the bug was due to normal_settings.activate_section_or_default
call instead of org_settings.activate_section_or_default.
Calling from normal_settings leads to hash_prefix being "#settings"
which changes the hash in the browser and also toggles the left
sidebar to display settings part instead of organization. The right
section content is of organization-permissions only because it
depends only on section and not prefix.

So, this commit adds a if-else condition deciding what to call based
on the hash.
2021-07-01 17:48:36 -07:00
Riken Shah ce2821bc28 settings_checkbox: Fix incorrect line wrapping in mobile view.
The issue was text label has `display: inline-block`
property which caused it to go to a new line in smaller
width screens.

This commit fixes it by changing its display property to `inline`.

Fixes #19075.
2021-07-01 17:46:26 -07:00
m-e-l-u-h-a-n ee5aefee32 popovers: Add clear input button to stream search widget.
We show it only when it contains some text in it.

Fixes: #18878.
2021-07-01 14:30:31 -07:00
m-e-l-u-h-a-n 0d3f229283 popovers: Add filter widget for stream list in profile modal. 2021-07-01 14:30:30 -07:00
m-e-l-u-h-a-n 995048c4bc popovers: Add header to stream list in profile popover. 2021-07-01 14:30:06 -07:00
aryanshridhar f41692d032 table-sticky-headers: Add z-index CSS property to table headers.
Previously, there were cases where the table contents started to
overlap with the table heading when scrolled down the table.
This was mostly visible in `Custom Emoji` organization UI,
where the images and action table column contents started to
overlap with the table headers.

Rectified the bug by adding a CSS `z-index` property to
`table-sticky-headers` class which takes care of all
such overlapping issues.

Fixes #18906.
2021-07-01 12:19:53 -07:00
sahil839 8290a6fd8f settings: Fix header in settings overlay.
Previously the header of settings overlay
was 'SETTINGS / {name_of_section}'.

This commit changes it to be one of the two
mentioned below according to the opened
section-
1. 'PERSONAL SETTINGS / {name_of_section}'
2. 'ORGANIZATION SETTINGS / {name_of_section}'

Note - Have kept the header as original in
case of mobile as the above text will be
too long.
2021-07-01 11:47:14 -07:00
sahil839 cdaf9bf87a settings: Change "Settings" to "Personal" in the toggle tab. 2021-07-01 11:47:14 -07:00
sahil839 37620ffef0 gear_menu: Rename "Settings" option to "Personal settings".
Also includes change in markdown used in docs.
2021-07-01 11:47:14 -07:00
Dinesh 239228b317 tippyjs.js: Remove unnecessary `allowHTML: true`.
I accidentally added this while rebasing #18856.

This does no harm but it's best remove code that
isn't helpful in any way.
2021-07-01 11:46:25 -07:00
Dinesh d779a1cf2f timestamp_tooltip: Reformat tooltip content.
Reformats to a format like: 5/19/17, 2:42:53 AM IST (UTC+5.5).
2021-07-01 11:46:25 -07:00
sahil839 ac459b3042 muting_ui: Fix bug with same name of function parameter and a file.
The parameter passed to 'handle_topic_updates' is 'muted_topics'
and there is also a javascript file with same name.
So 'muted_topics.get_muted_topics' gives error, and this commit
fixes this by changing the parametr name to 'muted_topics_list'.

This was introduced in  5f74e78bee.
2021-07-01 08:44:27 -04:00
Tim Abbott 53df9a3958 settings: Move role to profile page.
This feels a bit more consistent with the fact that this field gets
displayed on the user's profile page.
2021-06-30 16:58:37 -07:00
sahil839 687a4ffbb1 settings: Show the date when a user joined the realm in profile panel.
This will also help us to cover up some space when there are no custom
profile fields.
2021-06-30 16:58:22 -07:00
sahil839 b94d6c1a20 settings: Move timezone setting from display settings to profile.
The user timezone is only used for user's profile, so we can
move this setting to the Profile panel of settings and this
will also help us in covering some space when there are no
custom profile fields for the organization.
2021-06-30 16:56:03 -07:00
sahil839 bb816e1998 settings: Separate "Your account" section in two different sections.
We separate "Your account" section to two different sections -
"Profile" section for user name, custom profile fields, and avatar
and "Account & Security" section for email, password, role, api-key
and deactivating button.

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

Fixes #18848.
2021-06-30 16:56:03 -07:00
Priyank Patel 5f74e78bee js: Rename muting module to muted_topics. 2021-06-30 16:32:55 -07:00
Priyank Patel 968a8c4e50 js: Split out muted_users module from muting. 2021-06-30 16:32:55 -07:00
Priyank Patel 4dac12144d refactor: Rename variables that conflict with muting modules rename. 2021-06-30 16:32:55 -07:00
Priyank Patel 88b83de5bd muting: Refactor get_time_from_date_muted to util module.
This function will be later needed again when we split the
muted_users module from muting.
2021-06-30 16:32:55 -07:00
m-e-l-u-h-a-n 524f0cc3d3 profile: Add tooltip to hint unsubscription flow for private stream. 2021-06-30 15:17:27 -07:00
m-e-l-u-h-a-n 68700e9599 minor: Keep logic for formatting stream list item at one place. 2021-06-30 15:17:27 -07:00
m-e-l-u-h-a-n c6f8b9d807 profile: Add unsubscribe button in user profile modal.
We add unsubscribe button in the stream list that allows
users and admins to unsubscribe them using profile modal.

If a user attempts to unsubscribe from a private stream
we redirect them to do so from stream setting overlay
to avoid a really confusing user experience as we ask
for confirmation before unsubscribing such streams.
2021-06-30 15:17:26 -07:00
m-e-l-u-h-a-n 2ac5ba0bf8 stream settings: Rename stream_subscription_info for readability.
We rename `stream_subscription_info.hbs` and its related
variables and functions to `stream_subscription_request_info.hbs`.
So that its clear that it is used for displaying info about
requests sent for stream subscriptions.

This is a follow-up for #18957.
2021-06-30 14:54:28 -07:00
sahil839 efa19597bb settings: Show tooltip if avatar changes are disabled.
We show a tooltip besides "Profile picture" heading
to the users who cannot change their avatar explaining
that the avatar changes are disabled in organization.
2021-06-30 15:33:54 +05:30
sahil839 a537ecc587 settings: Fix live update of user-avatar upload widget.
We add disabled prop on buttons only and we add the css for
buttons (and some specific class elements) when disabled as
'cursor: not-allowed' or 'pointer-events: none' which means
the user cannot use these buttons when disabled.

This is not the case for the avatar widget as we use a div
element there and not button and neither those specific
classes which has appropriate styles defined.

We use the avatar image block in two ways - for showing image
and as a clickable target (which is actually a div element)
for uploading, so instead of adding 'disabled' prop we are
hiding (adding display: none) the div such that it is not
visible on hover and also cannot be clicked.
2021-06-30 15:00:51 +05:30
sahil839 d09da692c6 settings: Use switch case instead of if-else for message delete checks.
This is a prep commit for making zero as invalid value for
message_content_delete_limit_seconds, as that change would
add one more else-if and our eslint rules convert such cases
to switch case. Doing this here would keep the diff smaller
in the original commit of making zero as invalid value.
2021-06-29 17:37:53 -07:00
sahil839 6370b00f14 message_edit: Remove unnecessary check for allow_message_deleting.
We do not need to check whether allow_message_deleting is true
when checking for time limit, because we already have a condition
before that returns false if allow_message_deleting=False.
2021-06-29 17:37:52 -07:00
sahil839 4170a2e969 templates: Fix incorrect class name used for tooltips.
Tooltips of message retention and realm deactivation
should have appropriate class as per the setting and
not "realm_allow_message_deleting_tooltip" for all
the different tooltips.
2021-06-29 17:37:52 -07:00
m-e-l-u-h-a-n 4b870e0410 settings (stream): Add function to check if user can unsubscribe others. 2021-06-29 16:50:04 -07:00
m-e-l-u-h-a-n 14f46a831d popovers: Add data-user-id in user profile modal. 2021-06-29 16:50:04 -07:00
m-e-l-u-h-a-n 8070f5e1e2 CSS: Fix border color issue for stream list in profile modal.
This was missed in e10a315efd.
2021-06-29 16:50:04 -07:00
m-e-l-u-h-a-n f0141ee9c1 stream settings: Ignore deactivated user for stream subscription.
We ignore deactivated users when they are being added to streams.
To give current user information about the ignored user ids
we show it along with other details about subscribed and
unsubscribed users.

This partially addresses: #18949.
2021-06-29 16:46:40 -07:00
m-e-l-u-h-a-n a2b50bacee stream settings: Add checks to render `br` tags only when required.
This is required as we added `br` tags irrespective of whether
there were any users in the subscribed or already subscribed
category. This made the spacing here look odd. We now include
br tags inside conditionals to render them only when required.
2021-06-29 16:46:40 -07:00
m-e-l-u-h-a-n ffb811ef6e stream settings: Refactor logic for stream_subscriber_info display.
This refactor helps to avoid code duplication that occurs
if we need to add any extra info to the stream_subscriber_info
and also cleans up code in `add_subscriber_form` and
`.subscriber_list_remove form` handler to make it more readable.

It is preparatory commit to add information about ignored
deactivated users when bulk subscribing users to streams.
2021-06-29 16:46:37 -07:00
sahil839 c8849f8fe3 logo: Compute realm-logo url in frontend only.
This commit fixes the bug of always showing
day-mode realm logo when color scheme display
setting is set to automatic but the OS setting
is dark theme. This is because we cannot check
the OS setting on backend and we need to set
the logo url accordingly in frontend only.
So, we remove the logo url computation from
backend completely and instead compute it in
the frontend only.

Fixes #18778.
2021-06-29 13:42:44 -07:00
Aman Agrawal cb2d95d9ad hashchange: Don't narrow to default_view on `#reload`.
When the hash changes to `#reload...` before a reload, the app tries
to show default_view since there is no `case` handled for it. What we
want to do is ignore this hashchange, since we're about to be reloaded
(so it's not helpful) and if the timing is wrong, it can cause the
browser to reload back to "Recent topics" rather than saving the
user's view.

This fixes a bug introduced in 0e65225d06.

With tests from Riken Shan.
2021-06-29 13:39:01 -07:00
Ganesh Pawar 415159c5b9 user_status: Fix styling of modal. 2021-06-29 11:44:47 -07:00
Tim Abbott 7010777d6c compose: Remove unnecessary 10x margin.
This margin was ignored and will become a liability with future
changes to the compose box HTML.
2021-06-29 11:28:49 -07:00
Priyansh Garg 6cfe10fef2 compose-box: Fix compose-box from covering last messages of stream.
While writing a long message in compose-box, the last few messages of
the current stream gets covered by the compose-box and it gets pretty
annoying sometimes trying to figure out a way to read the last message
of the stream while writing. Right now, the only way to get past this
is to resize `compose-textarea` by using the resize tool at the
bottom-right corner of the `compose-textarea`. But, that small resize
tool is not always readily visible to the user.

The proposed solution in this commit is to reset the `max-height`
property of `#compose-textarea` everytime `bottom_whitespace_height`
is resized such that the total height of `#compose` is always less
than or equal to the height of `bottom_whitespace_height`.  Doing
this, the compose-box never covers the last message of the current
stream.

The only problem with this is that if the compose-box is closed at the
time of bottom-whitespace resize, we cannot find the
`compose_non_textarea_height` and so, we cannot reset the max-height
of `#compose-textarea`. To solve this, max-height of
`compose-textarea` is also reset everytime a new compose-box is opened
according to the value of `bottom_whitespace_height` at that time.

Thus, if the compose-box is already open at the time of
bottom-whitespace resize, the max-height of `#compose-textarea` will
also get reset at the same time, whereas, if the compose-box is closed
at the time of bottom-whitespace resize, the max-height of
`#compose-textarea` won't get reset at that time, but it will surely
get reset whenever the user will open the compose-box.

Tested on my Ubuntu Development Environment on Chrome and Firefox browsers.

Fixes: #16038.
2021-06-29 11:24:01 -07:00
Tim Abbott da596ef269 message_edit: Fix live update bug in left sidebar.
We've had for years a subtle bug, where after editing a topic in the
left sidebar that had previously had unread messages (but doesn't
anymore), the old topic might still appear in the sidebar.

The bug was hard to notice except for new organizations or in the
development environment, because the pre-edit topic appeared with a
sort key of -Infinity (that being the max ID in an empty list of
message IDs). But this is an important onboarding bug in reducing
faith in Zulip's topic editing just working, so I'm glad to have it
fixed.

Fixes #11901.
2021-06-29 10:00:52 -07:00
sahil839 e0fc6df2b4 settings: Fix live update of email change button.
This commit fixes a bug of not enabling/disabling
the email-change button when email_changes_disabled
setting is changed. Bug was because of using wrong
selector.
2021-06-28 22:14:55 -07:00
sahil839 c32a036449 settings: Remove unnecessary code.
The class "name_change_container" is used in the custom
profile fields form.

The name of custom profile field should not be affected
by this setting.

Also confirmed the behavior by testing on master itself,
that these fields are not hidden actually due to this
code being in settings_account itself.

We can also remove the class "name_change_container" as
there is no use of this class elsewhere.
2021-06-28 22:14:49 -07:00
sahil839 0f0e71b3f2 settings: Remove user-name-section from email input.
We handle the css using email-change-form and thus
there is no need for 'user-name-section' class as
this element is used for emails and not user names.
2021-06-28 22:11:24 -07:00
sahil839 e0667a80fe settings: Remove user-name-section class from some elements.
'user-name-section' class is only used to set css for its child
settings-info-icon. This commit removes the 'user-name-section'
class from elements which do not have 'settings-info-icon' as
their child element and also these elements are in not related
to user names.
2021-06-28 22:11:24 -07:00
sahil839 1cb72c77fe settings_users: Rename user-name-form to edit-user-form.
This commit renames user-name-form to edit-user-form as
the modal for which this id is used, is used to edit all
the user properties, not only name.
2021-06-28 22:11:24 -07:00
Steve Howell e311a0ad31 buddy list: Always include "me" in the list.
If a user sets themselves to unavailable, or otherwise
drops out of our presence data, we should still show
them at the top of their own buddy list.

See https://chat.zulip.org/#narrow/stream/137-feedback/topic/Users.20Sidebar/near/1220135
for more context.

I believe this change makes sense as a defensive
fallback, but it's quite possible that we may
want to change the server to record presence info
about users who are "unavailable" and then only
send that info to them (and not their peers).
2021-06-28 16:09:43 -07:00
Tim Abbott e76fd775ba settings: Remove unnecessary ancient table styling.
This effectively reverts d96d4e30ab,
which is a bug that hasn't been present for other reasons due to past
design changes.

It fixes a bug where the "Search operators" page had missing margin
between the table and post-table content..
2021-06-28 09:14:09 -07:00
aryanshridhar 8140a1a6ee info_overlay: Render search operators using info_overlay.
This commits ports the `search_operators.html` file from
./templates to handlebars, essentially creating a new file
as `search_operators.hbs` within /static/templates which is
then rendered using info_overlays.js.

As part of this migration, we rewrote the way internationalization was
done, since the previous implementation incorrectly did not support
languages with a different word order than English.

We also not consistently use periods at the end of the descriptions.

Co-authored-by: Tim Abbott <tabbott@zulip.com>

Fixes #18504.
2021-06-28 09:14:09 -07:00
aryanshridhar 942f4372f0 info_overlay: Render keyboard shortcuts using info_overlay.
This commits ports the `keyboard_shortcuts.html` file from
using the Django template to handlebars, essentially creating
a new file as `keyboard_shortcuts.hbs` within /static/templates
which is then rendered using info_overlays.js.

Fixes part of #18792.
2021-06-27 18:29:52 -07:00
Aman Agrawal 8c1ae1161b tippy: Clarify how to use `tippy-zulip-tooltip` class. 2021-06-27 18:11:34 -07:00
akshatdalton a7681d4a17 message_edit: Extract `toggle_resolve_topic` helper function.
This is a prep commit for #18988. Extracting it here, we
can avoid duplication which helps to avoid future bugs.
2021-06-26 16:42:44 -07:00
akshatdalton d17e5d080c refactor: Extract `RESOLVED_TOPIC_PREFIX` in message_edit.js.
This is a prep commit for #18988. Extracting it here, we
can avoid duplication which helps to avoid future bugs.
2021-06-26 16:40:58 -07:00
Dinesh afe6404167 timerender: Use tippy tooltip for topic header timestamp. 2021-06-25 18:10:42 -07:00
Dinesh 177dd05d0b timestamp: Move tooltip date, time rendering logic to tippyjs.js.
Makes use of `onShow` for all calculations and rendering
of date, time for tooltip.
2021-06-25 18:10:42 -07:00
Dinesh c10e56698c timestamp: Migrate message_time from title to tippyjs tooltip.
This keeps it consistent with other widgets in message body area.

Set the display position to top to be consistent with
compose control buttons.

Changed the tooltip content to be more readable like
Thursday, May 18, 2017
7:12:53 AM India Standard Time

Also changed timerender.get_full_datetime() to consider
users' 24 hour format preference.
2021-06-25 18:10:42 -07:00
Hashir Sarwar d1b18d2c07 compose: Show `compose_error` for deactivated users.
When a user tries to send a (group) private message to a deactivated
user, a compose error is displayed.

Fixes #13766.

Co-authored-by: Signior-X <b19188@students.iitmandi.ac.in>
2021-06-25 18:06:48 -07:00
Hashir Sarwar 130f1d7153 input_pill: Customize pills for deactivated users.
This modifies the appearance of pills for deactivated users
in the following ways:

* Adds `(deactivated)` with the deactivated user's name.
* Add a tooltip to the deactivated user's pill stating
that one can't send a message to this user.
* Color the deactivated user's pill reddish.

This now also adds tests for user_pills.

Part of #13766.

Co-authored-by: Signior-X <b19188@students.iitmandi.ac.in>
2021-06-25 18:06:42 -07:00
Hashir Sarwar 7b9ed4ff2e people: Allow deactivated users pills in compose box.
This commit treats deactivated users as valid users
for compose box which prevents the PM list to collapse
when a deactivated user in the PM list is clicked.

Part of #13766

Co-authored-by: Signior-X <b19188@students.iitmandi.ac.in>
2021-06-25 18:01:15 -07:00
sahil839 5504741239 settings: Remove intentional waiting time in deactivate account request.
The waiting time of 5000ms was probably added for testing UI of
spinner in 2f99e6b7b2 and was missed in review. This commit removes
the waiting time and now the user is deactivated almost instantly when
the button is clicked.
2021-06-25 16:36:41 -07:00
Anders Kaseorg 9518545128 js: Remove ancient IE createTextRange API.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-06-25 16:34:37 -07:00