Commit Graph

9 Commits

Author SHA1 Message Date
Nolan Lawson 031caec406
fix: fix Alt key in keyboard shortcuts (#902)
fixes #896
2019-01-19 15:50:39 -08:00
Nolan Lawson 6d1bb64bbb
fix: fix question mark hotkey (#887)
* fix: fix question mark hotkey

* fix tests
2019-01-13 14:02:01 -08:00
Stephane Zermatten c2bd2f306a feat: Add support for keyboard shortcuts (#870)
* Add support for keyboard shortcuts.

This change introduces a Shortcut component for defining global
keyboard shortcuts from whichever component makes more sense.

This change also adds an initial set of navigation shortcuts:
- Backspace to leave a modal dialog or to go back
- g t to go to the federated timeline
- g f to go to the favorite page
- g h to go to the home page
- g n to go to the notification page
- g c to go to the community page
- s to go to the search page

These shortcuts are loaded asynchronously from _layout.html

In modal dialogs, shortcuts are also modal, to avoid strange or
overly complex behavior. This is implemented by grouping
shortcuts into scopes, and activating a separate 'modal' scope
when entering a modal dialog, so a separate set of shortcuts can
be enabled in modal dialog. Modal dialogs can be exited by
pressing 'Backspace'.

* Navigate up/down lists using keyboard shortcuts.

This change introduces keyboard shortcuts for navigating in lists and
virtual lists. j or arrow up selects the next element, k or arrow down,
the previous element. Selecting an element scrolls the list up and down,
as necessary.

This change also allows directing keyboard shortcuts to the active
element and defines the following shortcuts, for the active status:
- f to favorite or unfavorite it
- b to boost or unboost it
- r to reply to it
- o to open its thread
- x to toggle the display of a CW
- y to toggle the display of sensitive medias

This works by defining a keyboard shortcut scope for each list element.
A new component, ScrollListShortcuts, keeps track of the active element,
based on list or virtual list elements and redirects shortcuts to the
active element's scope. ScrollListShortcuts keeps the active element in
the current realm of the store, so the active element is restored when
going back to the list.

* Typing h or ? displays the list of available keyboard shortcuts.

This change introduces a new modal dialog that documents the list of
available shortcuts.
2019-01-13 10:03:29 -08:00
Nolan Lawson 4bd181d3cc
fix: update Sapper to latest (#775)
* fix: update to latest sapper

fixes #416

* fix error and debug pages

* requestIdleCallback makes column switching feel way nicer than double rAF

* add export feature

* add better csp info

* workaround for sapper sub-page issue

* clarify in readme about exporting

* fix now config

* switch from rIC to triple raf

* style-loader is no longer used

* update theming guide
2018-12-11 07:31:48 -08:00
Nolan Lawson 9c74a072bf
fix(emojos): actually fix trademark character (#693)
another fix for #679
2018-11-25 12:35:52 -08:00
Nolan Lawson e3debcc5e1
fix(emoji): fix ™® characters treated as emoji (#682)
fixes #679
2018-11-23 21:32:57 -08:00
Nolan Lawson 3dae883761
fix(emoji): asterisk should not be treated as emoji (#668) 2018-11-20 22:41:41 -08:00
Nolan Lawson d9e79daa6a
fix(emoji): emoji replacer should ignore pound sign (#666)
* fix(emoji): emoji replacer should ignore pound sign

* add test

* fix regex
2018-11-20 09:42:49 -08:00
Nolan Lawson 4124da2439
fix(emojos): fix emojos on Ubuntu and Chrome on Windows (#661)
* fix(emojos): fix emojos on Ubuntu and Chrome on Windows

* fixup

* start working on unit tests

* fixup

* add more tests and fix emoji
2018-11-20 00:01:23 -08:00