Commit Graph

19150 Commits

Author SHA1 Message Date
Steve Howell 74f9612147 node tests: Simplify trigger stubbing in stream_events.js.
This test verifies the following line of code:

    $(document).trigger($.Event('subscription_remove_done.zulip', {sub: sub}));

Before this change, the mocking mechanism used `$(document).on(...)`
to set the function that gets called on trigger, but it didn't clear
any of the other handlers.

Since all we care about is making sure that the event gets triggered,
we now just override `$(document).trigger`.
2017-07-06 10:27:09 -04:00
Steve Howell 38e3d2fc11 node tests: Use get_on_handler in stream_list.js. 2017-07-06 09:23:06 -04:00
Steve Howell 6a8fa55521 node tests: Use get_on_handler() in message_store.js. 2017-07-06 09:13:19 -04:00
Steve Howell 99a6a9b70d node tests: Replace trigger() calls in activity.js.
We now use get_on_handler() to call event handlers, rather
than simulating a triggered event.
2017-07-06 08:46:36 -04:00
Aditya Bansal 9c90a3d1a3 zjquery: Add get_on_handler(). 2017-07-06 08:37:39 -04:00
Aditya Bansal 641b38f79b zjquery: Add get_on_handlers(). 2017-07-06 08:36:38 -04:00
Aditya Bansal 3b30701844 zjquery: Add selector param option to on() function. 2017-07-06 08:29:07 -04:00
Umair Khan 638b32542d auth: Don't show deactivation notice to mirror dummies. 2017-07-05 23:50:53 -07:00
rht 8aaf34d06d Lock the recursive requirements in common.txt via pip-compile.
The commit is composed of: (1) distill out top-level dependencies in
common.txt, (2) add -e flag to the vcs-based packages because
pip-compile can't do without, (3) pip-compile/generate the locked files
then remove the -e flags from the lockfile, (4) pin pathlib2 to dev.txt
because it turns out it is a direct requirement of
documentation_crawler, (5) document the structure and add an automation
script (6) remove cryptography==1.9 from requirements/scrapy.txt since
cryptography is automatically added from pyopenssl (7) add sed command
to remove future/futures from the generated lock file in python3 (this
should have been automatically handled by pip-compile, so pending for
the feature from pip-compile)

Tweaked by tabbott to update PROVISION_VERSION and add a missing
`first` dependency.
2017-07-05 23:47:07 -07:00
Tommy Ip 61e24cfbea tools: Remove unused `bright_red_output` context manager.
This context manager is no longer in use since the linter visual
updates.
2017-07-05 23:31:09 -07:00
Tommy Ip 2dc35e6c11 linter: Update custom linters' visual output. 2017-07-05 23:31:09 -07:00
Tommy Ip d188c54ebc linter: Update pyflakes visual output. 2017-07-05 23:31:09 -07:00
Tommy Ip cff2b1ba9e linter: Update pep8 visual output. 2017-07-05 23:31:09 -07:00
Tommy Ip 766abaa1a3 linter: Update external_linter visual output. 2017-07-05 23:31:08 -07:00
Tommy Ip e0d4a007e8 linter: Add `identifier` argument to `custom_check_file` function.
In preparation for the upcoming linter output update, each custom
linter now has a identifier argument. This would be used for separating
each line of lints, eg:

    py        | Missing space around "%" at analytics/views.py line 485:
    py        |         output += '<hr>%s\n'%(string_id,)
    css       | 64c64,65
    css       | <     opacity: 1; }
    css       | ---
    css       | >     opacity: 1;
    css       | > }
    css       | static/styles/lightbox.css seems to be broken:
    swagger   | In static/swagger/zulip.yaml:
    swagger   | Duplicate operationId: registerQueue
2017-07-05 23:23:45 -07:00
Tommy Ip 3b8864bafa linter: Create error printing library.
For performance reasons, we spawn each linter in a separate OS thread.
The downside of this is that all lints would end up in stdout without
much visual separation, resulting in confusing error log. This commit
introduce the `print_err` function, which shows which linter each line
of lint is from.
2017-07-06 13:46:10 +08:00
Brock Whittaker c4c3124d34 settings: Indent organization permissions checkboxes. 2017-07-05 17:50:04 -07:00
Brock Whittaker bd23e0a62b settings: Change bot settings top text to a tip. 2017-07-05 17:45:59 -07:00
Brock Whittaker 62cc8b658e settings: Change stream list top text to a tip. 2017-07-05 17:45:52 -07:00
Brock Whittaker 1b616d761e settings: Fix email input whitespace issue.
This fixes the issue where the email has whitespace potentially in the
input due to the HTML formatting.
2017-07-05 17:45:30 -07:00
Rishi Gupta a26703109e settings: Change all uses of ZULIP_ADMINISTRATOR to FromAddress.SUPPORT.
Make it less likely that further development will break compatibility with
ZULIP_ADMINISTRATORs of the form "name <email>".

Note that the suggested value for this setting has been
'zulip-admin@example.com' for a while, so hopefully this commit causes no
change for most installations.
2017-07-05 15:33:01 -07:00
Rishi Gupta 1291ac9eff emails: Groundwork to personalize reply-to name of missed message emails. 2017-07-05 15:33:01 -07:00
James Rowan 388cef900e tests: Enforce that activation emails come from NOREPLY address. 2017-07-05 15:19:00 -07:00
James Rowan 0951666cbb emails: Confirmation emails should come from the NOREPLY address.
This prevents users from accidentally sending a confirmation link
specific to their account to their Zulip administrator if they reply
to the invitation, invitation reminder, account confirmation, or new
email confirmation emails.
2017-07-05 15:18:33 -07:00
Steve Howell df4b306c20 coveragerc: Exclude zerver/tornado/ioloop_logging.py.
The file ioloop_logging.py is pretty small, but it seems to have
flaky time-sensitive code that creates noise for coverage deltas
when we do builds.  Since it's small, we just exclude it.

Tweaked by tabbott to add comments.
2017-07-05 15:07:52 -07:00
Steve Howell 1ef9b7982e Set threshold to 0.03% for code coverage.
We want a little bit of wiggle room for code coverage.
Some legitimate commits that remove code from the system
appear to reduce overall code coverage.
2017-07-05 15:07:52 -07:00
Steve Howell 1327031628 Remove `patch` section from .codecov.yml.
The `patch` option for code coverage only reports on lines that
are part of the patch, which tends to be misleading for things
like refactoring commits that may actually increase overall
code coverage for the project.
2017-07-05 15:07:52 -07:00
Cory Lynch 099a7052e4 Enforce 100% test coverage for stream_events.js. 2017-07-05 17:57:52 -04:00
Cory Lynch 43544cef28 stream_events: Add tests for mark_unsubscribed. 2017-07-05 17:57:52 -04:00
Cory Lynch 2627c1cde3 stream_events: Add tests for mark_subscribed. 2017-07-05 17:57:52 -04:00
Cory Lynch c8281de492 stream_events: Add tests for update_property. 2017-07-05 17:57:52 -04:00
Harshit Bansal efc2df168c subs: Fix the autocomplete suggestions while adding subscribers.
Earlier, the autocomplete was also showing the emails of the users who
were already subscribed to the stream.

Fixes: #4028.
2017-07-05 13:22:07 -07:00
Harshit Bansal 598535717b emoji_picker: Extract `add_scrollbar()` function.
Calling this function with  an element will cause a `perfectScrollbar` to
be added to it.
2017-07-05 13:14:40 -07:00
Harshit Bansal a6cd460f72 emoji: Rename `emoji.realm_emojis` to `emoji.all_realm_emojis`. 2017-07-05 13:02:41 -07:00
Harshit Bansal 29ff36cd2a reactions: Don't send add/remove requests for deactivated realm emojis.
Eventually, we'll want to support unreacting to deactivated realm
emoji, but for now the issues around name conflicts mean we can't
really support that.
2017-07-05 13:02:20 -07:00
Harshit Bansal 3c9705ce98 actions.py: Instead of deleting a realm emoji just deactivate it.
Instead of removing an emoji from the database, just mark them as
deactivated so that they can't be used further but can be rendered
properly in reactions and messages.

Fixes: #4750.
2017-07-05 13:00:15 -07:00
Harshit Bansal c4ec9523fc frontend: Make sure deactivated emojis don't appear for use anywhere.
Deactivated emojis should not appear at any of the following places for
use:
1: Emoji pickers.
2: Composebox autocomplete.
3: Custom emoji settings page.
2017-07-05 13:00:14 -07:00
Harshit Bansal 9e40f063d6 markdown: Use `active_realm_emojis` instead of `realm_emojis`.
We should use `active_realm_emojis` instead of manually checking for
deactivated emojis in `realm_emoji` dict.
2017-07-05 12:05:10 -07:00
Harshit Bansal 90f04062e7 emoji.js: Add `active_realm_emojis` dict.
This dict will hold all the realm emojis which have not been deactivated.
2017-07-05 12:05:10 -07:00
Jack Zhang 13a5c625ca docs: Add note for importing _() function in translating.md. 2017-07-05 12:01:59 -07:00
Jack Zhang 0c50f2ee09 [third] Add lightweight fuzzysearch library.
This is intended to be used in the new /integrations page.
2017-07-05 11:54:55 -07:00
Cynthia Lin 0fc93278ca user docs: Add guide on *Require topics in messages to streams* setting.
Edited by tabbott to simplify the language and explain the purpose of
the setting a bit more.

Fixes #5675.
2017-07-05 11:51:54 -07:00
Vishnu Ks faf5c0cd2d portico: Make backend validation errors similar to frontend.
The backend errors are currently displayed to the right side of the
input field.  This is different from the frontend validation errors
which are displayed at the bottom of the input field (and also looks
really bad). Also frontend validation uses <p> instead of <div> to
display errors so I have changed this also to make both uniform.
2017-07-05 11:05:18 -07:00
Vaida Plankyte 9461f490c8 event_queue.py: Use the singular 'they' pronoun. 2017-07-05 09:27:44 -07:00
Vaida Plankyte 9b279072df notifications.js: Use the singular 'they' pronoun. 2017-07-05 09:27:44 -07:00
Vaida Plankyte d8ab716820 german.md: Use the singular 'they' pronoun. 2017-07-05 09:27:44 -07:00
Vaida Plankyte 0352ad517b streams.py: Use the singular 'they' pronoun. 2017-07-05 09:27:44 -07:00
Vaida Plankyte 5aee5b395a message.py: Use the singular 'they' pronoun. 2017-07-05 09:27:44 -07:00
Vaida Plankyte 18bf15cfed git-guide.md: Use the singular 'they' pronoun. 2017-07-05 09:27:44 -07:00
Vaida Plankyte c88530366e user_settings.py: Use the singular 'they' pronoun. 2017-07-05 09:27:44 -07:00