Commit Graph

13044 Commits

Author SHA1 Message Date
YashRE42 71a4985ebc refactor: Remove duplication from reactions.view.insert_new_reaction.
In commit 3d86267041 we add logic to
`/shared/emoji.js` which duplicated some of the logic in this
function. Since this isn't desirable, we remove the duplicate logic
here and instead just call `emoji.get_emoji_details_for_rendering`.
2021-11-20 20:57:54 -08:00
YashRE42 263a79738f user_status: Fix status emoji handling of deactivated custom emoji.
Previously, if a user had a realm emoji set as their status emoji and
someone deleted the realm emoji, the app would fail to initialize,
because of the error we throw from `./shared/js/emoji.js`.

This commit fixes this by just displaying the deactivated emoji,
similar to how we do when realm_emoji used as reactions are deleted.

As part of the fix, we add a function get_emoji_details_for_rendering,
which duplicates some of the logic used in `reactions.js`, we can
refactor to remove the duplication in `reactions.js` in future
commits.

Note that the following behaviour is a part of our design:
If a user sets their emoji to a particular realm emoji, say for
example "octo-ninja", and "octo-ninja" was then deleted, and a new
emoji was added with the name "octo-ninja", the user's status emoji
would change to show the new emoji instead of the deleted emoji.

Also note that in the `user_status.js` node test, we were able to
change the name for the 991 realm_emoji because it had not been
previously used anywhere in the test (possibly added as just a copy
paste artifact?).

Fixes: #20274.

emoji: Use reaction_type parameter to analyze emoji.
2021-11-20 20:57:54 -08:00
YashRE42 85a566aa80 emoji: Add code comment complaining about "zulip" emoji special case. 2021-11-20 20:57:54 -08:00
Alya Abbott 3d31bd79be
settings: Rename "public export" to "export of public data". 2021-11-19 17:36:29 -08:00
Sahil Batra 14b91043d2 misc: Replace "Day mode" with "Light theme". 2021-11-19 11:49:59 -08:00
Sahil Batra b72035abfe misc: Replace "Light mode" with "Light theme". 2021-11-19 11:49:59 -08:00
Aman Agrawal ecb966c850 landing_page: Explicitly define transparent for gradients.
Safari interprets transparent as rgba(255, 255, 255, 0)
`transparent black` instead of rgba(0, 0, 0, 0).

We explicitly define transparent to help safari understand the
gradients.

This fixes the bug where our gradients look black on safari
on narrow screens.
2021-11-18 17:35:09 -08:00
Aman Agrawal fce9b2dbb4 features: Only change gradient height for feature page.
This gradient works well to display white colored text
on top of it on other pages. So, we only need this change on
features page.
2021-11-18 17:35:09 -08:00
Sahil Batra 89720c5d5a slash: Change description of /dark command in typeahead.
Fixes part of #20228.
2021-11-18 16:57:11 -08:00
Sahil Batra 5024ba98cd misc: Rename "dark mode" to "dark theme".
Fixes part of #20228.
2021-11-18 16:57:11 -08:00
Sahil Batra cf4f31291c misc: Rename "Night mode" to "Dark theme".
This commit renames "Night mode" to "Dark theme" in the
settings dropdown, help pages and api documentation.

Fixes part of #20228.
2021-11-18 16:55:35 -08:00
Sahil Batra 291f8e570d styles: Rename night_mode.css to dark_theme.css.
Fixes part of #20228.
2021-11-18 16:55:35 -08:00
Sahil Batra b61d48d94b settings: Rename "Automatic" option in color scheme dropdown.
This commit renames "Automatic" option in color scheme setting
dropdown to "Sync with compute". We do not change any variables
used in code just the text in the dropdown visible to user.

Fixes part of #20228.
2021-11-18 16:55:35 -08:00
Aman Agrawal 2a922409aa realm: Add option to enable/disable spectator login.
We restrict access of messages from web public streams if
anonymous login is disabled via `enable_spectator_access`.

Display of `Anonymous login` button is now controlled by
the value of `enable_spectator_access`.

Admins can toggle `enable_spectator_access` via org settings in UI.
2021-11-18 12:55:12 -08:00
Sahil Batra 16d35f5b4e streams: Hide fake emails in stream creation form.
We hide fake emails in "People to add" section of
stream creation form and instead show user id
along with specifying that email is hidden.
2021-11-18 12:49:10 -08:00
Ganesh Pawar e7b9173ef5 default_language: Migrate modal to dialog_widget. 2021-11-16 17:02:29 -08:00
YashRE42 3a06025e5a stream_settings_overlay: Fix padding for right section headings.
At some point we must have made a change that caused the "create
stream" and "#stream name" headings to take up more vertical space,
resulting in the dividing line for the headings of the right side of
the subscription overlay to be miss-aligned with the same for the left
side. For the "create stream" panel, it also caused the scroll bar and
some content to be visible through the partially transparent bottom
section in night mode.

In this commit we reduce the padding for those headings so that things
don't look broken anymore.
2021-11-16 16:33:33 -08:00
Manan Rathi f3469ac3c8 todo_widget: Fix /todo checkboxes to match style used in menus.
Fixes #20212
2021-11-16 15:02:53 -08:00
Mateusz Mandera 7df5f8e6f5 docs: Update the /help/ instructions for setting up OneLogin SAML.
OneLogin has removed the old app. The new app is nearly identical, just
with some additional configurable settings, that we don't want to touch
anyway as the default are fine - and changing the default Parameters
that are set up, so we also update the screenshot to match how it looks
with the new app.
2021-11-16 14:58:17 -08:00
Ganesh Pawar 6262c88e00 modal: Grey out the submit button when disabled. 2021-11-15 10:38:57 -08:00
Ganesh Pawar ca4d9b0fd6 modal: Mark submit button CSS `color` property as important.
This is necessary to override the global `color` property defined
for disabled buttons in night mode.
2021-11-15 10:38:57 -08:00
Aman Agrawal 5f4595d7b6 landing_page: Avoid gradient overflowing under content.
Gradient under content makes links which are of similar color
hard to see.
2021-11-14 18:56:34 -08:00
Alex Dehnert dfaeb10087
settings: Link to help on restrict wildcard mentions.
This is necessary to indicate the definition for "large streams" used.
2021-11-12 11:33:35 -08:00
Lauryn Menard 6046f94521 settings: Fix live `update_page` behavior for user settings.
Changes `update_page` to only update the modified user setting instead
of updating all of the user settings on the page. This is modeled on
the behavior for updates to the realm user default settings.

This is a follow up on feedback in #20070.
2021-11-10 13:03:20 -08:00
akshatdalton e9a2183fda drafts: Fix tooltip css in draft controls.
Tooltip popover in draft controls was too narrow.
Now its width is set to max-content width.
This looks nice.
2021-11-10 12:54:53 -08:00
akshatdalton 2b1cc006fa drafts: Add hotkey hint to restore draft. 2021-11-10 12:54:53 -08:00
Tim Abbott 12c6ee7962 drafts: Document that drafts are not shared with other devices.
We plan to change this in the future, but we should make sure it's
clear to users what the current model is.
2021-11-10 12:53:44 -08:00
Wesley Aptekar-Cassels 151db3c9ef drafts: Increase the duration of "Saved as draft" tooltip.
Now that it's further away from the composebox, we probably want it to
be visible for longer. Doubling it from 1.5 seconds to 3 seconds seems
reasonable to start with, although we should tune it based on feedback.
2021-11-10 12:53:44 -08:00
Wesley Aptekar-Cassels fe89dee284 compose: Remove "Drafts" button.
Now that this is in the left sidebar, we can remove the now-redundant
compose area button for it.  This also changes where the "Saved as
draft" tooltip appears.
2021-11-10 12:53:44 -08:00
Wesley Aptekar-Cassels df8f0b2afe left_sidebar: Add "Drafts" item.
This currently shows the drafts as a popup. Eventually, we'll want to
migrate it to be a view in the center pane, as we did with Recent
Topics.

This uses the same style as starred messages in order to show the number
of drafts.

See CZO for more context:
https://chat.zulip.org/#narrow/stream/101-design/topic/drafts.20in.20sidebar
2021-11-10 12:53:44 -08:00
Aman Agrawal cfbed9a60c recent_topics: Re-select last selected topic.
Since the position of topic in recent topics can change, we
focus the last selected topic using the `topic_key` instead
of relying `row_focus` value which is incorrect.
2021-11-10 12:25:15 -08:00
Aman Agrawal 7f61997d09 recent_topics: Directly pass topic index instead of element.
Since the element may get re-rendered while we extract info from
it, we do it as fast as possible to avoid errors.
2021-11-10 12:25:15 -08:00
Aman Agrawal c6d74c4b67 recent_topics: Separate behaviour for scrolling and hotkeys.
When user is scrolling, we simply keep the center element in
focus.

When user is using hotkeys, we keep the focused element in
center.

When user is using keyboard, we need to always keep the
"focused" topic in visible scrolling area.

We determine if the topic row is above or below the visible
area and scroll half_height_of_visible_area so that the selected
topic is visible.

This gives a nice navigation experience for both the views.

Reduced height of recent topics table to account for
compose box so that focused element is not below compose box.
2021-11-10 12:25:15 -08:00
YashRE42 f21cee7caa upload: Return single elem for get_item(drag_drop_container) w/ edit.
Previously, opening multiple message_edits and then drag-dropping a
file into any one of them would cause all of them to upload ie you'd
get one uploaded file in each message_edit.

This bug was caused by returning multiple elements from
upload.get_item("drag_drop_container", config) when config.mode =
"edit".

This commit changes the selector to use the row provided (config.row),
and so ensures that the above bug doesn't happen.
2021-11-10 12:06:15 -08:00
YashRE42 e8eb6724ad message_view_header: Switch selector for hover to ~ instead of +.
This is a prep commit for adding extended descriptions to
message_view_header, it ensures hover effects work even if we add
additional elements to the message_view_header.
2021-11-10 11:05:22 -08:00
Ganesh Pawar 7a505e3857 user_profile_modal: Migrate modal to Micromodal. 2021-11-10 11:04:38 -08:00
Tim Abbott f905171e78 stream_edit: Remove unused import.
This was introduced when rebasing
d62e44fcba on top of
8cc781f0c8, which removed the other use
of this module in this file.
2021-11-10 10:33:12 -08:00
Ganesh Pawar d62e44fcba stream_privacy_setting_modal: Migrate modal to dialog_widget. 2021-11-10 10:23:31 -08:00
Aman Agrawal 9af4d5a155 reminder: Don't ack server for reminder / scheduled messages. 2021-11-10 09:12:23 -08:00
Aman Agrawal 3237196687 reminder: Fix incorrect method applied on object.
The intention here is to apply `find` on the array of values
in the object.
2021-11-10 09:12:23 -08:00
Aman Agrawal 59a62573ed popover_menus: Simplify check for any active popovers. 2021-11-10 09:12:23 -08:00
isakhagg 7edbf673e4 poll: Handle duplicate poll options.
Fixes #20164.
2021-11-10 09:07:03 -08:00
Ganesh Pawar 6bc291cdf2 edit_bot: Remove unnecessary CSS from bot owner button.
Fixes #20201.
2021-11-10 09:02:08 -08:00
Aman Agrawal a8c488bc56 compose: Use calendarContainer to check if flatpickr is open.
`calendarContainer` is defined for flatpickr instance if it is
open.

This also fixes a bug where the flatpickr doesn't open when
user tries to toggle it using the global time icon in compose.
2021-11-10 09:00:59 -08:00
Manan Rathi aac8ceadf9 user docs: Add documentation for /todo.
Fixes #20141.

Co-authored-by: Alya Abbott <alya@zulip.com>
2021-11-09 10:16:47 -08:00
Tim Abbott 4aedb129ea settings: Add comments for default settings update_page. 2021-11-09 10:05:08 -08:00
Sahil Batra f49980098d settings: Fix live update code for twenty_four_hour_time setting.
We need to handle live-update of twenty_four_hour_time setting
separately in update_page because the database value of this
setting is boolean but we use dropdown in the frontend for this
setting with option values as "true" and "false" strings.
2021-11-09 10:03:23 -08:00
Sahil Batra 4a1153b06c settings: Fix bug in "Default user settings" section.
There was no heading for "Time format" setting in the
"Default user settings" section and thus no save-discard
widget to update the setting. This commit fixes the bug
and changes the heading to be only "Time" since there is
no realm-level default of language setting.

This bug was introduced in adb612a0b4.
2021-11-09 10:03:23 -08:00
Ganesh Pawar 41ddf29e76 move_topic_to_stream: Migrate modal to dialog_widget. 2021-11-09 10:02:43 -08:00
Aman Agrawal 05bd417de4 flatpickr: Visual improvements.
* Fix time input buttons not positioned correctly.
On <768px screens:
* Center align flatpickr.
* Remove bottom arrow.

We should ideally have a semi-transparent black background
for flatpickr on mobile but it is hard to do so with flatpickr
being inserted into DOM by an external library.
2021-11-09 09:40:52 -08:00
Aman Agrawal 8c46fde342 flatpickr: Show the same picker on mobile as on desktop.
Flatpickr tries to show a different picker for mobile which
is not visible for some reason. We display the same picker
on mobile which we know works for our use case.

Docs: https://flatpickr.js.org/options/

```
Set disableMobile to true to always use the non-native picker.
By default, flatpickr utilizes native datetime widgets unless
certain options (e.g. disable) are used.
```
2021-11-09 09:40:52 -08:00
Sahil Batra 041711dcbd streams: Add padding between subscriber-list columns.
This commit adds 5px of padding between columns of
subscriber-list such that the list doesn't look too
bad on narrow widths. This does not completely fixes
the issue on narrow widths but is atleast a small
improvement.
2021-11-09 15:11:02 +05:30
Sahil Batra 46660e5daa streams: Show "hidden" in subscriber-list when email is not accessible. 2021-11-09 13:26:31 +05:30
Sahil Batra 305131c7d7 settings: Show "hidden" in users list when email is not accessible. 2021-11-09 13:22:44 +05:30
YashRE42 a150b9b0ae recent_topics: Don't rely on ":visible" to avoid forced reflow.
Previously, navigating from any stream to the recent topics view would
cause a forced reflow every time we checked `is_visible()` because it
would call `$("#recent_topics_view").is(":visible")`.

The reason for this is related to how browsers ship frames, the
process follows these steps:
JavaScript > style calculations > layout > paint > composite.
(The layout step is called Reflow in firefox.)

Typically, the browser will handle these steps in the most optimal
manner possible, delaying expensive operations until they're needed.

However, it is possible to cause the browser to perform a layout
earlier than necessary. An example of this is what we previously did:

When we call `top_left_corner.narrow_to_recent_topics()`, we ask to
add a class via `.addClass()`, this schedules a Style Recalculation,
then, when we call `message_view_header.make_message_view_header()` it
calls `recent_topics_util.is_visible()` which calls
`$("#recent_topics_view").is(":visible")`.

Before the browser can get this value, it realizes that our dom was
invalidated by `.addClass()` and so it must execute the scheduled
Style Recalculation and cause a layout.

This is called a forced synchronous layout.

This commit adds a JavaScript variable representing the visible state,
in order to prevent the above behavior.

This commit reduces the main thread run time of
`build_message_view_header` from 131.81 ms to 5.20 ms.

Unfortunately we still have the case where
`recent_topics_ui.revive_current_focus()` calls
`recent_topics_ui.set_table_focus()` which causes a reflow.

However, by eliminating this reflow we still save ~100ms.
(It's important to note that we only save this sometimes, as other
things can still cost us a reflow.)

Further reading: https://developers.google.com/web/fundamentals/
performance/rendering/avoid-large-complex-layouts-and-layout-thrashing
2021-11-08 18:30:44 -08:00
Sahil Batra c8b00941f2 stream_settings: Add user-id column in subscriber-list. 2021-11-08 18:10:25 -08:00
Sahil Batra e3aed119ec stream_settings: Add heading row in subscriber list. 2021-11-08 18:10:25 -08:00
Sahil Batra 2105b5eda8 settings: Add user-id column to bot list. 2021-11-08 18:10:25 -08:00
Sahil Batra 36c1a1f1ee settings: Add user-id column in active and deactivated users list. 2021-11-08 18:10:25 -08:00
Ganesh Pawar edf7c0fb5a edit_bot: Migrate modal to dialog_widget. 2021-11-08 17:34:42 -08:00
Ganesh Pawar 8cc781f0c8 change_stream_info_modal: Migrate modal to dialog_widget.
The CSS changes make the description input box a more likely size for
what currently makes sense for stream descriptions.
2021-11-08 17:27:27 -08:00
Ganesh Pawar 8c7d320422 message_edit_history: Migrate modal to dialog_widget. 2021-11-08 17:24:31 -08:00
Aman Agrawal ffba7c7352 open-source: Stop quote used as image for feature from overflowing.
In small screens, the quote used as a standin for image used
to overflow from screen as it didn't had responsive size set.
This image has additional bound of `max-width: 100%` which
stops them from overflowing which the quote did not.
2021-11-06 06:18:06 -07:00
Anders Kaseorg 2080278758 styles: Use legacy color notations for older browser compatibility.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-11-05 17:34:13 -07:00
Anders Kaseorg 22d68831d7 styles: Fix function-url-quotes.
Fixed manually.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-11-05 17:34:13 -07:00
Anders Kaseorg 17e72da336 styles: Fix declaration-block-no-redundant-longhand-properties.
Fixed manually.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-11-05 17:34:13 -07:00
Anders Kaseorg 52ad928d3e styles: Fix shorthand-property-no-redundant-values.
Generated by stylelint --fix.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-11-05 17:34:13 -07:00
Anders Kaseorg c732a63b2f upload_widget: Convert $e.get(0) to $e[0].
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-11-05 17:34:13 -07:00
Vishnu KS 6c06858e02 billing: Migrate to Stripe hosted checkout page. 2021-11-05 17:23:10 -07:00
Andrew McAfee 4f63378e7f settings: Add UI option for custom notification batching period.
PR #19576 added a settings option for selecting a notification batching
period. We want to extend that UI option with the ability to select
a custom period.

Tweaked by tabbott to have the natural model that picking a value
present in the dropdown live-updates to remove the custom input,
rather than only having the custom input disappear on reload.

Fixes #19713.
2021-11-05 12:21:55 -07:00
Andrew McAfee 8c7e144e47 settings: Refactor notifications update_page to use switch.
Changes suggested by timabbott: https://github.com/zulip/zulip/pull/19944#discussion_r727565978

Facilitates additional changes for issue #19713.
2021-11-05 11:49:30 -07:00
Aman Agrawal 1484812f4b message_view_header: Hide subscriber count for spectators.
While we figure out a plan in #19842 to display
subscriber count for spectators without doing a heavy query
to the database, we hide this section in navbar.
2021-11-03 16:02:53 -07:00
Aman Agrawal a40a5c0bdb user_info_popover: Show relevant info for spectators and hide buttons.
We add the date joined info to the popover and hide all the buttons
since none are relevant for a spectator.
2021-11-02 11:26:19 -07:00
Tim Abbott d76b4744bf popovers: Use user ID for computing medium avatar URLs. 2021-11-02 11:26:19 -07:00
Aman Agrawal eb396b6190 popovers: Don't try to fetch small avatar using email.
It's always better to use the user ID than the email for fetching data
about an object whose unique ID we have, which should be all of them.
And it's also cleaner code to use the standard people.js method; tabbott
checked that indeed all callers get their `user` objects from `people.js`.

Since we restrict spectators from having access to avatars using
email to avoid someone brute forcing a user's email, this removes
a 401 response from the server in spectator view when trying
to open user info popover.

Additionally, this fixes the cached-fetching behavior documented in
the comments we add about the way we construct URLs.
2021-11-02 11:26:19 -07:00
Aman Agrawal d763ccf0d6 left_sidebar: Hide vdots for All messages and stream buttons.
Since the options in those popovers are non-accessible to the
spectator, it is better to hide the vdots instead of
displaying empty menu.
2021-11-02 11:26:19 -07:00
Aman Agrawal d6541c4724 message_fetch: For spectators, add web-public to narrow.
Without this, server will return a 401 error.
2021-11-02 11:26:19 -07:00
Sahil Batra e6106cb334 invites: Update error message when max limit for the day is reached.
This commit updates the error message returned when the maximum
invite limit for the day. We update the error returned by API to
only mention that the limit is reached and add the suggestion
to use multi-use link or contact support in the message shown
in webapp.
2021-11-01 16:36:26 -07:00
Kevin Scott 64f099d2f5 compose: Add compose box button to insert global times.
Fixes #20045.
2021-11-01 16:20:05 -07:00
Tim Abbott 862061fa53 lint: Fix JS style in last commit. 2021-11-01 11:07:01 -07:00
YashRE42 c696b78eec refactor: Extract "load_and_set_favicon" in favicon.js.
This is a prep commit to reduce duplication when implementing custom
favicons.
2021-11-01 10:54:56 -07:00
Lauryn Menard 73710e1cf0 user_settings: Add option to disable escape key navigation to default view.
Add `escape_navigates_to_default_view` as a bool setting in
UserBaseSettings model and implement it as a checkbox that toggles
the hotkey implementation of escape to the default view in the
advanced user display settings.

With /help/ documentation edits from Alya Abbott.

Fixes #20043.
2021-10-29 18:15:30 -07:00
Ganesh Pawar fce3261c30 deprecated_feature_notice: Migrate modal to dialog_widget. 2021-10-29 16:09:39 -07:00
Sahil Batra 9e9740ab65 settings: Add user-id readonly field in edit-user UI. 2021-10-29 16:08:35 -07:00
Sahil Batra 9f99dee687 user_profile: Show user_id in full user-profile modal. 2021-10-29 16:08:35 -07:00
Sahil Batra fcc1548a74 settings: Fix css for custom profile fields in edit user form.
Previously the edit user modal element was appended inside the
settings overlay itself, so the styles for .custom_user_field
elements nested inside #settings_page were sufficient both for
edit user UI and profile section in personal settings.

e6e60107 changed the code to append edit user modal to body
element and thus existing css was no longer applied to custom
profile fields with custom_user_field class in edit user modal.

This commit fixes to have same styles for .custom_user_field
elements in #edit_user_form.
2021-10-29 14:44:31 -07:00
Ganesh Pawar d14312b18e modal: Remove focus ring from submit button. 2021-10-29 14:43:07 -07:00
YashRE42 47f81f6974 minor: Fix typo in narrow.js activate - "heading" was "headig". 2021-10-27 14:22:10 -07:00
Ganesh Pawar 14b07669cc dialog_widget: Add support for rendering a single footer button. 2021-10-26 18:20:17 -07:00
Ganesh Pawar c429c5d70e dialog_widget: Add support for having a custom id on the container element. 2021-10-26 18:20:17 -07:00
Ganesh Pawar 1e8bfa710e dialog_widget: Migrate modal to Micromodal.
Also removed the `danger_submit_button` config option
from the dialog_widget since it isn't needed in the new modals.
2021-10-26 18:20:17 -07:00
Ganesh Pawar 6a07a90499 dialog_widget: Remove the `fade` parameter.
A user wouldn't differentiate between a "normal" modal and a "settings"
modal. If one shows up instantly, one would expect all the others to do
the same. The difference between Bootstrap fade and non-fade is pretty
noticeable (300 ms for fading).

This is a prep commit for the Micromodal migration which will have 120ms
as the animation time which wouldn't feel slow.
2021-10-26 18:20:17 -07:00
Ganesh Pawar e6e601077f dialog_widget: Append dialog_widget to the body element.
We attach the DOM for the modal to the body element
to avoid style interference from other elements and having to choose
a separate parent element for every single dialog_widget.
2021-10-26 18:20:17 -07:00
YashRE42 0ddf319709 click_handlers: Do not close compose box when clicking inputs.
Previously, there existed a bug where clicking an open message edit
box when the compose box was open would not focus the message edit
contents, but would instead:

- focus the message edit content,
- close the compose box,
- and unfocus the message edit content.

That first bug was fixed in 4e1525d7c4
which eliminated the unfocus part of that problem, but closing the
compose box is undesirable here anyway, since often it can be useful
to have compose open while interacting with the sidebar filter widgets
or working on editing a message.
2021-10-26 18:15:30 -07:00
Tim Abbott c60f83120b css: Fix missing whitespace in poll CSS.
a8b529b3ed hadn't been rebased since we
added the relevant linter rule.
2021-10-26 18:09:40 -07:00
YashRE42 bf4945a1e2 click_handlers: Correct line reference made by comment.
Click_handler.js was created in commit
e5467d3268 by moving code from ui.js.

While making this change, some handlers were rearranged, but the part
of this comment saying "... code above" was never changed. This commit
changes that part of the comment to refer to the correct handler
(which is labeled by a comment as MAIN CLICK HANDLER).
2021-10-26 17:54:56 -07:00
Tim Abbott 4e1525d7c4 compose: Fix buggy refocusing of compose box on close.
The `make_compose_box_original_size` function is designed in such a
way that it should only be called when it actually needs to resize the
compose box. In 3 of the 4 places that called it, we checked whether
the compose was already the original size; this fixes the 4th to do
the same.
2021-10-26 17:54:56 -07:00
Ganesh Pawar 8730bd8b94 delete avatar: Improve accessibility by converting <span> to <button>.
Since it's a button, it doesn't need the "keydown" event. So,
removed it. This fixes the bug where pressing any key while the
avatar's delete_button was in focus would pop up the modal.
It was introduced in e5d0448505.
2021-10-26 17:51:38 -07:00
Aryaman 9d045d7470
streams: Increase margin in the hint for adding streams.
This prevents this hint from looking wrong in languages where the
string ends up longer.

Fixes #19848.
2021-10-26 15:50:56 -07:00
nooblag a8b529b3ed widgets: Improve visual style for Polls. 2021-10-26 15:14:46 -07:00