Jonathan Pan
5556d2341c
hotkey.js: Add hotkey for drafts.
...
* 'd' in message view opens drafts.
This also adds hotkeys within the drafts UI:
* Up/down arrow keys navigate the drafts.
* Pressing enter edits the selected draft.
* Pressing backspace deletes the selected draft.
Some variable names tweaked by tabbott.
2017-03-27 14:05:00 -07:00
Cynthia Lin
6e2d180a34
hotkeys: Add hotkey `n` for opening New streams modal in Streams menu.
2017-03-25 18:35:21 -07:00
Cynthia Lin
ca460fad1f
hotkeys: Add hotkey `V` for viewing selected stream in Streams menu.
2017-03-25 18:35:21 -07:00
Cynthia Lin
b800cb05c0
hotkeys: Add left/right arrow keys to toggle views in Streams menu.
...
Fixes #4228
2017-03-25 18:35:21 -07:00
Cynthia Lin
69c32daffa
hotkeys: Add `U` hotkey for unsubscribing/subscribing in Streams menu.
...
Fixes #4229
2017-03-25 18:35:21 -07:00
Cynthia Lin
d17131dcb4
hotkeys: Rename subs.arrow_keys() to subs.switch_rows().
2017-03-25 18:35:21 -07:00
Joshua Pan
7adf70e5ad
Add node tests for M hotkey.
2017-03-25 09:42:49 -07:00
Tim Abbott
49f5be1dba
hotkey: Extend tests for message_view_only_keys.
2017-03-23 11:38:37 -07:00
Joshua Pan
f40b43a491
hotkeys: Add hotkey `G` an alias for End.
...
Fixes #4195 .
2017-03-23 11:38:36 -07:00
Cynthia Lin
1dfac12c4b
hotkeys: Add arrow key navigation in streams/subscriptions menu.
...
Fixes #4198 .
2017-03-21 20:32:28 -07:00
Brock Whittaker
9c38dc84a7
Change two console.log statements to one with prefixed newline.
...
The console.log statement that is empty can be replaced with just a
single newline.
2017-03-21 14:28:13 -07:00
Tim Abbott
b701062d16
Update + hotkey to use the keypress mechanism.
...
This fixes in issue where the new + hotkey only worked if you hit
shift+=, not if you pressed an actual "+" key on the keyboard.
Fixes #4182 .
2017-03-20 09:46:26 -07:00
Brock Whittaker
2775707a67
hotkeys: Add lightbox image feed with controls.
...
This adds an image feed that you can scroll through with hotkeys
in the lightbox.
The left and right arrow keys along with the left and right arrows
will go to the prev/next image, and clicking on an image will also
take a user to that image.
2017-03-19 22:11:38 -07:00
Brock Whittaker
fa5a093738
hotkeys: Add keyboard shortcut for opening the gear menu.
...
This adds the shortcut “g” for opening the gear menu.
2017-03-19 22:08:21 -07:00
Tim Abbott
70a0df73ba
tests: Add some documentation for the hotkey node tests.
2017-03-19 22:06:27 -07:00
Brock Whittaker
32d1e64530
hotkey: Improve clarity of error messages in hotkeys tests.
...
This will provide a clearer error message than a ReferenceError as to
what's wrong when the wrong values are in hotkey tests.
2017-03-19 22:06:27 -07:00
Joshua Pan
5ec21e2230
hotkey.js: Add opening reactions hotkey.
...
Add frontend tests for ":" hotkey.
Fixes #3911 .
2017-03-19 14:37:05 -07:00
Joshua Pan
9c3d63a80b
Add '+' hotkey to add thumbs up reaction.
...
Fixes #3910 .
2017-03-19 14:36:33 -07:00
Daw-Ran Liou
81f9de7cc8
Add "*" hotkey to toggle starred flag on the selected message.
2017-03-19 13:42:11 -07:00
Joshua Pan
234e8b500e
Add tests for ctrl key functionality.
2017-03-19 12:17:28 -07:00
Daw-Ran Liou
f67751d1f0
Add hotkey "l" for opening image in lightbox.
...
Open the lightbox in the current selected message. Only the first image
shows in the lightbox.
2017-03-19 11:43:21 -07:00
Tim Abbott
e9f1531fc7
hotkey: Remap v hotkey -> P.
2017-03-19 11:41:02 -07:00
Steve Howell
5b2407bb22
Add ui_state.home_tab_obscured() shim.
2017-03-19 10:56:09 -07:00
Steve Howell
faa9446e64
Add compose_actions.start() shim.
2017-03-18 15:52:50 -07:00
Steve Howell
58c057a024
node tests: Add test_motion_keys().
2017-03-14 16:42:40 -07:00
Steve Howell
c88c69db2e
bug fixes: Clean up hotkey mappings.
...
We simplify hotkey mappings by using different hashes for
keydown and keypress events. There are browser bugs (iOS, for
example) where keypress events have the wrong keyCode values.
This led us, under iOS, to interpret "!" as "page up."
This fix also helps us disinguish escape from shift-escape.
Brock Whittaker helped on figuring out the keypress/keydown
issues that are addressed in this commit.
Fixes #4019
2017-03-13 21:38:23 -07:00
Steve Howell
cc6fc3c41a
node tests: Add hotkey.js tests.
...
The initial version of the tests cover most normal keys, but they
do not cover special keys like enter/tab/escape or arrow keys
or home/end/page-down/page-up yet.
2017-03-13 15:09:53 -07:00