Commit Graph

46897 Commits

Author SHA1 Message Date
Sahil Batra 3a3ed78fd9 stream_settings: Live update the banner on changing subscription. 2022-04-01 14:52:06 -07:00
Palash 4d44698805 stream_settings: Remove pencil icon from 'General' tab in stream settings.
For user who is not an administrator.
Also implemented a banner that notifies the user if they can edit
the following settings (name/description and stream permission).
Also increased padding-top of stream header by 10px. This change is done
to increase vertical spacing between the banner
and the stream header.

Fixes #20001.
2022-04-01 14:52:06 -07:00
Alex Vandiver 0af00a3233 upgrade: Mark puppet as having started the server.
We previously used restart-server if puppet was run, as a nod to the
fact that `supervisor reread && supervisor update` will _start_
service groups that were modified, even if they were previously
stopped; this is because they are marked as `autostart=true`, which is
honored on service change.

However, upgrades want to run while there are no services running.  If
puppet is run, explicitly set the server as potentially being "up", so
that a `shutdown_server()` before migrations, if they exist, will stop
services.
2022-03-31 17:21:39 -07:00
Alex Vandiver e9596637e7 upgrade: Move the shutdown_server calls to where they are relevant.
shutdown_server is a noop if the server is already stopped; placing
these in each block makes the logic more apparent.
2022-03-31 17:21:39 -07:00
Aman Agrawal 2df4ace441 navbar_alerts: Adjust height of recent topics when alert is visible.
Fixes #21619

We need to adjust height of recent topics along with the app
otherwise the container becomes separately scrollable due to
it overflowing the app height.
2022-03-31 11:25:09 -07:00
Alex Vandiver 2e50ead9d1 data_import: Fix bot email address de-duplication.
4815f6e28b tried to de-duplicate bot
email addresses, but instead caused duplicates to crash:

```
Traceback (most recent call last):
  File "./manage.py", line 157, in <module>
    execute_from_command_line(sys.argv)
  File "./manage.py", line 122, in execute_from_command_line
    utility.execute()
  File "/srv/zulip-venv-cache/56ac6adf406011a100282dd526d03537be84d23e/zulip-py3-venv/lib/python3.8/site-packages/django/core/management/__init__.py", line 413, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/srv/zulip-venv-cache/56ac6adf406011a100282dd526d03537be84d23e/zulip-py3-venv/lib/python3.8/site-packages/django/core/management/base.py", line 354, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/srv/zulip-venv-cache/56ac6adf406011a100282dd526d03537be84d23e/zulip-py3-venv/lib/python3.8/site-packages/django/core/management/base.py", line 398, in execute
    output = self.handle(*args, **options)
  File "/home/zulip/deployments/2022-03-16-22-25-42/zerver/management/commands/convert_slack_data.py", line 59, in handle
    do_convert_data(path, output_dir, token, threads=num_threads)
  File "/home/zulip/deployments/2022-03-16-22-25-42/zerver/data_import/slack.py", line 1320, in do_convert_data
    ) = slack_workspace_to_realm(
  File "/home/zulip/deployments/2022-03-16-22-25-42/zerver/data_import/slack.py", line 141, in slack_workspace_to_realm
    ) = users_to_zerver_userprofile(slack_data_dir, user_list, realm_id, int(NOW), domain_name)
  File "/home/zulip/deployments/2022-03-16-22-25-42/zerver/data_import/slack.py", line 248, in users_to_zerver_userprofile
    email = get_user_email(user, domain_name)
  File "/home/zulip/deployments/2022-03-16-22-25-42/zerver/data_import/slack.py", line 406, in get_user_email
    return SlackBotEmail.get_email(user["profile"], domain_name)
  File "/home/zulip/deployments/2022-03-16-22-25-42/zerver/data_import/slack.py", line 85, in get_email
    email_prefix += cls.duplicate_email_count[email]
TypeError: can only concatenate str (not "int") to str
```

Fix the stringification, make it case-insensitive, append with a dash
for readability, and add tests for all of the above.
2022-03-31 11:10:18 -07:00
Alex Vandiver 65e19c4fbd supervisor: 'foo:*' also matches 'foo'.
7c4293a7d3 switched to checking if the
service was already running, and use `supervisorctl start` if it was
not.

Unfortunately, `list_supervisor_processes("zulip-tornado:*")` did not
include `zulip-tornado`, and as such a non-sharded process was always
considered to _not_ be running, and was thus started, not restarted.
Starting an already-started service is a no-op, and thus non-sharded
tornado processes were never restarted.

The observed behaviour is that requests to the tornado process attempt
to load the user from the cache, with a different prefix from Django,
and immediately invalidate the session and eject the user back to the
login page.

Fix the `list_supervisor_processes` logic to match without the
trailing `:*`.
2022-03-31 10:41:41 -07:00
Heidi Ahlberg 9e6836d0af i18n: Fix missing translation tags in stream creation view. 2022-03-31 10:33:34 -07:00
Greg Price 3ff2bcf62a shared: Bump version to 0.0.10. 2022-03-30 21:06:37 -07:00
Anders Kaseorg 7de1e7c477 changelog: Remove broken link.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-03-30 20:37:31 -07:00
Steve Howell b7f670f5a0 markdown: Extract set_linkifier_regexes.
This is definitely better than having linkifiers
reach directly into marked.js, but there is
probably further improvement we can do here
to clean up how these regexes get set.

This introduces a circular dependency between
markdown.js and linkifiers.js, but we will
soon break it in the other direction.
2022-03-30 14:31:00 -07:00
Steve Howell 2a240d3e19 markdown: Move handleLinkifier.
All the other handleFoo functions followed this
convention.
2022-03-30 14:31:00 -07:00
Steve Howell efdf2c8fe3 linkifiers: Avoid parallel data structure.
We can pretty easily work with a map in the
two places that we ever relied on an array.
2022-03-30 14:31:00 -07:00
Steve Howell 71c12e313c markdown: Fix overly loose regex for previews.
Fortunately, the only impact of this bug was that
we would unnecessarily wait for the server to render
the markdown if we got false matches.
2022-03-30 14:31:00 -07:00
Steve Howell da6d687215 markdown: Extract contains_preview_link.
I also clean up some variable names, comments, and
idioms.
2022-03-30 14:31:00 -07:00
Steve Howell 58799c6ca1 markdown: Extract contains_problematic_linkifier.
Note we now avoid linkifier checks for the case that a message
contains more obvious backend-only syntax such as attachments.

The next commit will eliminate the ugly early-return.
2022-03-30 14:31:00 -07:00
Steve Howell 8d9e6d6b87 markdown: Clean up API for future reuse.
This gets us closer to having an API that can
be used my mobile.

The parse() function becomes a subset of
apply_markdown() that is no longer coupled
to the shape of a webapp object, and it can
be supplied with a new helper_config for each
invocation. Mobile will likely call this directly.

The setup() function becomes a subset of
initialize() that allows you to set up the
parser **before** having to build any kind of
message-specific helpers. Mobile will likely
call this directly.

The webapp continues to call these functions,
which are now thin wrappers:

    * apply_markdown (wrapping parse)
    * initialize (wrapping setup)

Note we still have several other problems to
solve before mobile can use this code, but we
introduce this now so that we can get a head
start on prototyping and unit testing.

Also, this commit does not address the fact
that contains_backend_only_syntax() is still
bound to the webapp config.
2022-03-30 14:31:00 -07:00
Anders Kaseorg 935cb605a5 puppet: Do not ensure Chrony is running.
Commit f6d27562fa (#21564) tried to
ensure Chrony is running, which fails in containers where Chrony
doesn’t have permission to update the host clock.

The Debian package should still attempt to start it, and Puppet should
still restart it when chrony.conf is modified.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-03-30 11:37:54 -07:00
Sahil Batra ca38b33346 settings: Fix push notifications tooltip being incorrectly shown.
We were showing the push notifications tooltip in user default
settings section even if the push notifications were configured
on the server.

The bug was because the setting value was undefined in the template
used for user default settings section, so this commit fixes the bug
by correctly passing the setting value to relevant template file.

Fixes #21602.
2022-03-30 11:31:29 -07:00
Lauryn Menard 0008a76703 tests: Remove ignored `stream_name` parameter from test.
Removes unnecessary `stream_name` parameter from
`test_stream_permission_changes_updates_updates_attachments`.
2022-03-30 11:30:31 -07:00
Tim Abbott d9bf8baca1 tools: Add per-repository commit counts in contributions tool.
This makes the output nice enough to include in the blog post.
2022-03-29 14:13:17 -07:00
Tim Abbott 46b19fe8bd mailmap: Add entries to deduplicate more contributors. 2022-03-29 12:13:21 -07:00
Tim Abbott c1103e4c7b i18n: Fix missing translation tag in footer. 2022-03-29 10:04:35 -07:00
Tim Abbott c8dba33408 docs: Fix broken link in changelog. 2022-03-29 09:52:07 -07:00
Tim Abbott 6ea9947991 docs: Run prettier on changelog. 2022-03-29 09:24:06 -07:00
Tim Abbott 12e8f0f5ea version: Update version following 5.0 release. 2022-03-29 08:36:41 -07:00
Tim Abbott d308c694ba Release Zulip Server 5.0. 2022-03-29 08:13:34 -07:00
Tim Abbott 836529f826 i18n: Update translation data from Transifex. 2022-03-29 08:11:21 -07:00
jai2201 20e6315705 streams: Fix empty description in stream change notifications.
Send 'No description' text when either the old or new stream
description is empty, to avoid odd looking notifications.
2022-03-29 01:39:55 -07:00
Tim Abbott c789097184 streams: Fix empty description handling in new stream notifications.
"No description." is conveniniently an existing translated string, in
addition to being the right content for this setting.
2022-03-29 01:39:55 -07:00
jai2201 52cf557d2b openapi: Allow empty value of stream's description.
This is important because otherwise tests that change a stream
description to the empty string don't work.
2022-03-29 01:39:55 -07:00
Greg Price 35ee5679d6 mailmap: Add entries for strifel and m-e-l-u-h-a-n.
In each case guessing with the name they've used more often.
2022-03-29 00:27:23 -07:00
Greg Price f054d217c2 mailmap: Add entry for Shlok Patel.
Guessing with the name that looks like a full name, rather than
a username; which is also the form they've used more often.
2022-03-29 00:27:23 -07:00
Greg Price fecc557836 mailmap: Add entry for Parth.
Guessing with the capitalized form, which is also the one they've
used slightly more often.
2022-03-29 00:27:23 -07:00
Greg Price e06e05acac mailmap: Add entry for Kevin Scott.
Guessing with the fuller form of the name, which is also what
appears in their email address.
2022-03-29 00:27:23 -07:00
Greg Price a907c10509 mailmap: Add entries for BIKI DAS, Palash Raghuwanshi, and Yogesh Sirsat.
Based on the names on their respective chat.zulip.org profiles.
2022-03-29 00:27:23 -07:00
Greg Price 2455077346 mailmap: Add entry for Sayam Samal.
Based on the name found on their chat.zulip.org profile.
2022-03-29 00:27:23 -07:00
Greg Price 245288df1e mailmap: Add entries for Lauryn, Mateusz, Austin, Alya, and Eeshan.
Canonicalizing on the zulip.com email address for each of them.
2022-03-29 00:27:23 -07:00
Greg Price 244f34b66e mailmap: Add entry for Jai soni.
Based on the non-noreply.github.com email address, and the name
found on their chat.zulip.org profile.
2022-03-29 00:27:23 -07:00
Alya Abbott 2c558750de portico: Add web-public steams and emoji statuses to /for/X pages. 2022-03-28 23:27:33 -07:00
Tim Abbott 13da2c2fb7 total-contributions: Clone repositories if already available.
This makes it more convenient to manage.
2022-03-28 23:01:58 -07:00
Tim Abbott a7f13ba723 total-contributions: Support all repositories and improve output. 2022-03-28 23:01:58 -07:00
Tim Abbott 7cbe9665b6 total-contributions: Exclude dependabot commits. 2022-03-28 23:01:58 -07:00
Tim Abbott a234fe9c4c total-contributions: Use commits by date, not by release. 2022-03-28 23:01:58 -07:00
Tim Abbott 6b5ce3579c total-contributions: Do a fetch for zulip/zulip as well.
This avoids producing stale output by having a consistent algorithm
for all repositories.
2022-03-28 23:01:58 -07:00
Alya Abbott f04fb51ecc help: Rewrite pages on inviting users and related permissions.
Fixes #21520.

Co-authored-by: Lauryn Menard <lauryn@zulip.com>
2022-03-28 17:00:10 -07:00
Lauryn Menard cbfe2707f4 help_docs: Clarify relative link text for Subscribed streams tab. 2022-03-28 15:13:39 -07:00
Lauryn Menard 1b55ff79c9 help_docs: Remove last instance of 'Zulips' in help center docs. 2022-03-28 15:13:08 -07:00
Lauryn Menard e4d051b5f4 help_docs: Fix help center link on Zulip features page.
Fixes a link to the help center markdown formatting documentation
about quotes.
2022-03-28 15:12:53 -07:00
Greg Price 56b6b71236 notification_sounds: Add "Chime", the new Zulip sound used on Android
This is the same sound that since zulip/zulip-mobile#5221 has been
the default notification sound for Zulip on Android.

The actual sound was created by Anders.

Co-authored-by: Anders Kaseorg <anders@zulip.com>
2022-03-28 12:56:54 -07:00