Commit Graph

50238 Commits

Author SHA1 Message Date
Aman Agrawal 30719c9057 portico: Fix portico footer broken on mobile widths.
I am not sure why I added this change in flex-direction
but right now, it doesn't seem to be correct since it force
the footer to overflow mobile width.
2023-02-28 16:52:47 -08:00
Lauryn Menard d851662008 demo-orgs: Fix link to help center in Welcome bot message.
The inital Welcome bot message has an extra section if the user is
joining a demo organization, but the link in that section was not
being formatted correctly. Fixes the formatting so that the link
works.
2023-02-28 16:52:20 -08:00
Mateusz Mandera f0f02d05ab send_message_backend: Remove the realm_str API param.
This already became useless in 6e11754642,
as detailed in the API changelog entry here. At this point, we should
eliminate this param and the weird code around it.

This commit also deletes the associated tests added in
6e11754642, since with realm_str removed,
they make no sense anymore (and actually fail with an OpenAPI error due
to using params not used in the API). Hypothetically they could be
translated to use the subdomain= kwarg, but that also doesn't make
sense, since at that point they'd be just testing the case of a user
making an API request on a different subdomain than their current one
and that's just redundant and already tested generally in
test_decorators.
2023-02-28 12:12:15 -08:00
Mateusz Mandera 82379c31e4 send_message_backend: Set the realm value passed down to check_message.
This leftover variable, as a result of older changes, was just always
set to None. That was fine, because when realm=None reaches
check_message further down the codepath, it just infers from
sender.realm. We want to stop passing None like that though, so let's
just set this to user_profile.realm.
2023-02-28 12:12:15 -08:00
Lauryn Menard 514e5b990e templates: Update `reset_done.html` page text and title.
Updates the text and title used when the password reset done page
to work for situations where the user is resetting a forgotten
password and for situation where the user is setting a password
for the first time (e.g. SSO login, demo organizations).
2023-02-28 11:45:01 -08:00
Lauryn Menard 8eaac945b2 integrations-docs: Fix indentation issues in existing documentation.
Fixes some integrations documentation so that code blocks and
images are rendered in the correct HTML list elements.
2023-02-28 11:31:12 -08:00
Lauryn Menard 839bc7f3a3 api-docs: Fix changelog formatting for feature level 165. 2023-02-28 11:28:59 -08:00
Alex Vandiver e7fabb45f2 puppet: Pin with sha256sum verification. 2023-02-28 00:04:39 -05:00
Alya Abbott c3bcbfb484 portico: Clarify encryption at rest information on /security. 2023-02-27 19:16:42 -08:00
Alex Vandiver 015a10637b docs: Document how to use SMTP without authentication.
This is the behaviour inherited from Django[^1].  While setting the
password to empty (`email_password = `) in
`/etc/zulip/zulip-secrets.conf` also would suffice, it's unclear what
the user would have been putting into `EMAIL_HOST_USER` in that
context.

Because we previously did not warn when `email_password` was not
present in `zulip-secrets.conf`, having the error message clarify the
correct configuration for disabling SMTP auth is important.

Fixes: #23938.

[^1]: https://docs.djangoproject.com/en/4.1/ref/settings/#std-setting-EMAIL_HOST_USER
2023-02-27 11:59:48 -08:00
Ilikepizza2 caab470656 left sidebar: Scroll to current PM conversation on narrow.
Zulip has long had the behavior that opening a stream or topic via
narrowing automatically scrolled the left sidebar to the conversation,
so that you can see it and adjacent ones readily.

When we moved private messages into the left sidebar, we didn't
implement this similar behavior; this resulted in users having to
manually scroll the sidebar in order to browser private message
conversations.

Fix this by using the standard scroll_util helpers, with some extra
care to expand the heading when going to "all private messages".

Fixes #23609.

Co-authored-by: Tim Abbott <tabbott@zulip.com>
2023-02-27 11:58:53 -08:00
Joelute 4c6f85727c documentation: Add horizontal scrollbar to code blocks in help center.
Some code blocks in the help center have lines that are too long
to fit, and wrap onto the next line. This can look awkward, and
may cause confusion. An horizontal scroll bar is added to the code
blocks to help fit everything into their own lines and clear up
confusions.

Fixes #24004.
2023-02-27 11:52:01 -08:00
Alya Abbott a4265a0c2a docs: Clarify where GSoC/Outreachy applicants should post intros. 2023-02-27 11:49:56 -08:00
Anders Kaseorg cdfa294b9a alertmanager: Indent a documentation code block into its list item.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-02-27 11:49:36 -08:00
Ganesh Pawar 537617b46d invite_user: Convert overlay to `dialog_widget`.
Fixes #22957.
2023-02-26 18:37:05 -08:00
Daniil Fadeev a0d15f3029 i18n: Localize date and time displays across the app.
Implemented date localization using native Intl object.
Created special function get_localized_date_or_time_for_format
Made necessary string formatting changes in 'timerender.ts'.
Fixed tests and added some localization tests too.

Tested on my local development server, with some random languages.

Fixes #23987.
2023-02-26 17:43:47 -08:00
Alex Vandiver fe654b76b7 data_import: Stop tar'ing up converted data.
`./manage.py import` does not take a tarball; it takes a directory.
Making a separate tarball is a waste of CPU time and disk, as it is
never used.

This was included in the commit of the initial Slack conversion code
in 5b37c5562b and propagated from there into every conversion tool.

Remove the unnecessary tarball creation.
2023-02-26 17:42:01 -08:00
Alex Vandiver 6969a6a92d docs: Update instructions for realm deletion to use management command.
This documentation was written in 9ece4c9f51, which predated the
`./manage delete_realm` command added in bff503feb4.
2023-02-26 17:11:07 -08:00
Alex Vandiver 52b8a84219 models: Drop unique index on user/message/emoji_name.
c7d0192755 added the unique constraint on
`user_profile_id,message_id,reaction_type,emoji_code`, but left the
existing constraint on `user_profile_id,message_id,emoji_name`.  As
explained in the comment added in 3cd543ee98, `emoji_name` cannot be
trusted to be unique, as it is possible to have an Unicode emoji
reaction and a custom emoji with the same name on a message.

Remove the overly-constraining unique index, now that c7d0192755 has
provided the correct one.
2023-02-26 17:10:01 -08:00
Aman Agrawal b0d9b319e3 message_row: Allow time row to expand if it needs more width.
While setting a min-width according to the current width, we allow
the time column to expand if the translated `AM/PM` time needs
more width.
2023-02-26 17:05:01 -08:00
m-e-l-u-h-a-n a200932dcc user groups: Send only updated attribute for user group updates.
Earlier PATCH user_groups/<int:user_group_id> required
both name and description parameters. So we had to send
them in patch requests even if just one of the attribute
was updated.

As the endpoint is now updated we send only those parameters
that are changed.
2023-02-26 16:22:24 -08:00
m-e-l-u-h-a-n ab4e6a94c5 user groups: Make name and description optional in group update.
View that handled `PATCH user_groups/<int:user_group_id>` required
both name and description parameters to be passed. Due to this
clients had to pass values for both these parameters even if
one of them was changed.

To resolve this name description parameters to
`PATCH user_groups/<int:user_group_id>` are made optional.
2023-02-26 16:22:24 -08:00
Lalit 508ac58dc0 stream_muting: Add `mark_read: false` option when re-selecting message.
Added `mark_read: false` as it doesn't make sense to
read/undread a message when just muting or unmuting a stream.
It is to make sure that we never consume a unread message
when just muting/unmuting streams.
2023-02-26 16:19:28 -08:00
Lalit 1cb4886a23 stream_muting: Fix message reselect bug.
Extended else if statement responsible for reselecting messages
to include check `!recent_topic_util.is_visible()`.

Before without this check, this code was consuming 1 unread
message on muting/unmuting a stream even when we were in
"Recent Conversations" view.
2023-02-26 16:19:28 -08:00
Anders Kaseorg 3a9fb767ea ts: Convert bundles to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-02-25 15:40:31 -08:00
Anders Kaseorg 96fadb3d66 ts: Convert trivial portico modules to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-02-25 15:40:31 -08:00
sbansal1999 2fa61bcec3 ts: Convert analytics/support.js to TypeScript. 2023-02-25 11:35:01 -08:00
sbansal1999 87d6180763 ts: Convert analytics/activity.js to TypeScript. 2023-02-25 11:34:56 -08:00
Anders Kaseorg a2ea5e8598 test-js-with-node: Fix source maps for coverage.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-02-24 13:54:29 -08:00
Lauryn Menard 42775219b3 private-messages: Update frontend strings to use "direct message" or "DM".
Updates frontend user-facing strings with "private message" or "PM" to
use "direct message" or "DM" respectively instead.

Note that this updates translated strings as well as a few that
are not translated like search suggestions.

Updates `tools/lib/capitalization.py` for some specific strings
that are impacted by these changes, and removes "PM" and "PMs"
from checked strings.
2023-02-24 11:47:26 -08:00
Lauryn Menard 017b05fd84 outgoing-webhook: Update Slack outgoing webhook error for private messages.
Updates the error message for the outgoing Slack webhook to use
"direct message" instead of "private message".
2023-02-24 11:47:26 -08:00
Lauryn Menard e39c689f36 email-notifications: Update email subjects with "PM" to "DM".
Updates email notification subjects with "PM" to use "DM" instead.

Also, updates `tools/lib/capitalization.py` to include both "DM"
and "DMs".
2023-02-24 11:47:26 -08:00
Lauryn Menard 182e6c0730 push-notifications: Update strings for private messages.
Updates strings with "private message" in push notifications to
use "direct message" instead.
2023-02-24 11:47:26 -08:00
Lauryn Menard a0fd7b2afc private-messages: Update translated backend strings use "direct message".
Updates user-facing translated strings containing "private message" on
the backend to use "direct message" instead.
2023-02-24 11:47:26 -08:00
David Rosa d098e8275d help: Document stream notifications mobile feature.
- Documents how to set default notifications for all streams and
  single streams from within the mobile app.
2023-02-24 11:35:20 -08:00
Anders Kaseorg a58b87893e eslint: Prohibit import cycles in TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-02-24 11:33:36 -08:00
Alya Abbott e65f48b619 help: Document modifying email visibility on sign-up. 2023-02-24 09:30:32 -08:00
Alex Vandiver 8ede54fb1b docs: Add a link to installer flag docs from backup instructions.
The documentation for restoring backups referenced that it needed to
be to the same version of PostgreSQL, but did not explain how to do
that.

Link to the relevant section of the installer documentation, and name
the flag explicitly.

Fixes: #23691
2023-02-24 12:25:48 -05:00
Sahil Batra 1ac6a9ac06 register: Allow user to change email_address_visibility during signup.
We now allow user to change email_address_visibility during user
signup and it overrides the realm-level default and also overrides
the setting if user import settings from existing account.
We do not show UI to set email_address_visibility during realm
creation.

Fixes #24310.
2023-02-24 09:23:34 -08:00
Sahil Batra 36584a3571 registration: Add code to set email_address_visibility during signup.
This commit adds backend code to set email_address_visibility when
registering a new user. The realm-level default and the value of
source profile gets overridden by the value user selected during
signup.
2023-02-24 09:23:34 -08:00
Sahil Batra 0620d2ac1b settings: Add "modal_select" to select element for custom user field.
Same template fike is used to show user custom profile fields in
both profile page in settings and in manage user modal. For select
elements in modals, the CSS is handled using modal_select class.
This commit adds modal_select class to the select element used for
custom user field, which already has settings_select class, so that
the CSS are also applied to the select element in manage user modal.
2023-02-24 09:13:09 -08:00
Sahil Batra a862e686db modal: Do not use flex for all modal titles.
The "display: flex" property was added to ".modal__title"
element in 9e4aa19ac in #24194 to fix overlay of long
name in user profile modal (#23781).

Due to this change, the space between words in heading of
"Archive stream" modal is being removed.

This commit fixes it by adding "display: flex" only to the
title of user profile modal and not all the modals. The
heading in "Archive stream" modal is not perfect but there
is ongoing work to fix it and till then this commit changes
it to be the same as it was before adding flex property.

There is no major change in other modals, except that the
space between heading and help-link widget has increased
which was anyways the case before adding the flex property
and that can be modified later if we want to.
2023-02-24 09:13:09 -08:00
Anders Kaseorg 0ef8e88b17 webpack: Move webpack configuration to web.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-02-24 06:35:58 -08:00
Anders Kaseorg 23fd4f95f4 web/tests: Don’t rely on current directory.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-02-24 06:35:58 -08:00
Palash Baderia d8adc6de1c personal_settings: Add deactivate organization button for organization.
Added a 'Deactivate Organization' button inside the
'Personal Settings > Account & Privacy'. This button only appears
when the organization owner is the only user present. To verify this,
I used the 'get_active_human_count' function from the 'people.js'.

To remove duplication, a function has been created inside settings_org
file to handle the click event for the two buttons present inside
personal_settings and organization_settings that perform the same
action of deactivating organization. The click handler is defined in
the click_handlers.js file, which calls the dialog for deactivating
the organization. Previously, the error used to appear at the top of
the organization_settings, but now it appears inside the dialog box
itself.

To remove the duplication of two buttons having the same IDs,changed
the Id `deactivate_realm_button` to a className.

Fixes: #24105
2023-02-23 18:17:28 -08:00
Aman Agrawal c9f4e474a7 integrations: Increase font size of trademark disclaimer.
This is to address Google complaining that the font size is too
small to read on the integration pages.
2023-02-23 17:50:09 -08:00
N-Shar-ma 599a32bee9 hotkey: Add `z` shortcut to zoom to message `near` view.
A new hotkey, lowercase `z` (for `zoom`) has been implemented to allow
the user to go to the near view of the selected message with 1 keypress.
Documentation has been added for this both in the help center, and the
in-app `Keyboard shortcuts` menu.

The effect is identical to clicking on a message's timestamp, which
links to that message's near view.

Fixes: #24227.
2023-02-23 17:47:45 -08:00
Anders Kaseorg 377b8b22c0 puppeteer_tests: Move to web/e2e-tests.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-02-23 16:04:17 -08:00
Anders Kaseorg cea1119423 node_tests: Move to web/tests.
This lets us simplify the long-ish ‘../../static/js’ paths, and will
remove the need for the ‘zrequire’ wrapper.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-02-23 16:04:17 -08:00
Anders Kaseorg c1675913a2 web: Move web app to ‘web’ directory.
Ever since we started bundling the app with webpack, there’s been less
and less overlap between our ‘static’ directory (files belonging to
the frontend app) and Django’s interpretation of the ‘static’
directory (files served directly to the web).

Split the app out to its own ‘web’ directory outside of ‘static’, and
remove all the custom collectstatic --ignore rules.  This makes it
much clearer what’s actually being served to the web, and what’s being
bundled by webpack.  It also shrinks the release tarball by 3%.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-02-23 16:04:17 -08:00