Commit Graph

31885 Commits

Author SHA1 Message Date
Mateusz Mandera 58da8fd5f1 test-backend: Remove email_mirror from not_yet_fully_covered.
The preceding commits get the email mirror to 100% coverage, so we can
now remove zerver/lib/email_mirror.py from the list of not-fully-covered
files.
2019-05-20 19:35:32 -07:00
Mateusz Mandera 4f9bbe9d66 email_mirror: Clean up and expand test_get_missed_message_token.
This is the only function in TestEmailMirrorLibrary, so we rename this
class to more appropriate TestGetMissedMessageToken, clean it up a bit
and add some extra checks to finally get email_mirror.py to 100% test
coverage.
2019-05-20 19:35:32 -07:00
Mateusz Mandera a0efd76f4e email_mirror: Rewrite log_and_report and cover it with tests.
log_and_report and its helper functions were mostly old code no longer
well adapted to how email mirror works currently, as well as having no
test coverage. We rewrite this part of the email to report errors in a
similar manner, and add tests for it. We're able to get rid of the
clunky and now useless debug_info dictionary in process message, as
log_and_report only needs the recipient email in its third argument.
2019-05-20 19:35:32 -07:00
Mateusz Mandera 2adcdd0c25 email_mirror: Don't pass debug_info to process_stream_message.
The only place in which process_stream_message used debug_info was to
set the 'stream' key, which would only be used if ZulipEmailForwardError
was raised after this line in the code - which is impossible, because after
that line only send_zulip (which doesnt raise this exception) and
logger.info get called, then process_stream_message successfully returns
and then process_message succesfully returns as well. So this debug_info
code wasn't doing anything. We remove it.
2019-05-20 19:35:32 -07:00
Anders Kaseorg f146a2a5ac Revert "gitattributes: Mark yarn.lock as "binary", i.e. suppress diffs."
This reverts commit a717ac6d85.

.gitattributes affects the behavior of many Git operations like rebase
and merge and mergetool, not just the output of show and diff.
Treating yarn.lock as binary was making it too hard to deal with
yarn.lock diffs when we actually needed them.  Also, the GitHub
website ignores this setting and suppresses large parts of diffs
regardless.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-05-20 19:31:14 -07:00
Anders Kaseorg 2f43284dd8 user_profile_modal: Move SimpleBar back to the correct div.
Fixes a regression in commit 01613e71fb
(#12348).

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-05-20 19:25:21 -07:00
Anders Kaseorg d267884cc1 node_cache: Run yarn install with --frozen-lockfile.
This way a yarn.lock inconsistent with package.json can’t slip through
unnoticed.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-05-20 19:23:37 -07:00
Anders Kaseorg 978357e55e dependencies: Update yarn.lock for simplebar@4.0.0-alpha.9 upgrade.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-05-20 19:23:37 -07:00
Tim Abbott 4cbe489576 docs: Highlight send messages API in incoming webhooks page.
While we already talk about this in the "overview" section, it appears
some folks skipped that and were confused.
2019-05-20 19:18:30 -07:00
Tim Abbott e35773658b css: Remove weird whitespace rules in markdown content.
These seem to have been there since the very first version of our
markdown styling, and I can't imagine why we would the behavior of not
line-wrapping links now.

(I think the "weird bug" mentioned in the comment history might have
to do with an old animation when you hovered over a link on portico
pages).
2019-05-20 19:14:35 -07:00
Tim Abbott 734c18f356 integrations: Fix buggy ol/paragraph spacing.
This appears to caused by trying to reuse this bit of spacing logic
from the Help Center's CSS rules.

I'm not altogether happy with this fix, but it resolves the issue and
we can defer further work until we're ready to clean up the
portico/landing pages CSS more generally.
2019-05-20 18:54:46 -07:00
sameerchoubey d711b1c8ba portico: Add responsive styling to /integrations/ subpages.
Tweaked by tabbott to clean up the commit message and some confusing
code duplication.

Fixes #11701.
2019-05-20 18:49:27 -07:00
Aditya Bansal 43591d6c71 archives: Display globe icon for web public streams.
In this commit we start reserving the globe icon for web public
streams and replace instances of mixed usage of globe for public
streams with a '#'.
2019-05-20 18:13:31 -07:00
Tim Abbott ba56833b02 auth: Make development login work with emails hidden. 2019-05-20 18:13:31 -07:00
Joshua Pan c28c301506 org_settings: Display delivery_email to admins always is admin UI.
Mostly rewritten by Tim Abbott to ensure it correctly implements the
desired security model.

Administrators should have access to users' real email address so that
they can contact users out-of-band.
2019-05-20 18:13:31 -07:00
Tim Abbott 07856ad648 api: Override client_gravatar for EMAIL_ADDRESS_VISIBILITY_ADMINS.
Clients won't have access to user email addresses, and thus won't be
able to compute gravatars.

The tests for this are a bit messy, in large part because our tests
for get_events call subsections of it, rather than the main function.
2019-05-20 18:13:31 -07:00
Tim Abbott bcc6949461 zilencer: Add better error handling for IntegrityError.
This provides a clean warning and 40x error, rather than a 500, for
this corner case which is very likely user error.

The test here is awkward because we have to work around
https://github.com/zulip/zulip/issues/12362.
2019-05-20 17:53:43 -07:00
Pragati Agrawal 8eac7394f8 typeahead helper: Hide email under hidden email-address-visibility cases.
In email hidden case (that is when `email_address_visibilty` is set to
everyone), for "non admins", this commit hides emails from:
- compose box user typeahead.
- PM user typeahead
In email hidden case, for admins, email is shown in user typeaheads.
2019-05-20 15:56:23 -07:00
Pragati Agrawal cdc50090b6 popovers: Hide email under hidden email-address-visibility cases.
In email hidden case (that is when `email_address_visibilty` is set to
everyone), for "non admins", this commit hides emails from:
- user popover
- custom profile popover
In email hidden case, for admins, email is shown in both user popovers and
custom profile popovers.
2019-05-20 15:56:21 -07:00
Pragati Agrawal 4df971c3c2 org settings: Add save/discard widget for realm authentication methods.
Along with this, we refactored settings_org.populate_auth_methods to use
HTML function after rendering all auth methods rows rather than appending
each row individually, which actually is a good practice.

Also in this commit, to compare `current_val` and `changed_val` in
`check_property_changed` function of the property
`realm_authentication_methods`, which are objects, and we found here
https://stackoverflow.com/a/1144249 that there is no easy way to do so. So
I followed this approach,

```js
 JSON.stringify(obj1) === JSON.stringify(obj2)
```

but before converting them to string we want the same order of keys, so we
used `sort_object_by_key` to sort `current_val` by keys and
`get_auth_method_table_data` always return `changed_val` having keys
sorted.

Since these refactor were closely related we kept them as a single commit
here.

Fixes: #11954.
2019-05-20 15:42:15 -07:00
Pragati Agrawal c634d22de9 org settings: Add `sort_obj_by_key` function to sort objects.
Actually, this is a preliminary commit which adds a general
`sort_obj_by_key` function to sort objects according to keys.

In this commit, we have refactored `populate_auth_methods` function by
extracting the logic for the desired `sort_obj_by_key` and used that to
sort `auth_methods`, but the main motive of this function is to sort
`realm_authentication_methods` in `check_property_changed` to sort
`current_val` in the upcoming commit.
2019-05-20 15:41:45 -07:00
Tim Abbott 7042965102 docs: Remove Vagrant docs zulip-devel recommendation.
Nobody has actually gone to the email list in like 2 years, and we
just renamed it to be an announcement list.
2019-05-20 15:37:13 -07:00
Tim Abbott a15d85e7c4 integrations: Remove zulip-devel@ recommendation for jenkins.
That list is deprecated, and further, the issue tracker for the plugin
is a better place to report issues/trouble with the plugin in any
case.
2019-05-20 15:30:04 -07:00
Tim Abbott e006a628b1 docs: Update THIRDPARTY notes on upstream.
Mostly copyright date updates, but also removing references to the
deprecated zulip-devel@googlegroups.com.
2019-05-20 15:29:05 -07:00
Tim Abbott 136a0da30b provision: Update unsupported architecture logging messages.
We don't use zulip-devel@ anymore, and also add a comment that it's
probably not a huge project to support e.g. arm.
2019-05-20 15:23:40 -07:00
Vishnu Ks d1007c0a6b docs: Mention twitter account as alternative to mailing list. 2019-05-20 15:21:15 -07:00
Vishnu Ks 6c6754d41c docs: Update mailing list id in contributing.md. 2019-05-20 15:21:15 -07:00
Rishi Gupta fbc2239f73 keyboard shortcuts: Update description for S. 2019-05-20 15:10:11 -07:00
Rishi Gupta 3a02e362f5 keyboard shortcuts: Remove P from Basics.
This is not a top ten shortcut to know, and will eventually be g+p anyway.
2019-05-20 15:10:11 -07:00
Puneeth Chaganti bdf8183f55 open graph: Uploaded realm icon URL is absolute for some backends.
The `LocalUploadBackend` returns a relative URL, while the `S3UploadBackend`
returns an absolute URL. This commit switches to using `urljoin` to obtain the
absolute URL, instead of simply joining strings.
2019-05-20 13:14:28 -07:00
Tim Abbott 263657dcb6 integrations: Clean up comments in devtool JavaScript.
Most of this is just editing for brevity or focus.
2019-05-20 12:52:56 -07:00
Hemanth V. Alluri 1a12e112d9 devtools: Completely overhaul the frontend for the integrations devtool.
This commit also adds a small functionality change where the results of
each webhook fixture message sent is now displayed to the user.

With a small tweak by tabbott to fix a styling bug.

Fixes #12122.
2019-05-20 12:36:15 -07:00
Hemanth V. Alluri ef98211f68 devtools: Add support for non-json fixtures for the integrations tool.
Note: If you're going to send fixtures which are not JSON or of the
text/plain content type, make sure you set the correct content type
in the custom headers.

E.g. For the wordpress fixtures the "Content-Type" should be set to
"application/x-www-form-urlencoded".
2019-05-20 12:31:52 -07:00
Hemanth V. Alluri 8214d65336 devtools: Add support for send_all in the integrations dev panel.
Using this feature a reviewer can easily send and view all fixture
messages for any given integration - with only JSON fixtures that is.
2019-05-20 12:29:10 -07:00
Rishi Gupta d17fb622c9 popovers: Refactor user popover to match visual order.
Just swapping an "if is_me" block with a consecutive "unless is_me" block,
so should be no change in logic.
2019-05-20 12:21:57 -07:00
Rishi Gupta 36ff56e741 message feed: Add hotkey hint to Edit pencil on message hover. 2019-05-20 12:18:13 -07:00
Tim Abbott a28af1fd64 css: Remove unnecessary prefixed transitions.
The transition keyword has been standard for a while now; see the
previous commit for details.
2019-05-20 12:15:16 -07:00
Boris Yankov 18a350f042 css: Remove unnecessary 'prefixed-transition' mixin.
The `transition` property does not need prefixing. In fact, very
few properties need that nowadays. So remove it to simplify
the code. This is strictly a refactor with no style change intended.

Many of these styles shouldn't have been prefixed even if needed.
The prefixes exist exactly because the implementations might differ
from the incoming standard.

Looking at the supported browsers:
https://caniuse.com/#search=transition

We see that this property has had mainstream support from 2012 and
was supported on Firefox in 2006 !!!
2019-05-20 12:15:16 -07:00
Vaibhav 76295dd59f css: Club rules in reactions.scss under selector `.message_reaction_count`. 2019-05-20 12:01:49 -07:00
Vaibhav ae47ddc16e css: Use SCSS nesting in reactions.scss for `.reaction_button`. 2019-05-20 12:01:49 -07:00
Vaibhav e8c072a4c8 css: Reorder reactions.scss so that `.reaction_button` are in one place. 2019-05-20 12:01:49 -07:00
Vaibhav c4b683a638 css: Use SCSS nesting in reactions.scss for `.message_reaction`. 2019-05-20 12:01:49 -07:00
Vaibhav 9ef3a660b3 css: Reorder reactions.scss so `.message_reaction` are in same place. 2019-05-20 12:01:49 -07:00
Vaibhav 9e1ee434a7 css: Use SCSS nesting in reactions.scss for `.private-message`.
Precisely for `.private-message .message_reactions .message_reaction`.
2019-05-20 12:01:49 -07:00
Vaibhav 129dfec297 css: Use SCSS nesting in reactions.scss for `.message_reactions`. 2019-05-20 12:01:49 -07:00
Vaibhav c726198cbc css: Reorder reactions.scss so `.message_reactions` are in same place.
This atomically makes `.private-message` in same place too.
2019-05-20 12:01:49 -07:00
Vaibhav 7d8ced7375 css: Use SCSS nesting in reactions.scss for `.emoji-popover-emoji`. 2019-05-20 12:01:49 -07:00
Vaibhav eb8a8fa0dc css: Reorder reactions.scss so `.emoji-popover-emoji` are in same place. 2019-05-20 12:01:49 -07:00
Vaibhav a20b48589f css: Use SCSS nesting in reactions.scss for emoji popover rules. 2019-05-20 12:01:38 -07:00
Vaibhav 8eaa12c49a css: Reorder reactions.scss so `.emoji-popover` are in same place. 2019-05-20 11:53:34 -07:00