Commit Graph

38179 Commits

Author SHA1 Message Date
Mateusz Mandera dd5349096f test_stripe: Fix invalid UserProfile creation. 2020-07-15 19:29:24 +02:00
Tim Abbott 7ade8fae78 test_message_send: Fix invalid UserProfile creation. 2020-07-15 10:19:41 -07:00
Aman Agrawal 19b7ef3888 list_render: Use simplebar container to track scroll event.
We have changed our all instances of list_render to use
simplebar and thus, we will now use simplebar container
to track scroll event for all the lists created by
list_render.

This fixes the bug of new subscribers not rendering on
scrolling at the end of subscriber list in stream settings
and similar bug in some other lists also.

This commit also removes scroll_util.get_list_scrolling_container
function as this is no longer used.

Fixes #15637.
2020-07-15 10:16:56 -07:00
sahil839 d41f66a917 muted_topics: Rerender list only if modal is opened and section is loaded.
We should rernder the muted topics list in settings only if the settings
modal is opened and the muted topics section is loaded.
2020-07-15 10:16:56 -07:00
Aman Agrawal c1b047b0d1 recent_topics: Use simplebar for scrolling. 2020-07-15 10:16:56 -07:00
Aman Agrawal 57b6f9179b settings: Fix simplebar scrollbar in org settings dropdown.
This commit fixes the dropdown_list_widget to use simplebar for
scrolling.

It was not being used because data-simplebar should not be inserted
to the element being rerendered. This commit adds a new element
wrapping 'dropdown-list-body' which was being rerendered and
data-simplebar is added to that new element 'dropdown-list-wrapper'.

Also, there should always be a max-height property on data-simplebar
element and it is also added in this commit.

There is also a change to set margin of 10px only on the first div
element and which is direct children of organization-settings-parent
element. This is correct because we only want margin to add some space
between the heading of subsection and the first setting of that
subsection. Previously, the margin was being added to first div of all
the other child containers also and this was adding unnecessary margin
to the first div element of different simplebar containers.
2020-07-15 10:16:56 -07:00
sahil839 6259456df1 settings: Do not use list_render for stream specific notification settings.
We do not need to use list_render for displaying list of streams specific
notification settings, as this is not scrollable and we do not provide
option to sort or filter this list as well.

After this change, all our list_render instances will be using simplebar
and we can change the code accordingly to fix the behaviour of scrolling.
2020-07-15 10:16:56 -07:00
Aman Agrawal c4bbdf040e recent_topics: Fix search clear icon overflowing in next line.
Sometimes, the clear icon overflows on the next line on specific
widths. This makes sure it never happens by wrapping them in a
block.
2020-07-15 10:00:52 -07:00
Aman Agrawal d39b969c64 recent_topics: Add background color to avatars extra count. 2020-07-15 10:00:52 -07:00
Aman Agrawal 71cae3370c recent_topics: Hide participants and last msg time on <750px width.
This ensures the UI experience on <750px width doesn't look
like too many things packed in a small space.
2020-07-15 10:00:51 -07:00
Aman Agrawal e7a65fa688 recent_topics: Show action buttons next to topic.
We remove the action column and show action buttons next to topic
after unread count (if present). This save us a lot of extra space
on small window sizes.
2020-07-15 09:59:37 -07:00
Aman Agrawal 1ee09799e6 recent_topics: Don't wrap last message header and stream names. 2020-07-15 09:59:37 -07:00
Aman Agrawal 8951f77e5d recent_topics: Show read topics in a darker shade. 2020-07-15 09:59:37 -07:00
Gittenburg 9648e64d23 styles: Make focus outline work reliably.
For a:focus Bootstrap sets the following rules:

    outline: thin dotted #333;
    outline: 5px auto -webkit-focus-ring-color;

Firefox does not know -webkit-focus-ring-color and falls back to the
previous rule, making the outline invisible in darkmode.

Chromium has a bug[1] that makes outline: auto invisible when focussing
elements programmatically (which we do for the up & down arrow keys).

[1]: https://bugs.chromium.org/p/chromium/issues/detail?id=1105822

Fixes #15768.
2020-07-15 09:57:19 -07:00
Mateusz Mandera b9b146c809 migrations: Add case-insensitive unique indexes on realm and email.
Tweaked by tabbott to use clearer conventions and to document it in
the upgrade notes.

Fixes #15772.
2020-07-15 09:42:40 -07:00
Alex Vandiver 48c3c33d10 puppet: Fully-qualify the munin-plugin name 2020-07-14 17:58:51 -07:00
Gittenburg 953d475274 settings: Fix saving indicator glitch.
jQuery's fadeOut() sets display: none using inline CSS.
This was overriden by .alert-notification since it used !important
to override the display: block set in loading.js.  Removing the latter
allows us to remove the !important, and doesn't seem to break anything.

Fixes #15759.
2020-07-14 16:29:39 -07:00
Alex Vandiver c68333040b
puppet: Revert PostgreSQL setting of recovery_target_timeline.
Prior to PostgreSQL 12, the `recovery_target_timeline` setting is only
valid in a `recovery.conf` file, as that file has its own
configuration parser.  As such, including it in `postgresql.conf`
results in an error, and PostgreSQL will fail to start.

Remove the setting, reverting bff3b540b1.  This fixes PostgreSQL 9.5,
9.6, 10, and 11; while the setting is not an error in a PostgreSQL 12
configuration file, it is unnecessary since `latest` is the default.
2020-07-14 16:28:20 -07:00
Alex Vandiver 31d80a77d4 puppet: Update nagios check_postgres_replication_lag to be on DB hosts
7d4a370a57 attempted to move the replication check to on the
PostgreSQL hosts.  While it updated the _check_ to assume it was
running and talking to a local PostgreSQL instance, the configuration
and installation for the check were not updated.  As such, the check
ran on the nagios host for each DB host, and produced no output.

Start distributing the check to all apopdb hosts, and configure nagios
to use the SSH tunnel to get there.
2020-07-14 16:27:18 -07:00
Anders Kaseorg 56e8cca025 lint: Add Prettier as a linter for YAML files.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-14 16:25:31 -07:00
Anders Kaseorg 2794bc1ef4 lint: Reformat YAML files with Prettier.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-14 16:25:31 -07:00
orientor 40f76bb030 openapi_py: Add function for validating requests.
Add a function for validating requests made during tests in `openapi.py`.
2020-07-14 14:23:58 -07:00
orientor bff8e43729 openapi_py: Add openapi-core validator object to OpenAPISpec class.
OpenAPISpec is our main class for accessing OpenAPI objects and
has the capability of creating the OpenAPI objects only once, thus
saving time. Since the openapi-core request validator object is going
to be accessed for considerable time during testing, hence add it to
the class for faster testing.
2020-07-14 13:57:50 -07:00
orientor ade5dae564 openapi: Fix `/settings/notifications` OpenAPI documentation.
We pass these values encoded as JSON and parsed with
validator=check_int, not as raw integers.
2020-07-14 13:57:50 -07:00
orientor ee39522eef openapi: Improve `/messages/{message_id}` PATCH documentation.
We extract OptionalContent and RequiredContent since some endpoints
require it and other don't.

In an ideal world, we'd have a better way to express these small
variants.
2020-07-14 13:57:50 -07:00
orientor 4ca4d43b0c openapi: Improve `/message` GET OpenAPI spec.
The `num_after` and `num_before` parameters should be 0 or greater.
2020-07-14 13:57:50 -07:00
orientor bb405ebc3d openapi: Move `/users/{user_id}` below endpoints with similar regex.
openapi-core, the request validator has a bug due to which data type
of path parameters is not checked. Hence `/users/{user_id}` can match
with `users/me`. So change the position of`/user/{user_id}` after all
such possible matches to avoid errors.

See https://github.com/p1c2u/openapi-core/issues/226 for details.
2020-07-14 13:57:50 -07:00
orientor 26bcd7e4d1 openapi: Move `/messages/{message_id}` below endpoints with similar regex.
openapi-core, the request validator has a bug due to which data type
of path parameters is not checked. Hence `/messages/{message_id}`
can match with `messages/matches_narrow`. So change the position of
of `message/{message_id}` after all such possible matches to avoid
errors.

See https://github.com/p1c2u/openapi-core/issues/226 for details.
2020-07-14 13:57:50 -07:00
Anders Kaseorg 8927d2f240 lint: Restore pycodestyle wrapper’s check for empty list of files.
Commit ab647abad3 (#15779) accidentally
removed this.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-14 13:54:58 -07:00
Anders Kaseorg f1d475206e search: Fix ESLint prefer-arrow-callback error.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-14 12:38:25 -07:00
Tim Abbott cb54e30832 Revert "search: Fix blur event handler for `search_query_box`."
This reverts commit 63643c9d9d.

As the commit mentions, it makes a UI change for legacy search which
has largely been considered a regression.  We've been running with
this reverted in zulip.com essentially since it was first merged.
2020-07-14 12:26:28 -07:00
Tim Abbott 42d601e214 help: Fix exception with invalid fragment causing bogus extra scrollbars.
Apparently, our scrollbar logic crashed with an invalid URL fragment
(hash), which resulted in initialization not completing and thus the
logic failing.

In my view the root issue here is that we're not doing a good job of
catching JavaScript exceptions in portico pages.

Fixes #15706.
2020-07-14 12:19:52 -07:00
Anders Kaseorg f364414cb9 install-semgrep: Upgrade semgrep to 0.14.0.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-14 00:42:07 -07:00
Anders Kaseorg ab647abad3 lint: Use standard setup.cfg configuration for pycodestyle.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-14 00:41:20 -07:00
Anders Kaseorg 79b1bf56ab requirements: Upgrade zulint.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-14 00:41:20 -07:00
Alex Vandiver 2174db27db puppet: Put the dependencies on pg_backup_and_purge itself, and ensure them. 2020-07-14 00:40:25 -07:00
Alex Vandiver 6c27f07c1d puppet: Move PostgreSQL backups to their own class.
wal-g was used in `puppet/zulip` by env-wal-g, but only installed in
`puppet/zulip_ops`.

Merge all of the dependencies of doing backups using wal-g (wal-g
installation, the pg_backup_and_purge job, the nagios plugin that
verifies it happens) into a common base class in `puppet/zulip`, since
it is generally useful.
2020-07-14 00:40:25 -07:00
Gittenburg bc1f2fa80e reactions: Add back missing e.stopPropagation().
In 42f20e81be I fixed an edge case but
also accidentally made clicking on reactions open the compose box.

This commit adds back the e.stopPropagation(); and explicitly hides the
emoji picker popover, to address the inconsistency fixed in the previous
commit.
2020-07-14 00:38:36 -07:00
YashRE42 75cfd886b7 navbar: Fix disappearing left border when search opens.
Previously, we were experiencing a bug that caused the left border of
the searchbox/tab_bar to disappear when the searchbox was opened. This
bug was a result of the following changes:
- 4cdd7aed2b accidentally added this line
  as right: 2; instead of right: 2px;
- 46c966576d fixed this line to be
  right: 2px; but caused the regression.

This commit fixes the bug by deleting this line.
2020-07-14 00:37:40 -07:00
Vishnu KS 788b6a47e8 email_log: Show reply_to address if present. 2020-07-14 00:36:31 -07:00
Vishnu KS 108ad84944 billing: Use no-reply address as from_address in sponsorship emails. 2020-07-14 00:36:31 -07:00
Aman Agrawal e22885a6bf push_notifications: Return if push_notify already active.
If the push_notification for the UserMessage is already active,
we don't send any push notification to the user. This may
happen due to race conditions.

Added and fixed test cases affected by this.
2020-07-14 00:35:29 -07:00
Tim Abbott 6b1f1e74a3 version: Update version string following 3.0-rc2. 2020-07-14 00:29:59 -07:00
Tim Abbott ac0a305f72 Release Zulip Server 3.0-rc2. 2020-07-14 00:24:35 -07:00
Tim Abbott bf24896bd5 i18n: Update translation data from Transifex. 2020-07-14 00:24:35 -07:00
Tim Abbott 9badb1583d api docs: Clean up a few entries in API changelog. 2020-07-14 00:17:24 -07:00
Tim Abbott 64490b8744 api docs: Remove message_retention_days from unstable features.
This was stabilized in feature level 17.
2020-07-13 17:52:21 -07:00
SiddharthVarshney 476808128c help: Replace chevron with ellipsis.
Update help docs where chevron was previously
mentioned for message controls menu icon.
2020-07-13 16:12:26 -07:00
SiddharthVarshney 972a1019cf message_controls: Replace chevron-down with ellipsis-v icon.
After migrating chevron-down with ellipsis for
sidebar-menu, this commit will do the same for
message narrow for consistency.
2020-07-13 16:12:26 -07:00
SiddharthVarshney 1ea9e2841c message_controls: Make click area for icons more uniform.
Previously user have to click pixel perfect on the message controls
icons to achieve the click action.

This commit will uniformly increases the click target
area for the icons.

Tweaked by tabbott to avoid some weird glitches.
2020-07-13 16:12:06 -07:00