Commit Graph

13258 Commits

Author SHA1 Message Date
Steve Howell 576b966edc search suggestions: Add comment about server history. 2022-01-27 10:19:07 -08:00
Steve Howell eb2bf77212 search suggestions: Find older topics.
We no longer limit our list of candidate topics
to 300.

We continue to limit the topic results to 10, since
we don't want to overwhelm users or crowd out
non-topic-related suggestions.

We try to handle this is an efficient manner.
2022-01-27 10:19:07 -08:00
Sahil Batra 7265a76fc6 stream-settings: Show icon according to in the right column title.
We were showing # for all types of streams in the title at the top
in the right column of stream settings overlay. This commit fixes
it to show globe icon for web-public streams and lock icon for
private streams.
2022-01-26 12:50:05 -08:00
Sahil Batra e26de17ee1 stream-settings: Add space between # and stream name in title.
This commit adds space between # and the stream name appearing
at the top in right column in stream settings overlay.
2022-01-26 12:50:05 -08:00
Ashwat Kumar Singh 563b06ee08
stream_settings: Make disabled tab look disabled in dark mode.
Make disabled tabs look disabled in dark mode by adding color
to ".ind-tab.disabled" in "dark_theme.css".

Fixes #20917.
2022-01-26 04:11:47 -08:00
N-Shar-ma 048c9b99e3 compose: Add format hinting for polls.
Added a placeholder key to the polls slash command object. This is
selected and highlighted after being typed ahead in the compose box.
For slash commands without placeholder, everything works as before.

Formatting hints can easily be added for other slash commands too,
by adding a placeholder key to their object.

Fixes part of #20868
2022-01-25 18:12:42 -08:00
Aman Agrawal ec86290e2a tippy: Fix persistent message action tooltips on icons after blur.
When users tabs through the message action icons, they used to
persist even when the focus is not on them. We manually
destroy them on blur event since tippy has some issue with
handling elements with opacity hiding effect.
2022-01-25 11:15:30 -08:00
N-Shar-ma a003fe0246 compose: Fix bug where stream color didn't update on mouse selection.
Called the `decorate` function to update stream color in the compose
box on `change` instead of `blur`.

On clicking on a stream option, the input box for the stream name
remained in focus, hence decorate wasn't triggered on blur. Using
the change event instead, ensures that decorate will be called
anytime the stream is changed.

Fixes: #20871
2022-01-24 17:14:47 -08:00
Anders Kaseorg 44f9aaec32 eslint: Fix unicorn/prefer-dom-node-dataset.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-01-24 15:55:38 -08:00
Anders Kaseorg 392676d4da js: Avoid _.get.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-01-24 15:54:21 -08:00
Anders Kaseorg cc40352541 js: Avoid _.first, _.last, _.initial, _.tail.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2022-01-24 15:54:21 -08:00
Anders Kaseorg 42931e69e6 js: Convert _.isFunction to typeof.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-01-24 15:54:21 -08:00
Anders Kaseorg 57cc5cb25a js: Convert _.without to filter or other logic.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2022-01-24 15:54:21 -08:00
Anders Kaseorg e2290ef0de js: Convert _.uniq(a) to Array.from(new Set(a)).
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2022-01-24 15:54:21 -08:00
N-Shar-ma 6d2de28bf0 todo_widget: Fix bug where new todos sometimes replaced old todos.
Initialised `this.me` for the TaskData using a constructor to the
current user id.

The bug was caused due to `this.me` never being initialised, and hence
`idx` wasn't incremented on page reload, which resulted in duplicate
`data-key` attributes and hence new todos overwriting older todos with
the same `data-key`

Fixes: #20698
2022-01-24 11:25:32 -08:00
Lauryn Menard e479acc809 api_docs: Add line break before return value description text.
Adds a line break before the descriptive text for return
values and events in the api documentation in order to
help with readability of descriptions with multiple
paragraphs of descriptive text.

Adjustments made to the CSS of list items in unordered
lists to visually group the first paragraph of text
to any following paragraphs or unordered lists.
2022-01-24 10:02:02 -08:00
Anders Kaseorg c6b372b471 js: Simplify indexing arrays from the end with Array#at.
https://github.com/tc39/proposal-relative-indexing-method

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-01-24 09:58:54 -08:00
Anders Kaseorg 0b03628324 js: Shorten Object.prototype.hasOwnProperty.call to Object.hasOwn.
https://github.com/tc39/proposal-accessible-object-hasownproperty

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-01-24 09:57:09 -08:00
Sahil Batra fd1d4e101b overlay: Fix bug of information overlay not closing when text is selected.
There was a bug where information overlay was not closing on clicking
"x" when some text was selected. This was due to document.getSelection().type
returning "Range" and we do not close the modal in that case as per the code
added in 081d74141b.

As the "x" icon was button, the document.getSelection().type was
still returning "Range" for the text selected, but when the "x"
icon is inside a span, as in settings overlay, clicking on "x"
deselects the already selected text and selection type is not
"Range" and thus modal is closed.

This commit also improves the vertical alignment of "x".

Fixes #20645.
2022-01-21 17:39:01 -08:00
Aman Agrawal c4efc97d5a compose: Extend empty compose navigation logic to recipient boxes.
Navigation key presses like `Up` and `PageUp` with an empty recipient
boxes will now close the compose and propagate the keypress to the message
list or recent topics, depending upon the active view.

This extends behavior we've had for a long time with focus in the
compose box itself.
2022-01-21 16:40:13 -08:00
Ganesh Pawar 49e9cf10de user_status: Migrate modal to dialog_widget. 2022-01-21 16:17:25 -08:00
Ganesh Pawar f43d3b9986 change_email: Migrate modal to dialog_widget. 2022-01-21 16:12:34 -08:00
Ganesh Pawar 84ed22d59a api_key_modal: Place the error element at the top of the modal.
This is consistent with other modal behaviour.
2022-01-21 16:12:34 -08:00
Ganesh Pawar 79bdd8bdb6 api_key_modal: Update the modal config for `on_show`.
This is needed since 291aaf373f changed
the interface for modal event handlers.
2022-01-21 16:12:34 -08:00
Tim Abbott a020d7a80d user_profile: Fix unsubscribing other users from streams.
This fixes a bug introduced with the Micromodal migration in
7a505e3857, where the data-user-id
declaration for this modal was lost.
2022-01-21 15:45:11 -08:00
Alya Abbott 1bd83c33ab policies: Rename "Terms of Use" to "Terms of Service" in DPA. 2022-01-20 13:15:00 -08:00
Eeshan Garg f2e7b92b02 team_page: Display count of contributors with >=100 commits. 2022-01-19 17:37:09 -08:00
Eeshan Garg 1e8a7bc977 team_page: Exclude dependabot from contributors.
Dependabot has a history of merging some PRs and that makes GitHub
think that it is a contributor.
2022-01-19 17:37:09 -08:00
Eeshan Garg 94c89c80d1 team page: Display contributor count per repo.
Fixes #20725.
2022-01-19 17:37:09 -08:00
Eeshan Garg 3b9455c9ce billing: Make all buttons the same size.
Previously, the "Add Card" button was significantly larger than
the "Buy Standard" and "Submit" buttons.
2022-01-19 16:11:31 -08:00
Anders Kaseorg 3eb2791c3e CVE-2021-3853: Fix HTML escaping in recipient_row.
Commit 44f935695d (#20462) incorrectly
added these extra braces while intending to add whitespace control.
This triple-brace syntax was asking Handlebars to skip escaping the
string.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-01-18 21:28:21 -08:00
Aman Agrawal d4c70319eb topic_list: Fix search box not focused in expanded state.
We only check `topic_search_focused_before_build` if the
search box is visible.
2022-01-18 16:53:25 -08:00
Sahil Batra bb6dbb6383 todo_widget: Tag "Task list" heading for translation. 2022-01-18 14:15:34 -08:00
Priyank Patel 039910a159 ts: Convert lazy_set module to typescript. 2022-01-18 13:24:02 -08:00
Priyank Patel d0c339e772 lazy_set: Return set from the _make_set method.
This is done to avoid adding typescript type error checks when this
is converted to typescript.
2022-01-18 13:24:02 -08:00
Priyank Patel 84958bf7eb lazy_set: Move the size getter above other methods.
This is to avoid @typescript-eslint/member-ordering error when this
module is converted to typescript.
2022-01-18 13:24:02 -08:00
Priyank Patel 16a3d444fd lazy_set: Move set and array properties to the data field.
The data field will be a union type when it is converted to typescript.
This approach allows us to avoid introducing additional type check for
both of the properties.
2022-01-18 13:24:02 -08:00
N-Shar-ma be486b6138 i18n: Fix 'add choice' / 'add task' button size.
Removed the CSS rule setting the button's width to 100px.  This lets
the button take as much space as the appropriate translation needs,
without displaying an odd two-line button.

Fixes: #20077
2022-01-18 12:46:45 -08:00
My-Name-Is-Nabil 20d0fc9733 compose: Prevent upload files tooltip from hiding behind left sidebar.
Resolves the issue by appending tooltip to document body.

Fixes: #20639.
2022-01-11 16:30:55 -08:00
Sahil Batra df58a0740a settings: Show user name in heading of deactivation modal.
We show user name in heading of the deactivation confirmation
modal instead of email, since there can be a case when admin
does not have access to real email and we already show email,
if accessible, in the content of the modal.
2022-01-11 15:42:51 -08:00
Ganesh Pawar c1f639d115 org edit_bot_modal: Fix dropdown styling issue.
This makes use of the existing CSS present for the personal
edit_bot_modal.
2022-01-11 09:15:06 -08:00
Ganesh Pawar 21fa68ae7e org edit_bot_modal: Fix styling issues. 2022-01-11 09:15:06 -08:00
Eeshan Garg c30458e174 streams: Add notifications for posting policy changes.
An explanatory note on the changes in zulip.yaml and
curl_param_value_generators is warranted here. In our automated
tests for our curl examples, the test for the API endpoint that
changes the posting permissions of a stream comes before our
existing curl test for adding message reactions.

Since there is an extra notification message due to the change in
posting permissions, the message IDs used in tests that come after
need to be incremented by 1.

This is a part of #20289.
2022-01-10 18:29:04 -08:00
Aman Agrawal c23f5a114e topic_list: Don't restore focus to search if it wasn't focused.
After topic list is updated, only restore focus to it, if it was
focused before. This avoids jumping focus from say compose box
to topic search unexpectedly when the topic list is updated.
2022-01-07 14:39:16 -08:00
Anders Kaseorg 03f073d762 compose: Fix Enter to send switch internationalization.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-01-07 14:38:10 -08:00
Priyam Seth 9aa5082d63 message edit: Move with_first_message_id to message edit.js.
Prep commit so that the function first_message_id can be used
as an exported function for marking resolved topic as unresolved.

Related to #20584.
2022-01-05 17:55:00 -08:00
Aman Agrawal b3886af651 click_handler: Use a variable for target's jquery instance. 2022-01-05 16:15:40 -08:00
Aman Agrawal bf7224d04d reminder: Simplify logic and improve error text. 2022-01-05 16:15:40 -08:00
Aman Agrawal fa4311e7d0 popovers: Don't trigger remind handler on every flatpickr confirm.
This is part of remind popover and hence should be handled
separately.
2022-01-05 16:15:40 -08:00
Aman Agrawal 4d7cbc0a63 compose: Move emoji button outside of popover.
Since we more space after moving Help button below, we stop hiding
emoji icon in a popover on small screens.
2022-01-05 16:03:53 -08:00