Commit Graph

37362 Commits

Author SHA1 Message Date
sahil839 b7f6a51797 message_list_view: Use stream_id to get sub object for populating group.
This commit changes populate_group_for_message_container function to
use stream id to get sub object, instead of stream name.
We already have stream id from message object, so we can easily
use it to fetch sub. We are using stream ids so that we can
avoid bugs related to live update after stream rename.
2020-06-22 13:39:47 -07:00
sahil839 235601d3b6 stream_data: Modify remove_subscriber to use stream id.
This commit changes stream_data.remove_subscriber to use stream id
instead of stream name. We are using stream ids so that we can
avoid bugs related to live update after stream rename.
2020-06-22 13:39:47 -07:00
sahil839 ddbfbdc386 stream: Modify stream_data.add_subscriber to use stream_id.
Thsi commit changes stream_data.add_subscriber to use stream_id
instead of stream name. We are using stream ids so that we can
avoid bugs related to live update after stream rename.
2020-06-22 13:39:47 -07:00
sahil839 320d0ca806 stream: Remove stream_edit.rerender.
This commit removes stream_edit.rerender function. We directly
call subs.rerender_subscriptions_settings directly from
server_events_dispatch.js, which was the only caller of rerender
function, as we already have sub object.
We are using stream ids so that we can avoid bugs related to live
update after stream rename.
2020-06-22 13:39:47 -07:00
sahil839 30c55a1ea7 recent_topics: Use get_sub_by_id in format_topic to get stream info.
We can use get_sub_by_id instead of get_sub to get the stream info,
as we already have stream id from the message object. We are using
stream ids so that we can avoid bugs related to live update after
stream rename.
2020-06-22 13:39:47 -07:00
sahil839 f3604fbb1e stream_edit: Refactor receives_notifications to use stream ids.
This commit changes receives_notifications function to use
stream_ids instead of stream names. We are using stream ids so
that we can avoid bugs related to live update after stream rename.
2020-06-22 13:39:47 -07:00
Aman Agrawal ae43ef5959 recent_topics: Make avatars bigger and borderless.
Set vertical alignment of contents in middle of row.
2020-06-22 12:56:19 -07:00
Priyank Patel 89619767cd test_server: Double the timeout amount to avoid flakes.
These timeout flakes, when running puppeteer test, have been fairly
frequent in CI, so increase the timeout.
2020-06-22 12:30:32 -07:00
Gittenburg af867cb26c recent_topics: Fix buggy scrolling.
The knob of the scroll bar scrolled out of view in both Firefox and
Chromium and on Firefox it even cut off the last entry.

Fixes #15511.
2020-06-22 12:20:43 -07:00
Gittenburg 8333e11378 emoji_picker: Fix no hover effect when filtering.
Fixes #15487.
2020-06-22 07:03:07 -04:00
Tim Abbott 5d6f3d0e3a docs: Fix typo in 'substituted'. 2020-06-21 10:56:40 -07:00
Tim Abbott dc2a045d3b docs: Add documentation on mypy @overload.
We only use this in a few places, but they're really important places
for understanding the types in the codebase, and so it's worth having
a bit of expository documentation explaining how we use it.

(And I expect we'll add more with time).
2020-06-21 10:51:47 -07:00
Mohit Gupta 02ea52fc18 filter: Implement has: filters on client side.
Prior to this commit has:link, has:attachment, has:image
filter couldn't be applied locally and deferred filtering to
web server. This commits make sure client filters all messages
it can instead of completely deferring to the server and hence
improve speed.

A tradeoff is also made to turn off local echo for has: narrows
as messages with link sent to has:link narrow were locally echoing
to another narrow and not appearing in the active has:link narrow.

Fixes: #6186.
2020-06-21 10:26:09 -07:00
YashRE42 a4f5b0c635 message_controls: Prevent clicks via visibility & not pointer-events.
Previously, the message controls had a bug where they would trigger on
mobile with a single tap over the area they occupy when visible. This
is wrong because a user would expect to first see the controls and
only trigger them once they are visible (with a second tap).

The above bug is caused by the fact that we were using "opacity: 0" on
".message_controls > div" to hide the controls and "opacity: 1" on
".messagebox &:hover .message_controls > div" to show the controls on
hover, however, this would not effect the click action because
"opacity". So we used "pointer-events: none;" and "pointer-events:
all;" with the hopes that it would prevented the above bug, but in
practice, it didn't.
(the most probable explanation being that tapping the message_control
area would cause the "&:hover" rule to trigger and change the
"pointer-event" to "all" before it could prevent the click trigger,
But that explanation is just conjecture.)

This commit replaces both "pointer-events" attributes with
"visibility: hidden" and "visibility: visible" respectively. The
result being that the message_controls behave identically to before,
except without the above bug.

The addition to the ".has_actions_popover .info" selector is important
because without it, we would regress on issue #3172.

Trivia:
An alternate approach to using "opacity" is to set the
"display" attribute to "none", however, using "display" prevents the
transition from animating (which is probably why we were using opacity
here in the first place). "visibility" does not prevent the transition
from animating.

History: The "pointer-events" attribute was introduced in
4d5aa3ddc9 and it replaced prior code
which relied on the "visibility" attribute... But it seems PR #3792
was mostly focused on improving the positioning through removal of
`display: none`, but introduced opacity to make the animations work
rather than visibility as the replacement solution, which requires the
pointer-events hack and resulted in the bug described here.

Fixes the second bug described in #13642.
2020-06-21 10:12:41 -07:00
Aman Agrawal 572e504d4e recent_topics: Move "Include muted" filter beside "All" filter.
This helps user understand "Include muted" filter better and
saves keypress to focus on more used filters like "participated"
and "unread".

See https://github.com/zulip/zulip/issues/15482.
2020-06-21 10:03:26 -07:00
dangraw d24c26b9e4 stream edit: Add <Enter> keyboard shortcut to invite users to stream.
Fixes #15185.
2020-06-21 09:57:00 -07:00
Tim Abbott 96044d0bd1 stream_edit: Extract submit_add_subscriber_form. 2020-06-21 09:57:00 -07:00
sahil839 f10efa27b8 users: Add docs link next to the label of dropdown for changing user's role.
This commit adds link to 'roles and permissions' docs next to the label
of dropdown for changing user role.
2020-06-21 09:41:46 -07:00
sahil839 3498287b8c invite: Add docs link next to the user-role dropdown label in invite modal.
This commit adds link to 'roles and permissions' docs next to the
label of user role dropdown in invite modal.
2020-06-21 09:41:46 -07:00
Mateusz Mandera 60c4896c3a import: Fix import and export parallelism defaults.
Fixes #14960.
The default of 6 thread may not be appropriate in certain
configurations. Taking half of the numer of CPUs available to the
process will be more flexible.
2020-06-21 09:39:31 -07:00
orientor c4ccf0d6b3 openapi: Fix wrong schemas.
In a recent commit, due to conflicts with old schemas the new
schemas were added as oneOf. But the old schemas were wrong. So
change them accordingly.
2020-06-21 01:42:40 -07:00
Tim Abbott 3b4a9f8a9c test_middleware: Remove night mode test.
We removed the quoted string this test was for.
2020-06-21 01:17:42 -07:00
MariaGkoulta b10f156250 settings: Add automatic theme detection feature.
With this implementation of the feature of the automatic theme
detection, we make the following changes in the backend, frontend and
documentation.

This replaces the previous night_mode boolean with an enum, with the
default value being to use the prefers-color-scheme feature of the
operating system to determine which theme to use.

Fixes: #14451.

Co-authored-by: @kPerikou <44238834+kPerikou@users.noreply.github.com>
2020-06-21 01:09:01 -07:00
Tim Abbott 9bd8ead32d i18n: Update translation data from Transifex. 2020-06-20 23:33:18 -07:00
SiddharthVarshney 1a8e9d1164 user-profile: Change color of `name` field.
With the previous color it was hard to read the text and
also that color does not matches with the zulip style.

This commit changes the color of `name` field for
user-profile modal for better visability both in day
and night mode.
2020-06-20 23:32:49 -07:00
sahil839 63389b3bd3 invite: Add option to invite user as an organization owner.
We can now invite new users as realm owners. We restrict only
owners to invite new users as owners both for single invite
and multiuse invite link. Also, only owners can revoke or resend
owner invitations.
2020-06-20 23:04:59 -07:00
Aman Agrawal a052d24231 recent_topics: Support arrow key navigation.
Add arrow key navigation support for recent topics.

Simple jquery is used to allow navigation for filter buttons,
a grid system is used for navigation inside table.
2020-06-20 22:50:47 -07:00
Aman Agrawal 05f7cb7750 click_handlers: Trigger click on enter keypress on icons in RT.
To allow user to perform all actions using keyboard in recent
topics overlay, we convert enter to click event on icons.
2020-06-20 22:29:48 -07:00
Aman Agrawal 34e62f06f4 recent_topics: Renamed 'muted' filter for clarity. 2020-06-20 22:29:48 -07:00
Anders Kaseorg 7e9db327b3 request: Improve validator type so mypy can check it against REQ.
Old: a validator returns None on success and returns an error string
on error.

New: a validator returns the validated value on success and raises
ValidationError on error.

This allows mypy to catch mismatches between the annotated type of a
REQ parameter and the type that the validator actually validates.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-06-20 22:29:15 -07:00
Anders Kaseorg 596bfb47c4 papertrail: Replace custom validator with check_dict.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-06-20 22:29:15 -07:00
Anders Kaseorg 114f859d3a api_travis_webhook: Fix message type annotation.
Not all values of this dict are strings, just the ones we use.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-06-20 22:29:15 -07:00
Anders Kaseorg c0fa42dd8c complete_zoom_user: Validate state type correctly.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-06-20 22:29:15 -07:00
Anders Kaseorg 64038163e7 update_user_backend: Validate profile_data type correctly.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-06-20 22:29:15 -07:00
Anders Kaseorg c584462b32 update_storage: Validate storage type correctly.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-06-20 22:29:15 -07:00
Anders Kaseorg 717e349834 events_register_backend: Validate client_capabilities type correctly.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-06-20 22:29:15 -07:00
Anders Kaseorg 475fc5910f update_user_custom_profile_data: Validate data type correctly.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-06-20 22:29:15 -07:00
Anders Kaseorg 6e33b9c6f2 get_events_backend: Validate narrow type correctly.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-06-20 22:29:15 -07:00
Tim Abbott f1707cfec6 docs: Remove translating guide 'realm' details.
We now have linters that ensure "realm" never leaks into user-facing
strings, preferring "organization" instead.
2020-06-20 20:41:46 -07:00
apxwn 027e56e9b9 docs: Improve Russian translating guide. 2020-06-20 20:39:37 -07:00
Tim Abbott 0542c60466 docs: Do a general update pass on OpenAPI developer docs. 2020-06-20 19:06:07 -07:00
sahil839 318bc0ca1e stream: Fix message on clicking add button with empty subscribers form.
This commit corrects the message shown when we click the add button
for subscribing users to stream with empty input.
We show 'No user to subscribe.' as the message when trying to add
subscribers with empty input.

Fixes #15450.
2020-06-20 17:55:23 -07:00
SiddharthVarshney 3e1a0c0e32 portico: Fix UI of /accounts/go page.
Fixes: #14809
2020-06-20 17:54:06 -07:00
SiddharthVarshney 92059a5379 css: Use SCSS nesting for `.portico-landing.hello .gradients .gradient`. 2020-06-20 17:46:08 -07:00
SiddharthVarshney 5f8b8d62b9 css: Use SCSS nesting for `.portico-landing.hello .hero`. 2020-06-20 17:46:08 -07:00
SiddharthVarshney c3847c9b30 css: Use SCSS nesting for `.portico-landing.hello .hero header`. 2020-06-20 17:46:08 -07:00
SiddharthVarshney 0453c0bc36 css: Use SCSS nesting for `.portico-landing.hello .hero header button`. 2020-06-20 17:46:08 -07:00
SiddharthVarshney 5a02fd4a6b css: Use SCSS nesting for `.portico-landing.hello .hero .content`. 2020-06-20 17:46:08 -07:00
SiddharthVarshney cabdc72722 css: Use SCSS nesting for `.portico-landing.hello .hero .waves`. 2020-06-20 17:46:08 -07:00
SiddharthVarshney 45ea511225 css: Use SCSS nesting for `.portico-landing.hello .hero .waves .wave`. 2020-06-20 17:46:08 -07:00