Commit Graph

51435 Commits

Author SHA1 Message Date
Aman Agrawal ddc1406090 css: Fix unread indicator being partially displayed on date_row.
Add a border to the left of date row to override the unread
indicator.
2023-05-09 16:25:28 -07:00
evykassirer c578a38423 navbar: Widen navbar to fill the full screen on large screens.
Now that the navbar is a different color, we want it to also
take up the full width of the screen. Because the navbar has
margin, this commit adds a new div. To not have to add a new
div, the scrollbar would need to be moved to the `html`
element, which is a bigger project.

This commit also moves the zulip logo to be left-justified instead
of centered, since it looks strange centered with the full
width navbar.
2023-05-09 16:25:28 -07:00
evykassirer e026aa1217 UI redesign: Change background color.
Fixes: #21750
2023-05-09 16:25:28 -07:00
Anders Kaseorg cc2278d6e2 app: Make automatic-scheme loading colors consistent with light/dark.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-05-09 15:58:54 -07:00
Tim Abbott 77ac1a10de compose: Collapse recipient widget with few options.
This looks visually nicer, and I think is necessary to merge it for
now, but I'm doing this as a separate commit so it's easy to revert if
we change our mind.
2023-05-09 14:11:26 -07:00
Aman Agrawal d64ad8653b edit_bot_form: Use new tippy dropdown for selecting bot owner. 2023-05-09 14:11:26 -07:00
Aman Agrawal 8ea59f7f02 compose: Use tippy for stream select dropdown.
Fixes #25434
2023-05-09 14:11:26 -07:00
Aman Agrawal a196b949f7 dropdown_widget: Implement dropdown widget using tippy.
This will soon replace DropdownListWidget.
2023-05-09 14:11:26 -07:00
Hardik Dharmani bb78d9741f move_modal: Focus input in "Move messages" and "Move topic" modals.
If user has permissions to move the message(s) to a different stream
and can't edit topic name then focus stream input; else, focus topic
input on "Move messages" and "Move topic" modals render by
`ui_util.place_caret_at_end($(".move_messages_edit_topic")[0])` to
position the cursor at end on focus.

Wrapped if else logic in function focus_on_move_modal_render()
and passed it to on_shown parameter of dialog_widget.launch()
to focus stream/topic input once widget is rendered.

Fixes #24805
2023-05-09 13:51:07 -07:00
Hardik Dharmani cfbcbe901a topic_edit: Rename `inline_topic_edit` to `move_messages_edit_topic`.
In move_topic modal, Renamed inline_topic_edit to
move_messages_edit_topic to be more specific selector as
inline_topic_edit is also used in message header.

Additionally, Removed id inline_topic_edit as it was only used
in zulip.css instead used `.inline_topic_edit` selector as that
element also have class with same name inline_topic_edit.

Fixes #24805
2023-05-09 13:51:07 -07:00
Aman Agrawal f025415f2b scheduled_messages: Add tests for delivery of scheduled messages. 2023-05-09 13:48:28 -07:00
Tim Abbott 602e4c2aa3 scheduled_messages: Add focused scheduled message indexes. 2023-05-09 13:48:28 -07:00
Tim Abbott 835f62617e scheduled_messages: Store the final delivered message ID.
This could be useful for debugging problems with the system
operationally.
2023-05-09 13:48:28 -07:00
Tim Abbott fe9656237e scheduled_message: Move remaining logic out of management command.
While this doesn't include tests yet, it will make it much easier to
write tests for the core server logic here.
2023-05-09 13:48:28 -07:00
Tim Abbott e0f6a7a48d scheduled_messages: Avoid hardcoding minimum delay.
This deduplicates the 5 minutes calculation across the scheduled
messages code path.
2023-05-09 13:48:28 -07:00
Tim Abbott 20be0759b5 scheduled_message: Avoid delivering scheduled messages late. 2023-05-09 13:48:28 -07:00
Tim Abbott a065576db7 scheduled messages: Call check_message at send time. 2023-05-09 13:48:28 -07:00
Tim Abbott 7051d3416b scheduled_messages: Add reasonable failure handling.
Previously, it seemed possible for the scheduled messages API to try
to send infinite copies of a message if we had the very poor luck of a
persistent failure happening after a message was sent.

The failure_message field supports being able to display what happened
in the scheduled messages modal, though that's not exposed to the API
yet.
2023-05-09 13:48:28 -07:00
Tim Abbott 147e296e0a scheduled_messages: Add defensive assert for double sends. 2023-05-09 13:48:28 -07:00
Tim Abbott 24bb03c89f scheduled_messages: Add logging on successful send. 2023-05-09 13:48:28 -07:00
Tim Abbott 1fc6ed224a scheduled_messages: Remove batching logic.
The previous logic would attempt to send a large number of unrelated
messages in a single transaction, which is just asking for trouble in
the event that one of the attempts fails.
2023-05-09 13:48:28 -07:00
Tim Abbott d1dfab5b70 scheduled_messages: Live update #scheduled view after sending.
We apparently had neglected to send the actual event to clients that
the message was successfully sent.
2023-05-09 13:48:28 -07:00
Tim Abbott c8f3443fb6 schedules_messages: Move logic out of management command. 2023-05-09 13:48:28 -07:00
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