Commit Graph

41534 Commits

Author SHA1 Message Date
Tim Abbott 42b1f4e5f5 portico: Fix visual double-quote in FHIR quote.
The <blockquote> area adds its own set of quotation marks.
2021-04-08 23:26:44 -07:00
Abhijeet Prasad Bodas 224a8e0408 mute user: Add tests for realm import.
This covers the code added in 3bfcaa3968.
2021-04-08 23:04:28 -07:00
Abhijeet Prasad Bodas 152508e346 mute user: Reduce two database fetches when unmuting to one.
Previously, when unmuting a user, we used to make
two database fetches - one to verify that the user
is has been muted before, and one while actually
unmuting the user.

This reduces that to one, by passing around the
`MutedUser` object fetched in the first round.

Since the new function returns `Optional[MutedUser]`,
we need to use a hack for events tests, because
mypy does not yet use the type inferred from
`assert foo is not None` in nested functions like lambdas.
See python/mypy@8780d45507.
2021-04-08 23:04:28 -07:00
Abhijeet Prasad Bodas 32ab9872b1 refactor: Use API instead of functions in test_muting_users.py.
Instead of using internal functions for data setup,
we use the API so that these tests are more
end-to-end.

This commit also removes a now unnecessary
`if date_muted is None` check.
2021-04-08 23:04:28 -07:00
Abhijeet Prasad Bodas b500ff39c1 refactor: Respect example user conventions in test_muting_users.py.
This makes it consistent with the rest of the codebase.
Hamlet and Cordelia are usually the main users which do
things in automated tests.
2021-04-08 23:04:28 -07:00
Abhijeet Prasad Bodas e912bee6b6 refactor: Use variables for dates in test_muting_users.py.
This cleans up some code added in 3bfcaa3968.

Also fixes some indentation to be more readable:
- `mock.patch` is in a single line.
- Dictionaries are one field per line.
2021-04-08 23:04:28 -07:00
Anders Kaseorg b060feba4c dependencies: Upgrade Source Code Pro font from Git.
This works around a bug where code text appears dark on dark in night
mode with Firefox on macOS:
https://bugzilla.mozilla.org/show_bug.cgi?id=1520157

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-04-08 22:59:24 -07:00
Anders Kaseorg b5dc35ce47 dependencies: Install source-map fork from an archive.
This is faster to install and has better caching properties.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-04-08 22:59:24 -07:00
Adam Birds 268b9446f3 docs: Update svgo path in integrations docs.
I have updated the path for the svgo module in the integrations
documentation as the other path would error out as `svgo` wasn't in
PATH, so have updated to use `yarn run svgo` instead.
2021-04-08 21:44:22 -07:00
shanukun e65e39764a refactor: Make acting_user a mandatory kwarg for do_remove_realm_domain. 2021-04-08 17:50:10 -07:00
shanukun dd0a8738a3 refactor: Make acting_user a mandatory kwarg for do_change_notification_settings. 2021-04-08 17:50:10 -07:00
shanukun 0a21476004 refactor: Make acting_user a mandatory kwarg for do_change_default_all_public_streams. 2021-04-08 17:50:10 -07:00
shanukun 8d3c6a2feb refactor: Make acting_user a mandatory kwarg for do_change_default_event_register_stream. 2021-04-08 17:50:10 -07:00
shanukun 8f70386df3 refactor: Make acting_user a mandatory kwarg for do_change_default_sending_stream. 2021-04-08 17:50:10 -07:00
shanukun 6b8dfc2888 refactor: Make acting_user a mandatory kwarg for do_change_logo_source. 2021-04-08 17:50:10 -07:00
shanukun a3ac1a6306 refactor: Make acting_user a mandatory kwarg for do_change_icon_source. 2021-04-08 17:50:10 -07:00
shanukun 0abb493626 refactor: Make acting_user a mandatory kwarg for do_delete_avatar_image. 2021-04-08 17:50:10 -07:00
shanukun 2d336d38b9 refactor: Make acting_user a mandatory kwarg for do_change_avatar_fields. 2021-04-08 17:50:10 -07:00
shanukun 0b3324ba77 refactor: Make acting_user a mandatory kwarg for do_change_subscription_property. 2021-04-08 17:50:10 -07:00
Tim Abbott a96d497fff analytics: Fix placement of envelope icons.
We neglected to update this bit of logic when migrating to have the
totals at the top of the page.
2021-04-08 17:47:34 -07:00
Tim Abbott 6b1ca15ba7 activity: Use realm owners, not realm administrators.
The analytics system was not properly updated when we replaced realm
owners with realm administrators.
2021-04-08 17:47:23 -07:00
Wesley Aptekar-Cassels e0b1818780
compose: Don't escape usernames in quote-and-reply.
This fixes a bug that breaks quote-and-replying to users with characters
like apostrophes in their usernames.

The bug was introduced in def1e01512.
2021-04-08 13:51:17 -07:00
Aman Agrawal 700cfd648c giphy: Add GIPHY picker to message edit form.
We try to keep only one instance of GIPHY popover active.
2021-04-08 10:17:20 -07:00
Aman Agrawal d4fa938a23 giphy: Convert `compose_giphy_logo` from id to class.
Since there are multiple `compose_giphy_logo` elements, we should
use it as a class as per HTML spec.
2021-04-08 10:03:51 -07:00
Aman Agrawal a2140eb9b5 giphy: Delegate `compose_giphy_logo` click handler to `body`.
This will allow us to use use this handler in places like message
edit where elements are added to the DOM later on.
2021-04-08 10:03:51 -07:00
Aman Agrawal 9c2ec9d7d7 drafts: Use tippy for tooltip.
With a tweak from tabbott to not use tippy on the entire message
content; this was a correct port of the apparent old bootstrap-tooltip
logic; however, that logic didn't actually work, so we just had
`title` behavior.

Given that showing a tooltip when hovering over the entire message
body feels wrong, we preserve the weird title behavior (which also
feels a bit off, but less so).
2021-04-08 09:52:03 -07:00
Aman Agrawal 39bcf8c55a copy_invite_link: Use tippy for tooltip. 2021-04-08 09:50:43 -07:00
Aman Agrawal 265cc17c6e tippy: Place message reaction tooltip at bottom.
This doesn't hide the message content and other reactions.
2021-04-08 09:48:44 -07:00
Aman Agrawal 0fd5bf49d6 buddy_list: Use tippy for showing tooltips.
There is no significant visual change other than arrows being
visible and the tooltip being a little darker.
2021-04-08 09:40:10 -07:00
Aman Agrawal 14d3385bfd css_variables: Directly export number values for breakpoints.
Since we need to use number values for these breakpoints directly
in some places, having `px` values exported for them is not
great as we have to write weird looking code to convert it into
number.
2021-04-08 09:40:10 -07:00
Tim Abbott 1470dd9105 api: Delete ancient fetch_google_client_id endpoint.
This was used by the old native Zulip Android app
(zulip/zulip-android).  That app has been undeveloped for enough years
that we believe it no longer functions; as a result, there's no reason
to keep a prototype API endpoint for it (that we believe never worked).
2021-04-08 06:10:39 -07:00
Tim Abbott fdf44f19b2 api: Delete ancient generate_204 endpoint.
This endpoint was needed by the ancient pre-electron desktop app
written in QT; we removed support for that in practice a long time
ago, and even the custom error messages for it in
5a22e73cc6.

So we can delete this endpoint as well.
2021-04-08 06:10:39 -07:00
Tim Abbott 0f9970fd39 test_openapi: Update comments on undocumented endpoints. 2021-04-08 06:10:39 -07:00
Sumanth V Rao 164506d950 css: Fix vertical alignment mismatch for view_in_playground button.
We'll be changing the icon and probably even doing the alignment in
a better fashion in the future, so this is just a temporary fix
till then.
2021-04-07 21:06:36 -07:00
Anders Kaseorg de014a30e0 dependencies: Upgrade JavaScript dependencies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-04-07 21:05:01 -07:00
Anders Kaseorg 566695d6e3 logos: Golf harder with svgo 2.3.0.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2021-04-07 21:05:01 -07:00
Anders Kaseorg b6b117274c install-node: Upgrade Node.js to 14.16.1 and nvm to 0.38.0.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-04-07 21:05:01 -07:00
Tim Abbott 7910a42586
docs: Create FUNDING.yml. 2021-04-07 20:15:29 -07:00
Anders Kaseorg 6bc3b267e1 webpack: Switch to css-minimizer-webpack-plugin.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-04-07 18:43:36 -07:00
Anders Kaseorg 2ce24bcd2b dependencies: Upgrade webpack-cli from 3.3.12 to 4.6.0.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-04-07 18:43:36 -07:00
Nikhil Maske 50cd868749 confirm modal: Use Confirm and Cancel label options.
Long labels like "Deactivate xyz" or "Delete xyz" can
be confusing for translators and it can also create bad
strings that can end with like 4 long words in German.
It is better to have the simple options like "Confirm"
and "Cancel". This commit fixes this issue by changing
the text to "Confirm" in their respective template files.

Fixes #17926.
2021-04-07 18:27:22 -07:00
Nikhil Maske 66fa31f85c confirm_dialog_modal: Use Confirm and Cancel label options.
Long labels like "Unstar messages" can be confusing for
translators and it can also create bad strings that can
end with like 4 long words in German. It is better to
have the simple options like "Confirm" and "Cancel".
This commit fixes this issue by changing such text
to "Confirm" as default in confirm_dialog_modal.

Part of #17926.
2021-04-07 18:27:18 -07:00
Aman Agrawal 66c359b1d5 settings: Use tippy for tooltip. 2021-04-07 17:58:56 -07:00
Aman Agrawal 0e32454b1d message_reaction: Calculate and render tooltip using tippyjs.
Tippyjs automatically places it to bottom.

NOTE: placement of tooltip is changed from 'bottom' to `auto`.
Custom css was set here to avoid tooltip being partially hidden
on small screens. This change automatically takes care of it
by showing the tooltip on right side of message_reaction on
small screens if it is partially hidden from the left or
vice versa.
2021-04-07 17:38:40 -07:00
Aman Agrawal 487fcb6a3c reaction_button: Use tippy for tooltip.
Tippyjs automatically places it to bottom.
2021-04-07 17:38:40 -07:00
Aman Agrawal dd35c3ba05 message_controls: Use tippy for tooltip. 2021-04-07 17:38:40 -07:00
Aman Agrawal 3ef6655e79 message_view_header: Remove not used tooltip dataset.
We certainly don't need a tooltip for narrow description.
2021-04-07 17:38:40 -07:00
Aman Agrawal 533d011292 message_view_header: Use tippy for tooltip. 2021-04-07 17:38:40 -07:00
Aman Agrawal ffeb29db6a stream_settings: Use tippy for tooltip. 2021-04-07 17:38:40 -07:00
Aman Agrawal 93b852ea37 stream_types: Use tippy for tooltip. 2021-04-07 17:38:40 -07:00