Commit Graph

51562 Commits

Author SHA1 Message Date
Tim Abbott 611cee177d deliver_scheduled_messages: Rename misleading message variable. 2023-05-09 13:48:28 -07:00
Hardik Dharmani 697cdb31e5 message_headers: Abbrevate direct message recipient names.
Abbrevated DM recipient names in message feeds, Drafts and Scheduled
messages overlays by wrapping recipient names in span with class
private_message_header_name and applying `overflow: hidden` and
`text-overflow: ellipsis` CSS to it.

Fixes #25353
2023-05-09 13:43:40 -07:00
Hardik Dharmani 99a988e220 message_header: Abbreviate topic names in all overlays.
Fixes #25353
2023-05-09 13:43:40 -07:00
Alex Vandiver 1285c39098 zerver: Remove now-unused report/ endpoints. 2023-05-09 13:16:28 -07:00
Alex Vandiver 64b277d845 blueslip: Reduce cardinality of blueslip.error() calls.
Particularly when grouping in Sentry, pushing the ids and such into
the additional data section helps group like errors together better.
2023-05-09 13:16:28 -07:00
Alex Vandiver 1769f981da blueslip: Show more-info context in alert popup, if we have it. 2023-05-09 13:16:28 -07:00
Alex Vandiver 5d97dbf8b3 zblueslip: Show chained causes in unexpected messages. 2023-05-09 13:16:28 -07:00
Alex Vandiver fa92895731 blueslip: Support nested Error objects by .cause. 2023-05-09 13:16:28 -07:00
Alex Vandiver 8e3a6d17bd blueslip: Move BlueslipError into blueslip_stacktrace.ts.
Its existence is purely to add more context when displaying the
stacktrace.
2023-05-09 13:16:28 -07:00
Alex Vandiver 591b800ba4 blueslip: Pass original exception down into BlueslipError, if present. 2023-05-09 13:16:28 -07:00
Alex Vandiver 7898818983 blueslip: Pass the Error around, rather than re-creating a dummy one. 2023-05-09 13:16:28 -07:00
Alex Vandiver 52c613471a blueslip: Add a more specific type. 2023-05-09 13:16:28 -07:00
Alex Vandiver 086e64dfe4 blueslip: More tightly annotate more_info. 2023-05-09 13:16:28 -07:00
Alex Vandiver fea5a3fdb8 sentry: Always capture an Error, rather than a string.
We pass the original exception down as the `cause`, if present.  This
makes Sentry properly capture the callstack.
2023-05-09 13:16:28 -07:00
Alex Vandiver 9d6ca32c59 sentry: Annotate all channel calls. 2023-05-09 13:16:28 -07:00
Alex Vandiver c67cd5adb4 sent_messages: Remove from cache when message has been fully received.
There is no reason to keep these messages in a local memory store once
we have completed sending them and seen their events.
2023-05-09 13:16:28 -07:00
Alex Vandiver 3cc2adcd3b sentry: Switch to using Sentry spans for message send timings. 2023-05-09 13:16:28 -07:00
Alex Vandiver 00ea197744 sentry: Switch to using Sentry spans for narrow/unnarrow timings. 2023-05-09 13:16:28 -07:00
Alex Vandiver 3ab22233f0 sentry: Add tracing extensions when Sentry is not enabled. 2023-05-09 13:16:28 -07:00
Alex Vandiver 8089cb70dd sentry: Don't create spans for the longpoll or presence.
These will help Sentry skip span creation for these requests, which
are background events and not part of the pageload time.
2023-05-09 13:16:28 -07:00
Alex Vandiver 37c3cfb348 sentry: Do not start a navigation transaction on hash change. 2023-05-09 13:16:28 -07:00
Alex Vandiver 768ab19cd3 sentry: Do some basic URL client-side aggregation.
Doing client-side aggregation is better than letting Sentry try to
guess the grouping.  While ideally this would be generated from the
Django routes, automatically parsing those to generate a route map is
quite difficult.  We include basic numerical groupings, as well as the
few paths which have Confirmation objects.
2023-05-09 13:16:28 -07:00
Alex Vandiver bfdc057e3a sentry: Tag JS reports with the user's role.
User attributes are not indexed and searchable, unlike tags.
2023-05-09 13:16:28 -07:00
Alex Vandiver e2a6a0c440 sentry: Stop importing from `@sentry/tracing`, which is deprecated.
This was deprecated in 7.47.0[^1].

[^1]: https://github.com/getsentry/sentry-javascript/releases/tag/7.47.0
2023-05-09 13:16:28 -07:00
Alex Vandiver cadfbcac76 dependencies: Upgrade Sentry libraries. 2023-05-09 13:16:28 -07:00
Alex Vandiver a9f51a0c02 static: Add Timing-Allow-Origin: * to allow sentry data timing.
This is required for the browser to provide detailed timing
information about resource fetches from other domains[^1].

[^1]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Timing-Allow-Origin
2023-05-09 13:16:28 -07:00
Lauryn Menard e44520c8fe scheduled-messages: Limit `to` parameter to user and stream IDs.
For scheduled stream messages, we already limited the `to`
parameter to be the stream ID, but here we return a JsonableError
in the case of a ValueError when the passed value is not an integer.

For scheduled direct messages, we limit the list for the `to`
parameter to be user IDs. Previously, we accepted emails like
we do when sending messages.
2023-05-09 12:45:11 -07:00
sbansal1999 63fcfd543a integrations: Add documentation for Notion-Zapier Integration.
Fixes #25314.
2023-05-09 12:25:18 -07:00
sbansal1999 6e2423fe64 integrations: Update text in Zapier Documentation.
This commit updates the text to match the current version
displayed on the website.
2023-05-09 12:25:18 -07:00
Hardik Dharmani 3a358a9a11 tooltips: Shift all tooltip templates to tooltip_templates.hbs.
Refactored all tooltip templates with static content to be in
tooltip_templates.hbs to avoid duplicate IDs and DOM element.

Fixes #25324
2023-05-09 11:10:58 -07:00
Lauryn Menard df17a1bf28 test-events: Test do_delete_message with no messages specified.
Test coverage for `zerver/actions/message_delete.py`.

Both callers of this function would already return if there were
no Messages specified to delete, which is why existing tests did
not cover this.
2023-05-09 09:58:33 -07:00
Hardik Dharmani 7ccfed65e8 tables: Fix table column dimensions on hover. 2023-05-09 09:41:34 -07:00
PALASH BADERIA f93cf330d4
mailmap: Add entry for Palash Baderia. 2023-05-09 09:39:46 -07:00
Alex Vandiver 89d4737ab2 message_edit: Do not reuse user_profile variable in "for" loop.
Doing so causes the "username resolved this topic" or "this topic was
moved by username" notifications to be attributed to a random user who
had a visibility policy on the topic.
2023-05-09 09:38:38 -07:00
Tim Abbott cce0c57a04 test-backend: Actions files should target full coverage.
We neglected to add this pattern when we split actions.py into a
directory.
2023-05-09 08:09:17 -07:00
Satyam Bansal 7f7c447d73 mailmap: Add entry for Satyam Bansal. 2023-05-09 07:47:44 -07:00
Tim Abbott f6b7d8e561 mailmap: Add many mailmap entries. 2023-05-09 07:46:03 -07:00
Joelute 591ac8570c mailmap: Add entry for Joseph Ho. 2023-05-09 07:38:10 -07:00
Ujjawal Modi 71bc4e831f mailmap: Add entry for Ujjawal Modi. 2023-05-09 07:36:24 -07:00
Lauryn Menard 02fafb0376 models: Update the references for API dicts for scheduled messages. 2023-05-09 07:36:05 -07:00
Mateusz Mandera 682a4d6f9e import_realm: Improve comment about sequencing of imported models.
The comment was outdated, currently we import UserProfiles before
realm_tables - because some models in realm_tables have a dependency on
UserProfile.

Also makes sense to elaborate a bit more in the comment that it's just
an outline of the ordering, not an exhaustive list.
2023-05-08 15:55:06 -07:00
Mateusz Mandera 0abf60fd01 scheduled_message: Make export/import work.
Closes #25130 by addressing the import/export part of it.
2023-05-08 15:55:06 -07:00
Mateusz Mandera 780ef71891 export: Fix typo in variable name. 2023-05-08 15:55:06 -07:00
Joelute 245c855376 user_setting: Update wording for "Mark messages as read on scroll" setting.
Previously, the user setting "Mark messages as read on scroll" sounded
quite awkward and possibly confusing at times. We should update the text
to something more clear and concise. This change will change "Mark messages
as read on scroll" to "Automatically mark messages as read".

The help center article is also fixed to name which setting is being
adjusted.
2023-05-08 15:49:47 -07:00
Tim Abbott 9e5c1eff4b scheduled messages: Fix incorrect mapping of 4PM to 16:00 hours. 2023-05-08 15:10:52 -07:00
Karl Stolley 466422800a scheduled_messages: Allow Today scheduling thru :54 past the hour.
This PR allows users to schedule Today messages from the modal opts
thru 8:54am (8:54) for sending at 9:00am, and thru 3:54pm (15:54) for
sending at 4:00pm. (That's including up to :59 seconds, of course, on
:54 after. So, XX:54:59.)

We also correct tests that were verifying incorrect logic of expecting
a 2PM cutoff, when we intended 4PM.

Fixes first part of #25451.
2023-05-08 15:10:52 -07:00
Karl Stolley a318e7cbf4 scheduled_messages: Don't offer to reschedule in the past.
This introduces a function that checks for both the existence and the
expiration of the `selected_send_later_timestamp`.

The logic it supports prevents users from scheduling a message to send
in the past or less than five minutes into the future at the level of
the UI (specifically the popover on the \vdots component of the Send
button). That can happen if a user attempts to edit a previously
scheduled message.

Fixes #25439.
2023-05-08 15:10:52 -07:00
Joelute 90bf36887a unread_banner: Update link on unread banners to direct users to setting.
Previously, the link on the unread banners redirected users to the help
center, instead we should change it so that it opens the display settings
up.
2023-05-08 15:00:20 -07:00
Joelute 9cabdf2033 dark_theme: Add dark themed colors to notice/info banners.
Previously, infomational banners didn't have any dark theme stylings which
resulted in a messy and terrible contrast with the dark themed app. These
changes adds those missing styles and uses the same stylings and colors
as the compose banners. Thus, making a definite improvement then before.
2023-05-08 15:00:20 -07:00
Hardik Dharmani 877c72add8 mailmap: Add entry for Hardik Dharmani. 2023-05-08 14:46:25 -07:00