Commit Graph

12000 Commits

Author SHA1 Message Date
Anders Kaseorg 7c38a0c1f0 recent_topics: Replace deprecated jQuery event trigger shorthand.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-05-20 10:42:36 -07:00
sahil839 bd957bb5a2 giphy: Add a '?' icon besides the "GIPHY integration" label.
We add a '?' icon besides the "GIPHY integration" label of
giphy settings dropdown.

The icon links to readthedocs page for setting up giphy API
key when api key is not set, and it points to help center
article of GIFs when the api key is added.
2021-05-19 13:20:52 -07:00
Steve Howell 62eca19b86 node tests: Eliminate sloppy_$ for compose tests. 2021-05-19 15:55:03 -04:00
akshatdalton 769cd06ab6 refactor: Extract linkifier non-settings logic from `markdown.js`.
The extracted logic is in linkifier.js.
We have decided to name it linkifier.js instead of realm_linkifier.js
because in future when we will add stream-level linkifiers, we'll
likely want them to be managed by this same file.
2021-05-19 11:59:28 -07:00
Aman Agrawal ddfb9b5200 tippy: Increase font size from 12 to 13px.
Increasing the font size for clear visibility.
2021-05-19 11:20:49 -07:00
sahil839 48761208f0 css: Change width of upgrade-tip and to max-content.
We change the width of upgrade-tip to be max-content
such that it matches with the other elements in
settings overlay like dropdown, which are not of full
width.
2021-05-19 11:04:32 -07:00
sahil839 cf23a09532 giphy: Fix live update of giphy icon when API key is empty.
We fix the code to show giphy icon live update only if the
updated setting is not disabled and API key has been added.
Though the dropdown is disabled,the setting can still be
changed using API, so this change is necessary.

Previously, we were not checking whether API key is there or
not and icon was shown on live update even if API key was
not there and then it went off on reload.
2021-05-19 11:04:32 -07:00
sahil839 cf6fc3456f giphy: Disable giphy settings dropdown if API key is not present. 2021-05-19 11:04:32 -07:00
Nikhil Maske 1428310973 muted_user_settings: Add table-sticky-headers class to table header.
table-sticky-headers class is used to make the header of the
table fix at the top.
2021-05-18 17:36:13 -07:00
PIG208 4e8dd43841 devtools: Improve the appearance of dev_panel. 2021-05-18 17:35:29 -07:00
rht aa3cdfa2e9 Fix typos using codespell.
The command:
codespell --skip='./locale,*.svg,./docs/translating,postgresql.conf.template.erb,.*fixtures,./yarn.lock,./docs/THIRDPARTY,./tools/setup/emoji/emoji_names.py,./tools/setup/emoji/emoji_map.json,./zerver/management/data/unified_reactions.json' --ignore-words=codespell_ignore_words.txt .

The content of codespell_ignore_words:
```
te
ans
pullrequest
ist
cros
wit
nwe
circularly
ned
ba
ressemble
ser
sur
hel
fpr
alls
nd
ot
```
2021-05-18 17:33:51 -07:00
akshatdalton 9e5f2f841f rendered_markdown: Add support for rendering of user group silent mention.
Earlier, the text in silently mentioned user group was rendered
as: `@user-group`

which is fixed by this commit and now it rendered as: `user-group`.
2021-05-18 17:31:25 -07:00
Steve Howell eb46ac408d node tests: Add activity.clear_for_testing(). 2021-05-18 18:34:17 -04:00
Steve Howell 7a9d0a505d node tests: Avoid rewiring client_is_active. 2021-05-18 18:34:17 -04:00
Vishnu KS 323ad83d98 billing: Allow updating licenses of plans on manual license management. 2021-05-14 15:10:02 -07:00
Vishnu KS 51ef5d62ad billing: Add ignored_inputs paramater to create_ajax_request. 2021-05-14 15:10:02 -07:00
Vishnu KS d9baa681b2 billing: Use PATCH request for changing plan status.
I think it's much more cleaner to use PATCH request on
/json/billing/plan than using a POST request on
/json/billing/plan/change to update the plan.
2021-05-14 15:10:02 -07:00
Anders Kaseorg e015f3ed7d docs: Correct “webapp” to “web app”.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-05-14 13:15:38 -07:00
aryanshridhar 056e7d1a36 dropdown_list_widget: Add 'type' attribute to reset button.
Previously, when a user hits 'Enter' key within a input
field it incorrectly triggers the dropdown_list_widget's
reset button.

This is because the reset button had the default type attribute of
'submit' which triggers the click event binded to it. Fixed it by
explicitly defining it's type attribute to be a button.
2021-05-14 13:06:59 -07:00
Aman Agrawal 987acd93f4 message_edit_form: Fix vertical alignment of bottom elements. 2021-05-13 17:11:29 -07:00
m-e-l-u-h-a-n ab1c656c58 recent-topics: Fix tooltip placement for time in recent-topic row. 2021-05-13 15:28:01 -07:00
Tim Abbott 3edb9b8ed6 tooltips: Use TippyJS for all message_control_button tooltips.
The inconsistent style between these three buttons looked bad.

We have to take some care with the "Starred messages" and "Edit" ones,
to make sure they live-update properly.
2021-05-13 12:56:38 -07:00
aryanshridhar 2e334bec89 dropdown_list_widget: Add 'type' attribute to template.
Previously, when the user presses 'Enter' within a input
field while keyboard focus in is in the topic edit textbox
it incorrectly opened the dropdown list widget.

This is because the dropdown button had the default type attribute of
'submit' which triggers the click event binded to it.  Fix it by
explicitly defining it's type attribute to be a button.

Fixes #18415
2021-05-13 12:54:01 -07:00
aryanshridhar 352acdcc36 dropdown_list_widget: Properly bind focus to dropdown elements.
Previously, the focus event tends to skip the first
element within the dropdown list when the user presses
the down arrow.
Added a stopPropogation event for keydown handler within
dropdown_list_widget which propoerly binds the focus
event to the dropdown list items.
2021-05-13 12:51:49 -07:00
m-e-l-u-h-a-n 480c5cbc01 recent topics: Fix placement of tooltips in recent topic rows.
It is a follow up for #18451.
2021-05-13 11:43:48 -07:00
Anders Kaseorg 668b5137b0 version: Display Zulip version in About Zulip dialog.
We record Git details about the merge-base with upstream branches in
the zulip-git-version file, if the upstream repository is available.

Note that the first Git upgrade after merging the parent commit will
not include the merge-base details, since the upstream repository will
not have been available.

Co-authored-by: Tim Abbott <tabbott@zulip.com>
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-05-13 11:36:12 -07:00
Tim Abbott dc33b2a515 message_controls: Show keyboard shortcut for emoji button. 2021-05-13 10:06:43 -07:00
Tim Abbott 014e8c9f6c emoji_picker: Remove title attribute hackery. 2021-05-13 10:05:11 -07:00
Tim Abbott 13a2c9712f message_controls: Remove duplicate title element. 2021-05-13 10:04:19 -07:00
Tim Abbott 889e98f467 popovers: Display move topic option to all users with permission.
Previously, the "Move topic" option was only displayed to organization
administrators, despite the new setting making who can move topics
between streams configurable.

Making this migration requires us to remove the text on the previous
"Admin actions" divider, and just make it an hrule, to avoid confusing
normal users, while still providing a hint that moving topics is a
non-personal operation.

We also change the ordering for consistency.
2021-05-13 09:22:14 -07:00
Tim Abbott 61e1f5eb37 settings: Use consistent dropdown widths for permissions. 2021-05-13 08:42:24 -07:00
sahil839 c7d4640af5 setting: Add dropdown for managing who can move messages between streams.
This commit adds the dropdown in 'Stream settings' section of organization
permissions page to control who can move messages between streams and
also hides the stream-edit UI in message-edit form accordingly.

Fixes #14499.
2021-05-13 08:42:24 -07:00
Tim Abbott 41a477bbfb lint: Fix tab-based whitespace in uploaded_files_list.hbs. 2021-05-13 08:01:47 -07:00
akshatdalton bad3fe40e5 alert_word_settings: Fix table heading.
For edit/delete actions table heading should be `Actions`.
2021-05-13 07:52:10 -07:00
akshatdalton 43498c9ebd uploaded_files_list: Reorder download and delete buttons.
The download button should come before the delete button.
2021-05-13 07:52:10 -07:00
akshatdalton 23dc3bf995 settings: Reorder edit and delete buttons.
The edit button should come before the delete button.
2021-05-13 07:52:10 -07:00
Abhijeet Prasad Bodas a377a2df8b pm_list: Use "Muted user" placeholder for muted usernames.
This also handles a few other places missed earlier like
narrow headings, beacuse they use the same function.

We already rerender the PM list for events, so there's no
need to do anything special when someone is muted/unmuted.

`people.get_full_names` is now only used in the settings pages
while creating ListWidgets etc, so we add a new test for
it to ensure coverage.
2021-05-13 07:51:21 -07:00
akshatdalton 3015837e6e linkifier: Remove unnecessary on-success update on deleting linkifier. 2021-05-12 20:32:35 -07:00
akshatdalton a3930d8804 edit_linkifier: Improve UI for error message display on modal. 2021-05-12 20:32:35 -07:00
akshatdalton 7632541afb edit_linkifier: Remove unnecessary error message display.
We want the error message that we get on editing the
linkifier to be displayed only on the edit linkifier modal.
2021-05-12 20:32:35 -07:00
Aman Agrawal 91d32b1512 recent_topics: Extend the borders to bottom of window.
When height of topics is less than window height, the borders
don't reach bottom. So, we min-height for the table to make it
span to the bottom.
2021-05-12 15:45:08 -07:00
Aman Agrawal 3cb7ffd61a hotkey: Render default_view via changing hash.
Directly rendering the default view on pressing `escape` key will lead
to default_view being rendered on the current window hash.  So, we set
empty hash to load default view and let hashchange handle it.

This fixes a bug introduced in
59a45d3521.
2021-05-12 15:24:10 -07:00
Tim Abbott 3d6af7a3c8 typeahead: Fetch stream topic history from server.
Long ago, we changed Zulip to inspect server-provided topic history in
our compose and search typeahead modules, but did not trigger a query
to the server to fetch data.

This could result in confusing experiences where someone thought that
a topic doesn't exist that just isn't present in recent history.

Once we merge this, we may want to adjust the messaging in typeahead
to advertise that the first option will create a new topic, since this
change may make it feel more like creating topics is a heavyweight
operation.

Fixes #9857.
2021-05-12 15:21:25 -07:00
Anders Kaseorg 879ca4543b favicon: Catch exceptions in update_favicon.
We’re getting unexplained exceptions from URL.createObjectURL in
Firefox 88 (#18374); contain them to this function.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-05-12 15:06:59 -07:00
Tim Abbott b67b9912c4 drafts: Fix hook for saving drafts.
Previously, the hook to save drafts when closing the compose box was a
focusout on #compose-textarea. This mostly worked, and was essentially
invisible to users (because the animation to notify you about saved
drafts was in the close_compose_ui widget that is hidden), but you'd
end up seeing the tooltip appear (in the wrong place) if you closed
the compose box immediately after sending a message with Tab+Enter.

The correct fix is for the drafts hook to be just before we start
clearing compose box state, inside hide_box.

This was difficult to catch in a development environment, since one
doesn't use that flow with "Enter sends" enabled.
2021-05-12 12:53:58 -07:00
Tim Abbott ad4c5890aa portico: Make apps selector easier to see. 2021-05-12 11:58:14 -07:00
Tim Abbott 06f1ea657e navbar: Adjust label for usage statistics. 2021-05-12 10:34:12 -07:00
Tim Abbott b0f8bbfbd4 recent_topics: Fix annoying flicker on rerendering.
We were apparently not using the ListWidget API for replacing the
content of a widget without removing the whole thing from the DOM and
replacing it.

Unless ListWidget has unexpected bugs, this should have the exact same
result as the previous logic, with much a nicer user experience.
2021-05-12 10:02:48 -07:00
Tim Abbott 4dae2c53fb recent_topics: Make muted user avatars a bit less bright. 2021-05-12 09:38:36 -07:00
Abhijeet Prasad Bodas 336b791f8b recent topics: Use tippy tooltip instead of HTML title. 2021-05-12 09:30:24 -07:00