Commit Graph

10250 Commits

Author SHA1 Message Date
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
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
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
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
SiddharthVarshney f96e38a8bd css: Reorder css for `.portico-landing.hello .hero`. 2020-06-20 17:46:08 -07:00
SiddharthVarshney be8027cb54 css: Use SCSS nesting for `.portico-landing.features-app`. 2020-06-20 17:46:08 -07:00
SiddharthVarshney ce9a365c62 css: Use SCSS nesting for `.portico-landing.features-app .feature-block`. 2020-06-20 17:46:08 -07:00
SiddharthVarshney d8a3ca0b2e css: Use SCSS nesting for `.portico-landing.features-app .cta`. 2020-06-20 17:46:08 -07:00
SiddharthVarshney c37d83347c css: Use SCSS nesting for `.portico-landing.features-app .cta:hover`. 2020-06-20 17:46:08 -07:00
SiddharthVarshney 7ea662e035 css: Use SCSS nesting for `.portico-landing.features-app section`. 2020-06-20 17:46:08 -07:00
SiddharthVarshney b3db95e879 css: Use SCSS nesting for `.portico-landing.features-app section a`. 2020-06-20 17:46:08 -07:00
SiddharthVarshney 544622a435 css: Use SCSS nesting for `.portico-landing.features-app section a.feature-block`. 2020-06-20 17:46:08 -07:00
SiddharthVarshney 553c3f1a50 css: Use SCSS nesting for `.portico-landing.features-app section .headliner`. 2020-06-20 17:46:08 -07:00
SiddharthVarshney 17ddbf33b1 css: Use SCSS nesting for `.portico-landing.features-app section.notifications`. 2020-06-20 17:46:08 -07:00
SiddharthVarshney acfd7755bb css: Use SCSS nesting for `.portico-landing.features-app section.notifications .feature-list`. 2020-06-20 17:46:08 -07:00
SiddharthVarshney b19902e00c css: Use SCSS nesting for `.portico-landing.features-app section.notifications .feature-list h3`. 2020-06-20 17:46:08 -07:00
SiddharthVarshney 88c2dfa580 css: Merge css for `.portico-landing.features-app section.notifications`. 2020-06-20 17:46:08 -07:00
SiddharthVarshney 6ec11e549d css: Use SCSS nesting for `.portico-landing.features-app section.messages`. 2020-06-20 17:46:08 -07:00
SiddharthVarshney ea1d2688c8 css: Use SCSS nesting for `.portico-landing.features-app section.messages .features`. 2020-06-20 17:46:08 -07:00
SiddharthVarshney 9a7c6504bb css: Use SCSS nesting for `.portico-landing.features-app section.keyboard-shortcuts`. 2020-06-20 17:46:08 -07:00
SiddharthVarshney 621dd2a445 css: Use SCSS nesting for `.portico-landing.features-app section.keyboard-shortcuts img`. 2020-06-20 17:46:08 -07:00
SiddharthVarshney 00eb90a551 css: Use SCSS nesting for `.portico-landing.features-app section.hero`. 2020-06-20 17:46:08 -07:00
SiddharthVarshney 68268c8c1e css: Use SCSS nesting for `portico-landing.show`. 2020-06-20 17:46:08 -07:00
SiddharthVarshney d61fd5d9eb css: Reorder `.portico-landing` and `.portico-landing.show`. 2020-06-20 17:46:08 -07:00
arpit551 0c6488b284 analytics: Added frontend for messages read over time graph.
The chart added is similar to the messages sent over time chart.

Fixes #15167
2020-06-20 16:52:33 -07:00
SiddharthVarshney e763d30f18 help: Update help docs for ellipsis.
Update help docs where chevron was previously
mentioned for sidebar manu icons.

Add css for `i.zulip-icon` to position icon
properly.
2020-06-20 16:47:43 -07:00
Ryan Rehman d59ccd4c0f message view: Fix link generation logic of the end of results notice.
This improves the logic and fixes the bug where the href was calculated
based on the current URL and not the filter of the current message list.

We now add the '/streams/public/' operator at the start of the operators,
similar to how it is represented in all other cases.

Fixes #15405
2020-06-20 16:26:25 -07:00
Rohitt Vashishtha fca7897d76 minor: Fix typos in migration to image upload widget.
We were showing the organisation profile picture  in place of the
logo and night-mode logo after the migration. This change fixes it.

Fixes #15493.
2020-06-20 16:21:02 -07:00
SiddharthVarshney b122ad7da4 topic-popover: Add chevron-right icon in topic popover title. 2020-06-20 14:57:54 -07:00
Ryan Rehman aa82008503 search pills: Fix pills misalignment bugs visible in firefox.
The `.search_icon` lies inside the `.pill_container` so we had to
remove it's display attribute which should have no visual changes.

We add `flex-wrap: nowrap` to prevent the cursor from moving onto
a new line, below the pills.

Fixes #15480.
2020-06-20 14:50:56 -07:00
sahil839 5f62696bc5 subs: Remove click handler for a non-existent class.
This commit removes the click handler used for
'empty_feed_sub_unsub' class.
This class was used only in home.html and was replaced
by 'stream_sub_unsub_button' in 576be51.
2020-06-20 14:21:28 -07:00
Ryan Rehman 21cdc26193 search: Support multiple search pills creation.
This reverts part of b0d632577f.
The problem was that multiple queries were combined as a single
search pill. And since we create the pills then narrow / search,
we added a comma seperator between them for the typeahead lookups
as required by the logic in `input_pill.js`.

This however introduced a new bug where the search suggestions
were incorrect as the typeahead lookup table wasn't updated, so
every time an item from the type ahead was selected it updated
the input string with an invalid operator.

Thus to resolve the first problem, we follow a simpler approach
by extracting all operators from the search string using our
`Filter.parse` logic and next add the pills, one by one.
2020-06-19 16:18:52 -07:00
Ryan Rehman 70b92c7eb3 search: Clicking on a search pill should not lose searchbox focus.
Whenever a search pill is selected or deleted by a click the navbar
gets rendered as the searchbox loses focus. This allows the user to
be able to continue editing the search query without having to refocus
the searchbox.
2020-06-19 16:18:52 -07:00