Commit Graph

32061 Commits

Author SHA1 Message Date
vinitS101 20e6f67e70 org_settings: Permanently hide some settings tabs from users and guests.
Some organisation settings tabs have been permanently hidden from
non-admins, since they are useful to non-admins and can create
confusion for new users.
2019-05-31 22:41:46 -07:00
Tim Abbott 43e634a9b8 Revert "dependencies: Upgrade webpack-dev-server to v3.4.1."
This seems to have broken the development server.

This reverts commit daf8dd1960.
2019-05-31 17:59:13 -07:00
Wyatt Hoodes 4a79be331e test_fixtures.py: Use hashing to optimize migrations check.
Instead of running `what_to_do_with_migrations` unconditionally, we
first hash and compare the files located in `*/migrations/*`. Only if
a migration file has changed (or the hash file does not exist yet) do we
call `what_to_do_with_migrations`.

It was discovered that the call to Django's `showmigrations.py` file was
causing roughly a 500ms increase in `test-backend`'s start up time.

However, this fix only saves about 100ms, apparently because a lot of
that work was importing Django dependnecies we need for most tests
anyway.

Fixes: #12428.
2019-05-31 17:44:17 -07:00
Tim Abbott 320812ccec docs: Reorganize remote development docs a bit. 2019-05-31 17:35:10 -07:00
Kanishk Kakar 747096c123 docs: Add rmate instructions for remote dev. 2019-05-31 17:15:56 -07:00
Anders Kaseorg faa4cf629a webpack: Close potential race condition leaking webpack-dev-server process.
This exchanges a race condition where webpack-dev-server might not be
stopped on a poorly timed KeyboardInterrupt for a less bad race
condition where we might get an UnboundLocalError.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-05-31 17:08:48 -07:00
Eeshan Garg cf921d5981 webhooks/buildbot: Add missing "skipped" build result code.
The payload for when a build is cancelled was causing an error
because the build result code mapping was missing one of the
codes. This commit also fixes a minor typo in the result codes.
2019-05-31 16:59:42 -07:00
Priyank Patel 2a864ebad3 webpack: Restart webpack-dev-server on config file changes.
This should make the run-dev.py user experience a lot nicer when
switching branches away from a branch that is at least as new as this
commit, since we won't need to manually restart run-dev.py to restart
webpack.

Fixes #9042.
2019-05-31 16:10:47 -07:00
Puneeth Chaganti 9aa5a2b369 url preview: Use oEmbed html for videos.
Ensure that the html is safe, before using it. The html is considered if it is
in an iframe with a http/https src, based on the recommendations here:
https://oembed.com/#section3

We directly embed the `iframe` html into the lightbox overlay.
2019-05-31 15:59:03 -07:00
Puneeth Chaganti c8cb785950 url preview: Show inline images as previews for oEmbed photo pages. 2019-05-31 15:59:03 -07:00
Puneeth Chaganti a1590c613e url preview: Enable server level setting for url embed previews.
This significantly simplifies the process for enabling this feature in
new organizations.
2019-05-31 15:37:03 -07:00
Puneeth Chaganti 8c0c9ca7a4 url preview: Turn Realm.inline_url_embed_preview off by default. 2019-05-31 15:28:32 -07:00
Kleidi Eski 4d8ee17a98 images: Add header design for Zulip Twitter account. 2019-05-31 15:24:56 -07:00
Priyank Patel daf8dd1960 dependencies: Upgrade webpack-dev-server to v3.4.1. 2019-05-31 15:07:17 -07:00
Yashashvi Dave 7d75cdef7f subs: Rename `in_home_view` checkbox-setting template element. 2019-05-30 21:39:06 -07:00
Yashashvi Dave 2a943d3b40 static/js/stream_muting: Rename `update_in_home_view` function. 2019-05-30 21:39:06 -07:00
Yashashvi Dave 784d02bf60 static/js/stream_data: Rename `in_home_view` functions. 2019-05-30 21:39:06 -07:00
Yashashvi Dave 40f550038d subs: Replace all `in_home_view` uses with `is_muted` property.
Replace all uses of `in_home_view` subscription property
with `is_muted` property in frontend.

Fixes #12322
2019-05-30 21:39:06 -07:00
Mateusz Mandera f73600c82c rate_limiter: Create a general rate_limit_request_by_entity function. 2019-05-30 16:50:11 -07:00
Puneeth Chaganti 22d0cd9696 url preview: Don't cache embed data when fetch has network errors. 2019-05-30 16:45:22 -07:00
Pragati Agrawal 69ec96b63e search suggestion: Hide email under hidden email-address-visibility cases.
This commit hides the email address from the search bar for the email
hidden cases.
2019-05-30 16:22:54 -07:00
Shubham Dhama 03d188b5bd settings_org: Fix show_email function when email visibility is admin only.
`show_email` function should return false when email visibility is set
anything other than `everyone` (, for now, irrespective of privileges).
2019-05-30 16:22:54 -07:00
Shubham Dhama c691ed433b settings_org: Fix the typo in `settings_org.show_email()` function. 2019-05-30 16:22:54 -07:00
YashRE42 5ff27c130a info-overlay: Fix "message formating" styling.
This reverts the temporary solution from 04d9d1d and introduces a
better, more permanent solution for the same bug.
2019-05-30 16:18:54 -07:00
YashRE42 43bc1d4d5a info-overlay: Increase size of arrow icons. 2019-05-30 16:18:54 -07:00
YashRE42 5f1a32a9ee arrow-icons: Replace ⇽ , ⇾ with ← , → everywhere.
We were using these hollowed out arrows characters (⇽ , ⇾) in a few
places, these were inconsistent with the solid up and down arrow
characters (↑ , ↓) we use otherwise. This commit replaces them
everywhere in the codebase.
2019-05-30 16:18:54 -07:00
YashRE42 19ad090c99 info-overlay: Switch arrow key names to icons.
This commit switches "Up" with "↑", "Down" with "↓" and etc.
2019-05-30 16:18:54 -07:00
Anders Kaseorg eeeaf01eef Vagrantfile: Update Docker fallback patch for installed but broken case.
The corresponding upstream PR has been updated as well.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-05-30 16:01:45 -07:00
Vaibhav f366c50913 user_info: Add bot owner to the user info popover.
This includes all the changes on the frontend side to include the
bot owner in the popover. Includes the bot owner name as a link which
opens the full profile of the bot owner.

For bots without any owner (such as Notification Bot or Welcome Bot)
in place of bot owner name, 'System Bot' appears for cross realm bots
and 'Bot' for in-realm bots.

Fixes #10844.
2019-05-30 15:45:56 -07:00
Vaibhav 20d4aa96a9 user_info: Add `is_cross_realm_bot` to user info dataset. 2019-05-30 15:43:18 -07:00
Vaibhav 3462db3ecc node: Add test for updating bot_owner_id and enable user_events test suite.
Reverts the commit 4442509ec3
2019-05-30 15:43:18 -07:00
Vishnu Ks 55bf44152a import: Handle hidden_by_limit case for files in slack import.
Fixes #12011
2019-05-30 12:01:09 -07:00
Mateusz Mandera 4facc93670 retention: Add archiving of SubMessages. 2019-05-30 11:40:20 -07:00
Mateusz Mandera 37c42a09e5 retention: Archiving of models tied to a Message, applied to Reactions.
We add general code that will archive models that are tied to a specific
Message (such as Reactions and SubMessages). Certain details of the
model are grabbed from a list models_with_message_key, and then used to
create queries that will archive these database tables.
We put Reaction in that list in this commit, and add appropriate tests.
To have archiving of other analogical models (for example SubMessage),
one only needs to make an appropriate entry in the
models_with_message_key list.
2019-05-30 11:40:20 -07:00
Mateusz Mandera dfee559333 test_retention: Check that Reactions get correctly deleted. 2019-05-30 11:33:41 -07:00
Mateusz Mandera 29729b7748 test_retention: Check that SubMessages get correctly deleted. 2019-05-30 11:27:38 -07:00
Mateusz Mandera 6d69405f54 test_retention: Keep helper functions in a base class. 2019-05-30 11:27:38 -07:00
Mateusz Mandera 2370e6717c test_retention: Factor out _make_expired_zulip_messages helper function. 2019-05-30 11:27:38 -07:00
Rafid Aslam b52a7aed07 docs: Move tutorials/documenting-api-endpoints to documentation/api.
Move docs/tutorials/documenting-api-endpoint.md to
docs/documentation/api.md.

This makes it easier to find when browsing the complete set of
materials on writing Zulip documentation.
2019-05-30 11:12:25 -07:00
Hemanth V. Alluri b67d263b1a api docs: Avoid using \" in curl examples.
It's much cleaner to encode the JSON without quote-escaping.

closes #12196.
2019-05-30 11:05:41 -07:00
Anders Kaseorg d9f12cfb49 documentation_crawler: They’re called fragments, not permalinks.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-05-30 10:39:47 -07:00
Anders Kaseorg 4f28b88746 documentation_crawler: Set a 15 second download timeout.
By default it just hangs for as long as the server keeps the
connection open.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-05-30 10:39:47 -07:00
Anders Kaseorg c59747360a documentation_crawler: Set the default log level to warning.
This doesn’t seem to add any noise in the normal case, but if anything
shows up here we might want to see it.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-05-30 10:39:47 -07:00
Anders Kaseorg 2f547eaee4 documentation_crawler: Improve error handling.
* Remove the custom has_error logic in favor of checking whether any
  errors were logged, which gives us a much better chance at catching
  unanticipated exceptions.
* Use our error_callback for the initial requests of start_urls too.
* Clean up mypy types.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-05-30 10:39:47 -07:00
Anders Kaseorg 4c60e994c8 test-documentation: Fail on any nonzero exit code.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-05-30 10:39:47 -07:00
Anders Kaseorg 0ca9c260ae test-documentation: Use getopt; don’t silently ignore multiple arguments.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-05-30 10:39:47 -07:00
Vishnu Ks 8c249644b1 billing: Seperate out tests for invoice and autopay form fields. 2019-05-30 10:34:56 -07:00
Vishnu Ks a46b2386b6 billing: Add node tests for helpers.js. 2019-05-30 10:34:56 -07:00
Vishnu Ks b7d210a932 billing: Use javascript onhashchange handler instead of jQuery one.
Makes it easier to obtain the onhashchange handler
in node tests.
2019-05-30 10:34:56 -07:00
Vishnu Ks 5fc538cac0 billing: Use on(click) instead of click handler.
Makes it easy to get the click handler in node tests.
2019-05-30 10:34:56 -07:00