Commit Graph

18122 Commits

Author SHA1 Message Date
Eeshan Garg debe9fa9dc api: If there is no $HOME, assume .zuliprc doesn't exist. 2017-05-29 20:09:57 -07:00
Steve Howell ecbbc8788a Move code from reactions -> emoji_picker.
This moves all the code dealing with emoji_picker
navigation and click/enter events to emoji_picker.js.

Some of the code still delegates back to reactions.js
in some way.

The navigate() code really does nothing reaction-specific,
nor does filter_emojis(), nor do some of their helpers.

This was mostly moving code, but I also did some
s/reaction// or s/reaction/emoji/ in names.
2017-05-29 17:10:05 -06:00
Steve Howell 3654406f17 Simplify/rename code to choose reaction in emoji picker.
We now call the function toggle_selected_emoji(), and it
is simpler in these ways:

    * We get the selected emoji more directly.
    * We reuse code in toggle_emoji_reaction().
2017-05-29 17:10:05 -06:00
Steve Howell ed2ceb49cb Use toggle_emoji_reaction for "+" hotkey.
This is a more direct codepath when we know which emoji
we want to toggle.
2017-05-29 17:10:05 -06:00
Steve Howell 1ee757a237 Use toggle_emoji_reaction() in the emoji picker.
If we know the name of the emoji you need to toggle,
we can toggle_emoji_reaction(), which is less complex
than toggle_reaction().
2017-05-29 17:10:04 -06:00
Steve Howell 805c99ae27 Add hide_emoji_popover() to toggle_emoji_reaction().
This change sets us up to de-duplicate some code.  It
changes behavior for the edge case situation where
you had the reaction menu open but then decide to
click on one of the existing reactions.  This change
closes the emoji popover, which is probably the
correct behavior.
2017-05-29 17:10:04 -06:00
Steve Howell 63d0711c4b Rename message_reaction_on_click() to toggle_emoji_reaction().
This prepares us to de-duplicate some code.
2017-05-29 17:10:04 -06:00
vaibhav 9cf9837f12 webhooks: Add outgoing webhook bot user to development database. 2017-05-29 16:01:23 -07:00
Tim Abbott 4acc89d379 help: Document the : hotkey for choosing reactions. 2017-05-29 15:43:55 -07:00
Tim Abbott 7b152bf0ad help: Clarify discussion of the emoji reactions picker.
The word "menu" was kinda confusing here.

Follow-up to #4547.
2017-05-29 15:43:44 -07:00
Daniel Lau 3037be9bc0 help: Document how to navigate the emoji reactions picker.
Fixes #4547.
2017-05-29 15:43:07 -07:00
Tim Abbott 4040cadf7d coverage: Omit some test runner files from coverage.
These files are part of the test runner and can't realisitically have
test coverage due to being imported before coverage in the setup
sequence.
2017-05-29 15:30:49 -07:00
Tim Abbott 4893779001 test_events: Avoid coverage errors in LogEventsTest. 2017-05-29 15:26:33 -07:00
Maxim Averin a4c3f571db Switch change_tos_version to use RealmAuditLog. 2017-05-29 15:24:01 -07:00
Maxim Averin 685fb16c39 Switch change_full_name to use RealmAuditLog.
This requires adding an `acting_user` parameter to the
`do_change_bot_owner` function.
2017-05-29 15:22:08 -07:00
Tim Abbott ce26f0e086 integrations: Remove legacy basecamp integration.
Now that we have the webhook integration, there's no reason to
maintain the pre-webhook version.
2017-05-29 15:10:59 -07:00
Steve Howell 49e3ee36c4 Add tests for reactions.remove_reaction(). 2017-05-29 14:59:52 -07:00
Steve Howell affff8ac82 Extract reactions.set_reaction_count. 2017-05-29 14:59:52 -07:00
Steve Howell 1747223c35 reactions: Refactor remove_reaction().
* Add whitespace/comments.
    * Use find_reaction() helper.
    * Handle full-removal earlier in block.
    * Sequence operations in a more organized way.
2017-05-29 14:59:52 -07:00
Steve Howell 5c405f7048 reactions: Refactor add_reaction().
This commit splits out some helper methods to make it easier
to test:

    get_reaction_section
    find_reaction
    get_add_reaction_button
    update_existing_reaction
    insert_new_reaction
2017-05-29 14:59:52 -07:00
Rohitt Vashishtha 2d73e03e37 ui-refactor: Rename modals.js to overlays.js.
Fixed #4702.
2017-05-29 11:24:46 -07:00
Steve Howell 1f4e1ece3a Fix flaky time-based test.
For testing waiting period thresholds, we need to
explicitly set date_joined for Hamlet to be now.
2017-05-29 11:54:06 -06:00
David 43e76816ff message view: Recipient bar date stamp shows older years.
timerender.js render_now() will always include older
years when rendering the date stamp on the recipient bar
and the date rows above messages.

Fixes #4843.
2017-05-29 08:54:06 -07:00
David fcf97660db testing-coverage: add node tests for timerender.js.
Initial set of tests for the timerender.js module.

Fixes #4819.
2017-05-29 08:51:28 -07:00
David ea3c994186 refactoring: timerender.js render_now() returns an object.
The render_now() function in timerender.js will now return
an object instead of an array, which is then passed to the
functions render_date_span() and update_timestamps().
This should increase readability and extensibility.

Fixes #4820.
2017-05-29 08:51:24 -07:00
Tim Abbott 5ffdce9aab test-js-with-node: Set timezone to UTC for tests. 2017-05-29 08:47:26 -07:00
Steve Howell 5f48b51b60 provision: Add `cd /srv/zulip` to profile.
I didn't bump the provision version on this change, as it
won't break anything if somebody fails to make this change.
2017-05-29 08:40:49 -07:00
Cory Lynch c95abd4618 Replace broken aria-labelledby with aria-label in help modal.
Fixes #4921.
2017-05-28 22:49:16 -07:00
Cory Lynch 30e54a94f2 html: Add aria-labels for search bars for accessibility.
Added an attribute which can be read by assistive technology.

Fixes #4996.
2017-05-28 22:49:00 -07:00
derAnfaenger 735aa9f2c6 Rename misleading 'system-docs' reference. 2017-05-28 22:21:13 -07:00
derAnfaenger c0f0dabec6 Rename misleading 'code-docs' reference. 2017-05-28 22:21:13 -07:00
derAnfaenger 7f6b6fae26 Rename misleading 'tutorial-docs' reference. 2017-05-28 22:21:13 -07:00
derAnfaenger f6c59a483c docs: Rename misleading 'dev-install-docs' reference. 2017-05-28 22:21:13 -07:00
derAnfaenger 54a618b597 docs: Rename misleading 'prod-install-docs' reference. 2017-05-28 22:21:13 -07:00
derAnfaenger 9c0ba87b5e docs: Rename misleading 'user-docs' reference. 2017-05-28 22:21:13 -07:00
Ron Shafii 8cc1f13d24 test: Add test_notify_realm_of_new_user. 2017-05-28 19:14:52 -07:00
Eeshan Garg 44ec27c122 webhooks/gosquared: Migrate docs to Markdown. 2017-05-28 18:44:00 -07:00
Eeshan Garg e5484f1bf5 webhooks/ifttt: Migrate docs to Markdown. 2017-05-28 18:44:00 -07:00
Eeshan Garg 846e560bfd webhooks/hellosign: Migrate docs to Markdown. 2017-05-28 18:44:00 -07:00
Eeshan Garg 372d6a2aa6 webhooks/heroku: Migrate docs to Markdown. 2017-05-28 18:44:00 -07:00
Eeshan Garg 2d25b6581e webhooks/greenhouse: Migrate docs to Markdown. 2017-05-28 18:44:00 -07:00
Eeshan Garg dd5ce955bd webhooks/delighted: Migrate docs to Markdown. 2017-05-28 18:44:00 -07:00
Eeshan Garg 074e3d7401 webhooks/crashlytics: Migrate docs to Markdown. 2017-05-28 18:44:00 -07:00
Eeshan Garg 14ce3a94db webhooks/codeship: Migrate docs to Markdown. 2017-05-28 18:44:00 -07:00
Eeshan Garg 6111b56753 webhooks/circleci: Migrate docs to Markdown. 2017-05-28 18:44:00 -07:00
Eeshan Garg 1c50a85601 webhooks/basecamp: Migrate docs to Markdown. 2017-05-28 18:44:00 -07:00
Rohitt Vashishtha 442537ebb8 overlays: Rename hashchange.exit_modal() to exit_overlay. 2017-05-28 18:40:54 -07:00
Ethan Estrada 91e6f00d57 Test that `log_event` auto creates missing log dir. 2017-05-28 18:24:00 -07:00
Ethan Estrada a11c578d57 Test for early return when "LOG_EVENT_DIR" is `None`. 2017-05-28 18:21:50 -07:00
Tim Abbott 9d7e6b1b48 events: Fix race with realm_waiting_period_threshold changes.
The can_create_streams property changed some time ago to depend on 2
different properties of Realm, causing occasional test failures.
2017-05-28 18:21:50 -07:00