Commit Graph

48740 Commits

Author SHA1 Message Date
Anders Kaseorg afccebc1ee install-node: Upgrade Node.js from 16.17.0 to 18.10.0.
Although Node.js 18 is not the active LTS release for another 3 weeks,
the Node.js 16 end-of-life date was moved forward to September 2023,
(https://nodejs.org/en/blog/announcements/nodejs16-eol/), so it seems
prudent to switch now.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-10-11 10:50:57 -07:00
Anders Kaseorg 9cb908682b test_script: Run Puppeteer install.js in its own cwd.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-10-11 10:50:57 -07:00
Anders Kaseorg 0027d7dea7 test_script: Move Puppeteer downloads outside node_modules.
This way Puppeteer doesn’t have to re-download Chromium every time we
install new JavaScript dependencies.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-10-11 10:50:57 -07:00
Anders Kaseorg e0032223c8 test_script: Correct glob for puppeteer failure screenshots.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-10-11 10:50:57 -07:00
Aman Agrawal 5fc5aa8625 communities: Add more space between realm rows. 2022-10-11 10:49:33 -07:00
Mateusz Mandera 470c0458e6 do_deactivate_user: Use .on_commit around send_event calls.
The previous commit did this for revoking sessions. send_events should
be handled similarly too, to correctly handle calling do_deactivate_user
inside a transaction.
2022-10-11 10:49:07 -07:00
Mateusz Mandera a94b2572be do_deactivate_user: Revoke sessions in transaction.on_commit().
Fixes #21709.
2022-10-11 10:49:07 -07:00
Lauryn Menard aaefe700b9 analytics: Remove help link at bottom of `/stats/` page.
Removes the help center article linked to on the `/stats/` page,
because it doesn't have any useful information once the user is
already viewing the analytics page.
2022-10-11 10:47:58 -07:00
Aman Agrawal c1dfa1fd11 error_pages: Fix content overlapping with header.
We add top margin to the error pages whose content was overlapping with
the page header.
2022-10-10 08:59:51 -07:00
sofbe f87f27f9d0 settings: Create a new "Message deletion" section.
Create a new section under "Message editing" and move
"Who can delete their own messages" and
"Time limit for deleting messages" to the new section.
Remove "i" tooltips next to them. Add a label to the
new section "Administrators can delete any message."

Fixes part of #22892.

settings: Add widgets to the new section "Message deletion".
Forgot to add settings_save_discard_widget to last commit.
This commit add two buttons when a change is made to the
subsections.

Fixes part of #22892.
2022-10-10 08:52:36 -07:00
Alex Vandiver ed19361838 puppet: Upgrade puppetlabs libraries. 2022-10-10 08:46:29 -07:00
Alex Vandiver 993fdc3311 bootstrap-awscli: Upgrade awscli version. 2022-10-10 08:46:29 -07:00
Alex Vandiver 798ab420db puppet: Update third-party package versions. 2022-10-10 08:46:29 -07:00
Anders Kaseorg 6d19256877 notes: Separate __notes_map per-subclass.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-10-10 08:42:13 -07:00
Anders Kaseorg 1385a827c2 python: Clean up getattr, setattr, delattr calls with literal names.
These were useful as a transitional workaround to ignore type errors
that only show up with django-stubs, while avoiding errors about
unused type: ignore comments without django-stubs.  Now that the
django-stubs transition is complete, switch to type: ignore comments
so that mypy will tell us if they become unnecessary.  Many already
have.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-10-10 08:40:28 -07:00
Anders Kaseorg 5e1ebf2861 python: Fix __dict__ mutation abuse.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-10-10 08:33:08 -07:00
Anders Kaseorg b45484573e python: Use format string for logging str(obj).
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-10-10 08:32:29 -07:00
Anders Kaseorg fcd81a8473 python: Replace avoidable uses of __special__ attributes.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-10-10 08:32:29 -07:00
Alya Abbott 73219dd49b help center: Document new "Pronouns" custom profile field type. 2022-10-07 16:48:04 -07:00
sayamsamal 19e292989c misc: Improve app title bar for stream and topic views.
We want to be able to differentiate between the stream and the topic
in the title bar, but the current implementation displays both the
steam name and the topic name in the same way which becomes difficult
to comprehend at a glance.

In this commit, we make the following changes,

- <stream_name> to #<stream_name> (when viewing the entire stream)

- <topic_name> to #<stream_name> > <topic_name> (when viewing a topic)

These changes help us differentiate between a stream and a topic with
with a quick glance.

Fixes #22969.
2022-10-07 16:43:50 -07:00
Zixuan James Li a98330b000 docs: Fix a typo in mypy documentation.
Signed-off-by: Zixuan James Li <p359101898@gmail.com>
2022-10-07 16:43:14 -07:00
Yogesh Sirsat 8b6976331a popovers: Redesign user info popover.
Following the addition of support for custom profile fields in the
user info popovers, we redesign the popover to have a cleaner look.

* Switch top section design from centered to left-aligned.
* Move mute/unmute and manage user options behind a \vdots menu.
* Move the local time and status into a new block.

Almost all design changes ideas are from discussion on chat.zulip.org;
see "#design > pronouns in profile card" for details.

Co-authored-by: evykassirer <evy.kassirer@gmail.com>
Co-authored-by: Tim Abbott <tabbott@zulip.com>
2022-10-07 15:52:23 -07:00
Tim Abbott eb6ca14377 popovers: Change icons for user popover private message options.
We've decided to standardize on the envelope icon for viewing private
messages; certainly that feels more natural than the lock, which we
use for private streams. And then to avoid duplicates, we change the
existing envelope to a chat bubble.
2022-10-07 15:29:12 -07:00
Prakhar Pratyush 2f5912472c templates: Improve text on 500 error pages.
Makes the 500 error page text conditional on whether the server is
self-hosted or Zulip Cloud.

In the case of Zulip Cloud, when `settings.CORPORATE_ENABLED` is true,
the text provides an email address to contact Zulip support.

In the case of self-hosted, when `settings.CORPORATE_ENABLED is false,
the text provides an email address to contact server administrators
and a link to Zulip's server troubleshooting guide.

Fixes #23063.
2022-10-07 15:20:19 -07:00
David Rosa 79084d0b47 help: Document option to display custom profile fields in profile summary.
Adds a section explaining what this option is and how to manage it
via the settings table.

Fixes: #23018.
2022-10-07 14:27:10 -07:00
David Rosa 0c80eeffd4 help: Update instructions for adding a new custom profile field.
Fixes part of #23018.
2022-10-07 14:27:10 -07:00
Lauryn Menard fdc1335e3a analytics: Move range selector buttons and hover information.
Because some button text is much longer in different languages,
there is an existing  bug when the charts are rendered with the
range selector buttons positioned on the right side of the chart.

This positions the range selector buttons to the left side of the
chart and the hover information to the right side of the chart.

For the pie charts and horizontal bar chart, the grouping buttons
labeled "Me" and "Everyone" are moved to the top of the chart, which
matches the grouping buttons on the vertical bar charts.

Adjusts some chart margins for new positioning of buttons and hover
information. Deduplicates some shared code for rangeselector buttons
in `stats.js` for the three vertical bar charts.
2022-10-07 11:34:01 -07:00
Lauryn Menard 687160432c analytics: Update font-family used in stats charts.
Updates the font-family and font-size for plotly charts so that
the text in some legends is no longer cut off.

Updates the tick angles of the vertical bar charts so that the
x-axis text never becomes angled when moving the rangeslider.

Fixes #18912.
2022-10-07 11:34:01 -07:00
Lauryn Menard 6c48475e3e analytics: Make the "Me" hover consistent with other categories.
The text for hovering over "Bot" or "Everyone" in the bar charts are
`<b>` HTML elements. This makes the "Me" hover consistent with the
other categories.
2022-10-07 11:34:01 -07:00
Lauryn Menard cdcef8b814 analytics: Remove "Aggregation" labels from stats page. 2022-10-07 11:34:01 -07:00
Lauryn Menard 396c7c3046 analytics: Remove unused CSS styling for `hr` tags.
There are no `<hr>` HTML tags in the stats / analytics page, so
removes the unused CSS rules for these elements.
2022-10-07 11:34:01 -07:00
evykassirer 61a782d252 drafts: Don't update draft count when successfully sending messages.
Fixes #21757.

Previously the draft count would briefly increase between the action
of sending a message and the success of sending that message.
Now the draft count will only increase if the message fails to send.
2022-10-07 11:26:36 -07:00
Mateusz Mandera cefed552f6 test_slack_importer: Add assertion about message count.
This will help catch any future regression that might lead the import
tool to fail to import messages into the correct realm.
2022-10-07 10:10:01 -07:00
Mateusz Mandera 42b3575183 models: Make Message.realm and ArchivedMessage.realm non-null.
In the previous commits, these have been backfilled, so now we can
enforce non-nullable.
2022-10-07 10:10:01 -07:00
Mateusz Mandera c1e701ec22 migrations: Add migration to backfill Message.realm. 2022-10-07 10:10:01 -07:00
Mateusz Mandera 00b3546c9f models: Add denormalized .realm column to Message.
This commit adds the OPTIONAL .realm attribute to Message
(and ArchivedMessage), with the server changes for making new Messages
have this set. Old Messages still have to be migrated to backfill this,
before it can be non-nullable.

Appropriate test changes to correctly set .realm for Messages the tests
manually create are included here as well.
2022-10-07 10:09:38 -07:00
Mateusz Mandera a4008d938a test_soft_deactivation: Add docstring explaining send_fake_message. 2022-10-07 10:09:38 -07:00
Lauryn Menard df7a1cec93 analytics: Add summary statistic for upload/storage space in use.
Adds the realm's used storage space for attachments to the stats
view `page_params`. This information is then added to the summary
statistics section of the analytics page after being formatted by
`stats.js`.

Uses the emoji test image to create an `Attachment` in the database
for the analytics realm. Even though it doesn't create a message
to claim the attachment, it still is sent as storage space used
data for the analytics `/stats/` page.
2022-10-07 10:08:09 -07:00
Anders Kaseorg 3417bb4c28 requirements: Upgrade Python requirements.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-10-07 10:03:51 -07:00
Anders Kaseorg 133c8b16ed requirements: Upgrade openapi-core.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-10-07 10:03:51 -07:00
Anders Kaseorg ba3aefc3d1 openapi: Set x-model: dict for objects used as associative arrays.
This works around an openapi-core bug.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-10-07 10:03:51 -07:00
Aman Agrawal 87316a777a css: Fix background color of date_row in unread PMs.
This was a regression introduced in the commit
a80500cf5d
where we forgot to change the color of for unread PM date rows
while change the color for the date row of unread stream messages.
2022-10-07 09:54:42 -07:00
Aman Agrawal 06a9ceb911 popovers: Hide mark as unread button for spectators.
Since spectators cannot mark messages as unread, hide this button
in message actions popover.
2022-10-07 09:53:37 -07:00
Sahil Batra da8817889b settings: Check "display_profile_in_summary" for Pronouns type field.
While creating a pronouns type field, "display_in_profile_summary"
checkbox is checked by default for "Pronouns" type field if the
limit is not reached.

Fixes #21271.
2022-10-06 17:56:26 -07:00
Sahil Batra 12ba5cb814 settings: Add default label and hint when creating "Prounouns" custom field.
Label and hint can be edited, but we just fill it by default values for
convenience.
2022-10-06 17:56:26 -07:00
Sahil Batra aaa5d5cb0e settings: Show typeahead for pronouns type custom profile field.
User can add any pronouns in this field, but we just show some
commonly used pronouns as suggestions in typeahead.
2022-10-06 17:56:26 -07:00
Sahil Batra 2bf70fe4db custom_profile_field: Add "Pronouns" custom field type.
This commit adds "Pronouns" custom profile field type. We also
add "Pronouns" type field in the development environment
2022-10-06 17:56:26 -07:00
Aman Agrawal ab9c5ae482 actions_popover: Only wrap content to next line on small width.
Fixes #23017

We try to keep the width of actions popover at `max-content` till
small widths.
2022-10-06 16:58:33 -07:00
Zixuan James Li dd1f8c6bfb docs: Add a section on django-stubs.
This adds examples for QuerySet, ValuesQuerySet, TestHttpResponse, which
are some common examples that need a bit of extra care when typing.

Signed-off-by: Zixuan James Li <p359101898@gmail.com>
2022-10-06 16:29:30 -07:00
Zixuan James Li 8e472402fe docs: Add an example for read-only types.
Signed-off-by: Zixuan James Li <p359101898@gmail.com>
2022-10-06 16:18:58 -07:00