Commit Graph

1259 Commits

Author SHA1 Message Date
Umair Khan 8f190e0746 user-groups: Update marked.js to do proper local echo for mentions.
We implement markdown in the JS as well to improve the
usability.  Comes complete withunit tests.

Fixes #7381.
2017-11-27 09:16:09 -08:00
Umair Khan 90994bccac user-groups: Recognize single asterisk for group mentions.
The character combination of @* now begins a group mention, so
this test is no longer valid.
2017-11-27 09:16:09 -08:00
Umair Khan c78846a274 markdown.js: Add error function to blueslip.
If we do not add this, we get an exception before we reach the
assertion.
2017-11-27 09:08:30 -08:00
Rhea Parekh 1d826ae201 composebox: Warn when linked to private streams.
Fix issue #6860
2017-11-27 07:41:59 -08:00
Shubham Dhama 5e23bfa779 typeahead: show typeahead for syntax of the from @**... or #**...
Fixes: #7494.
2017-11-26 11:18:47 -08:00
Tim Abbott 0f8ee343de node: Fix copy_and_paste test output.
I'm confused how this was passing when I tested previously.
2017-11-23 14:18:28 -08:00
Tim Abbott cc8c8ab21c node: Fix style in copy-paste test.
This bug got merged due to a problem with Travis CI.
2017-11-23 13:06:17 -08:00
Tim Abbott 4d4532a27e copy_and_paste: Add a simple extensible test suite.
This commit is mostly about adding the test suite; some of the results
are things we'd like to change.
2017-11-23 12:59:01 -08:00
Tim Abbott 15501c8b07 lint: Clean up json_rules logic for tab-based whitespace.
This both improves the comment to be more readable, and also uses the
new and improved exclude feature to limit the exclusion to just the
webhook fixtures (where it's needed).

Also fixes a mypy error.
2017-11-23 12:01:20 -08:00
Umair Khan f70b36a5a9 12-toggle-message-editing: Add wait before flaky test. 2017-11-23 10:43:42 -08:00
Tim Abbott 9fa58a3c16 compose_ui: Automatically resize textarea after adding new syntax.
This fixes existing problems as well as an upcoming problem that
copy-and-pasting in markdown should usually expand the compose text
area.
2017-11-21 19:52:47 -08:00
Vishnu Ks 34689370cd settings: Create UI and backend for setting signups stream. 2017-11-21 17:39:51 -08:00
rht bff736868e Generate custom-icon-webfont on each provision or update-prod-static.
Fixes #7354.
2017-11-20 16:36:49 -08:00
Tim Abbott 73e4d647c7 casper: Add a few more explicit waits to message editing tests.
This is a second attempt at fixing a casper test flake we've been
having recently.
2017-11-20 16:18:34 -08:00
Tim Abbott c7f47f5477 casper: Use casper.then() more consistently in editing tests.
Hopefully, this will fix the test flake problems we've been having
with this test since upgrading Casper.
2017-11-20 16:04:26 -08:00
Harshit Bansal 8a4fc9970f reactions.js: Migrate webapp to use the new reactions API.
Fixes: #6909.
2017-11-20 15:27:20 -08:00
Tim Abbott fa0fb9e299 casper: Switch to use a newer casper off master.
Newer casper should fix some problems we've had with contenteditable.
2017-11-16 22:20:38 -08:00
David Rosa Tamsen 7072fa5b37 docs: Reorganize developer docs to improve navigation.
This commit helps reduce clutter on the navigation sidebar.
Creates new directories and moves relevant files into them.
Modifies index.rst, symlinks, and image paths accordingly.

This commit also enables expandable/collapsible navigation items,
renames files in docs/development and docs/production,
modifies /tools/test-documentation so that it overrides a theme setting,
Also updates links to other docs, file paths in the codebase that point
to developer documents, and files that should be excluded from lint tests.

Note that this commit does not update direct links to
zulip.readthedocs.io in the codebase; those will be resolved in an
upcoming follow-up commit (it'll be easier to verify all the links
once this is merged and ReadTheDocs is updated).

Fixes #5265.
2017-11-16 09:45:08 -08:00
Brock Whittaker ce62abce73 dark-mode: Add "T" hotkey for dark mode theme. 2017-11-15 16:45:34 -08:00
Florian Jüngermann b31917be1d frontend: Remove redundant stream separator in the left sidebar.
In the case of no 'normal' streams (only pinned and dormant ones) there are two separators
between the groups of streams. My commit removes one.
2017-11-15 10:06:25 -08:00
Cynthia Lin 940ca17c46 hotkeys: Expand collapsed sidebars when sidebar searches are initiated.
Fixes #7351.
2017-11-14 11:12:13 -08:00
Umair Khan 7e2b452f6a user-groups: Add composebox_typeahead tests. 2017-11-13 11:43:16 -08:00
Umair Khan 597a6e6c74 user-groups: Add user groups in typeahead code. 2017-11-13 11:42:17 -08:00
Cynthia Lin 0b800b0a7d icons: Create framework for custom icons and add new bot icon. 2017-11-10 11:18:42 -08:00
Steve Howell d7254a0556 Append space as needed in compose_ui.smart_insert(). 2017-11-09 09:49:20 -08:00
Steve Howell f935afa241 Prepend space as needed in compose_ui.smart_insert(). 2017-11-09 09:49:20 -08:00
Steve Howell 1b1858aa64 node tests: Test compose_ui.smart_insert(). 2017-11-09 09:49:20 -08:00
Steve Howell 12dc567a89 Move insert_syntax_and_focus() to compose_ui.js.
This change also removes a couple lines of test code that
weren't really testing anything.
2017-11-09 09:49:20 -08:00
derAnfaenger 19bc55aa45 Fix various typos.
The typos and their corrections were found with the
aid of https://github.com/lucasdemarchi/codespell.
2017-11-09 16:26:38 +01:00
Steve Howell c3b89845c9 node tests: Use zrequire in typing_status.js. 2017-11-08 12:24:17 -08:00
Steve Howell 0fc20bf943 node tests: Use zrequire in typing_data.js. 2017-11-08 12:24:17 -08:00
Steve Howell c32f69bef6 node tests: Use zrequire in topic_data.js. 2017-11-08 12:24:17 -08:00
Steve Howell 1dc5218ef5 node tests: Use zrequire in rtl.js. 2017-11-08 12:24:17 -08:00
Steve Howell f65d3316e0 node tests: Use zrequire in recent_senders.js. 2017-11-08 12:24:17 -08:00
Steve Howell 34bddd26d8 node tests: Use zrequire in pm_conversations.js. 2017-11-08 12:24:17 -08:00
Steve Howell 99695da799 node tests: Use zrequire in people.js. 2017-11-08 12:24:17 -08:00
Steve Howell 6304aea4bc node tests: Use zrequire in hotkey.js. 2017-11-08 12:24:17 -08:00
Steve Howell bf0ed5915c node tests: Use zrequire in common.js. 2017-11-08 12:24:17 -08:00
Steve Howell adb02b37ce node tests: Use zrequire in colorspace.js. 2017-11-08 12:24:17 -08:00
Steve Howell e0fa317be1 node_tests: Remove unneeded var statements.
Variables like Dict/_/assert are already globally defined.
2017-11-08 12:24:17 -08:00
Steve Howell bef176f5f6 node tests: Use zrequire in channel.js. 2017-11-08 12:24:17 -08:00
Steve Howell 7a68add9a4 Remove unneeded requires in activity.js. 2017-11-08 12:24:17 -08:00
Steve Howell cdc1bf3d5e node test: Remove add_dependencies(). 2017-11-08 12:24:17 -08:00
Steve Howell a1c5b0928e node tests: Use zrequire in util.js. 2017-11-08 12:24:17 -08:00
Steve Howell 8cdd08a02a node tests: Use zrequire in user_events.js. 2017-11-08 12:24:17 -08:00
Steve Howell 9b9ff5cce3 node tests: Use zrequire in unread.js. 2017-11-08 12:24:17 -08:00
Steve Howell c233bb53fd node tests: Use zrequire in typeahead_helper.js. 2017-11-08 12:24:17 -08:00
Steve Howell c38081b528 node tests: Use zrequire in topic_generator.js. 2017-11-08 12:24:17 -08:00
Steve Howell de341e88c5 node tests: Use zrequire in timerender.js. 2017-11-08 12:24:17 -08:00
Steve Howell 83c9b1134e node tests: Use zrequire in templates.js. 2017-11-08 12:24:17 -08:00
Steve Howell 4ef8df15c9 node tests: Use zrequire in subs.js. 2017-11-08 12:24:17 -08:00
Steve Howell b3bfca9c2e node tests: Use zrequire in stream_sort.js. 2017-11-08 12:24:17 -08:00
Steve Howell c12d46284f node tests: Use zrequire in stream_events.js. 2017-11-08 12:24:17 -08:00
Steve Howell 2c1a855cae node tests: Use zrequire in settings_org.js. 2017-11-08 12:24:17 -08:00
Steve Howell 9489c5d0a8 node tests: Use zrequire in settings_bots.js. 2017-11-08 12:24:17 -08:00
Steve Howell f720aad260 node tests: Use zrequire in server_events.js. 2017-11-08 12:24:17 -08:00
Steve Howell 19ca4bff82 node tests: Use zrequire in search_suggestion.js. 2017-11-08 12:24:17 -08:00
Steve Howell 5db2f3e087 node tests: Use zrequire in reactions.js. 2017-11-08 12:24:17 -08:00
Steve Howell 23313f2ddf node tests: Use zrequire in presence.js. 2017-11-08 12:24:17 -08:00
Steve Howell 14631b8748 node tests: Use zrequire in password.js. 2017-11-08 12:24:17 -08:00
Steve Howell 65dc6a0975 node tests: Use zrequire in narrow_state.js. 2017-11-08 12:24:17 -08:00
Steve Howell 2fac1fe6c9 node tests: Use zrequire in muting.js. 2017-11-08 12:24:17 -08:00
Steve Howell 8f0b396140 node tests: Use zrequire in message_store.js. 2017-11-08 12:24:17 -08:00
Steve Howell 180f910764 node tests: Use zrequire in message_list_view.js. 2017-11-08 12:24:17 -08:00
Steve Howell 98c4ee3175 node tests: Use zrequire in message_list.js. 2017-11-08 12:24:17 -08:00
Steve Howell 84f547004c node tests: Use zrequire in message_edit.js. 2017-11-08 12:24:17 -08:00
Steve Howell ba79558257 node tests: Use zrequire in markdown.js. 2017-11-08 12:24:17 -08:00
Steve Howell 914cf175c0 node tests: Use zrequire in i18n.js. 2017-11-08 12:24:17 -08:00
Steve Howell 1ba0315aad node tests: Use zrequire in hashchange.js. 2017-11-08 12:24:17 -08:00
Steve Howell b2775506a4 node tests: Use zrequire in filter.js. 2017-11-08 12:24:17 -08:00
Steve Howell ad59600062 node tests: Use zrequire in emoji_picker.js. 2017-11-08 12:24:17 -08:00
Steve Howell c307356d33 node tests: Use zrequire in emoji.js. 2017-11-08 12:24:17 -08:00
Steve Howell f6f227d089 node tests: Use zrequire in drafts.js. 2017-11-08 12:24:17 -08:00
Steve Howell 15e21f0cd1 node tests: Use zrequire in dispatch.js. 2017-11-08 12:24:17 -08:00
Steve Howell 2ea4a20bc5 node tests: Use zrequire in composebox_typeahead.js. 2017-11-08 12:24:17 -08:00
Steve Howell 3aa2c22370 node tests: Use zrequire in compose_fade.js. 2017-11-08 12:24:17 -08:00
Steve Howell a7a6f68c98 node tests: Use zrequire in compose_actions.js. 2017-11-08 12:24:17 -08:00
Steve Howell 4d814c03d4 node tests: Use zrequire in compose.js. 2017-11-08 12:24:17 -08:00
Steve Howell e63dd59065 node tests: Use zrequire in bot_data.js. 2017-11-08 12:24:17 -08:00
Steve Howell 640b0d5653 node tests: Use zrequire in alert_words.js. 2017-11-08 12:24:17 -08:00
Steve Howell b0665815d2 Use stub_i18n in templates.js. 2017-11-08 12:24:17 -08:00
Steve Howell eff9f617ef node tests: Use stubbed i18n in message_list.js. 2017-11-08 12:24:17 -08:00
Tim Abbott 417f92c8e1 markdown: Remove now-obsolete bugdown_matches_marked.
Fixes #7099.
2017-11-07 12:01:57 -08:00
Steve Howell f105c480b3 Calculate gravatar hashes on the webapp client.
This change prepares us to have the server send avatar_url
of None when somebody wants a gravatar avatar (as opposed
to a user-uploaded one).

Subsequent commits will change behavior on both the server
and client to have this happen.  So this commit has no-op
code for now, but it will soon use the fallback-to-gravatar
logic.
2017-11-07 10:36:02 -08:00
Steve Howell aa61db9301 Change warn -> error in people.report_late_add().
This commit is easy to revert if we want to tone down errors
to warnings for the short term, while our codepath still does
proper handling for adding users when they come in messages.
2017-11-07 09:51:10 -08:00
Steve Howell 02a011d627 Add people.report_late_add().
We want to know when users are added after page load, as it can
be a symptom of stray messages leaking in or live-update problems,
etc.

Fixes #7120
2017-11-07 09:51:10 -08:00
Steve Howell aebfdaa8ed refactor: Use early-return in extract_people_from_message(). 2017-11-07 09:51:10 -08:00
Steve Howell 294a1fb8f8 refactor: Extract people.maybe_incr_recipient_count().
This logic used to be in extract_people_from_message(), but
we are deprecating extract_people_from_message(), whereas
the maybe_incr_recipient_count() function has logic that we
want to keep.
2017-11-07 09:51:10 -08:00
Steve Howell 5271241b24 Read page_params.realm_non_active_users() at page load.
This change is the first step in making it so that we load
non-active users at page load time in the webapp.

Before this change, we would reactively handle deactivated
users when we saw them as senders in messages.  Subsequent
changes will make it a warning if we see unknown senders
in messages.
2017-11-07 09:51:10 -08:00
Steve Howell b492f3569a tests: Extract node_tests/people_errors.js.
This is mostly a pure extraction, but we needed to duplicate
a bit of setup from people.js, and I added an assertion
for warning about "No user_id provided".
2017-11-07 09:51:10 -08:00
Steve Howell 48b18e4a38 Only show active realm users in compose typeahead.
There's no reason to include deactivated users in compose
typeahead, since we won't let the compose happen.

This also removes cross-realm bots from the typeahead, which
is mostly driven by not having a convenient function to include
them, but also it's rare that it makes sense to talk to a cross-realm
bot unless replying to it.
2017-11-07 09:51:10 -08:00
rht 77f32a1e0c frontend_tests: Use python 3 syntax for typing. 2017-11-04 19:57:55 -07:00
Cynthia Lin f63585bd6d hotkeys: Ensure navigation hotkeys do not work while overlay is open.
Fixes #7123.
2017-11-03 15:38:10 -07:00
Tim Abbott 493529d981 compose: Fix node test failure from video link integration.
It's pretty annoying that we're seeing this several hours after the
original code was merged.
2017-10-30 23:06:04 -07:00
Jack Zhang fef828a037 compose: Add video link button, powered by Jitsi. 2017-10-30 17:13:47 -07:00
Tim Abbott bb80c0cc24 compose_state: Extract insert_syntax_and_focus.
This moves the existing emoji picker code to a new library.
2017-10-30 17:12:56 -07:00
Harshit Bansal 5020ba4a20 emoji: Allow users to change emoji set.
This feature was merged in PR #4383 but was disabled due to some
remaining emoji infra changes.

Fixes: #209.
2017-10-28 10:38:33 -07:00
Henrik Pettersson 09cd47c6ad Add UI for viewing and cancelling open Zulip invitations.
Lets administrators view a list of open(unconfirmed) invitations and
resend or revoke a chosen invitation.

There are a few changes that we can expect for the future:

  * It is currently possible to invite an email that you have already
    invited, it might make sense to change this behavior.

  * Resend currently sends an invite reminder instead of resending the
    original invite, this is because 'custom_body' was not stored when
    the first invite was sent.

Tweaked in various minor ways, primarily in the backend, by tabbott,
mostly for style consistency with the rest of the codebase.

Fixes: #1180.
2017-10-27 13:07:43 -07:00
Steve Howell df03e30d68 popovers: Fix is-active checks for popovers.
We were incorrectly reporting active bots as non-active in
popovers, and we had no test coverage for cross-realm bots.

We also rename the function to is_active_user_for_popover,
since the old name, realm_user_is_active_human_or_bot, suggested
the wrong semantics for cross-realm bots.

Last but not least, we only do a blueslip warning if a user id
is not found.  When lookups fail, we are pretty confident that
the user is not active, so an error is overkill.  We can change
that as part of issue #7120.

Fixes #7153
2017-10-26 13:56:32 -07:00
Steve Howell f8f4d9cb63 people.js: Rename realm_get -> get_active_user_for_email.
We rename this function to be more clear, and we also remove
a stray function name for `realm_get` that was for the wrong
exported function.
2017-10-26 09:52:42 -07:00