Commit graph

40 commits

Author SHA1 Message Date
Nolan Lawson f758e12b24
fix: replace indexWhere with findIndex (#1125) 2019-03-31 09:21:57 -07:00
Nolan Lawson 47255e818c
fix: fix aria-labels for pleroma (#1113) 2019-03-22 15:55:28 -07:00
Nolan Lawson c896836ce8
fix: fix spaces in status aria-labels (#1111)
fixes #1108
2019-03-21 14:38:37 -07:00
Nolan Lawson f0af8178af
feat: implement "." keyboard shortcut (#1105)
fixes #1052
2019-03-18 09:09:24 -07:00
Nolan Lawson c0918ccdc3
fix: fix pleroma snowflake IDs for real (#1084)
fixes #1082
2019-03-05 20:25:10 -08:00
Will Pearson 8665a18ac0 fix: Fix reversed base62 encoding (#1083) 2019-03-05 20:03:55 -08:00
Nolan Lawson 93a3e85994
fix: use correct sorting for snowflake IDs (#1074)
* fix: use correct sorting for snowflake IDs

fixes #1071

* refactor
2019-03-03 17:21:22 -08:00
Nolan Lawson 7e5f58b969
refactor: use timeline item summaries instead of ids (#1072)
As described in https://github.com/nolanlawson/pinafore/issues/369#issuecomment-467211908 this is the first step toward fixing #369
2019-03-03 13:24:55 -08:00
Nolan Lawson b14f818e81
perf: build url regex in advance (#1069)
* perf: build url regex in advance

* update comment

* better regex stringification
2019-03-02 22:02:59 -08:00
Nolan Lawson 2b491ddb10
fix: fix pinned toots not in IDB (#1040)
fixes #660
2019-02-23 15:18:48 -08:00
Nolan Lawson 8c37a7cc02
refactor: refactor parent focus styles (#1036) 2019-02-23 12:50:56 -08:00
Nolan Lawson 547ee14f88
refactor: use ids instead of attrs for delegate/shortcut/focus (#1035)
* refactor: use ids instead of attrs for delegate/shortcut/focus

fixes #1034

* console log on error

* fix test
2019-02-23 12:32:00 -08:00
Nolan Lawson c9ca605cfe
fix: fix keyboard shortcuts for pinned toots (#1033)
* fix: fix keyboard shortcuts for pinned toots

fixes #908

* fix test
2019-02-23 09:47:36 -08:00
Nolan Lawson 58844052c9
fix: update url regex to match latest mastodon (#1026)
also make all the regexes use the thunk pattern consistently
2019-02-19 23:34:06 -08:00
Nolan Lawson cd5b6f8e81
perf: use lite web animations polyfill (#1011) 2019-02-18 11:47:02 -08:00
Nolan Lawson 58d1f62b2b
feat: implement web share target (#980)
fixes #974
2019-02-13 18:38:44 -08:00
Nolan Lawson 8179c1b53f
fix: set dark theme based on prefers-color-scheme (#966)
* fix: set dark theme based on prefers-color-scheme

fixes #728

* add an explicit banner fill color
2019-02-11 21:03:51 -08:00
Nolan Lawson 37c85ec7e2
fix: disable smooth scroll for users who prefer reduced motion (#958) 2019-02-09 19:52:40 -08:00
Nolan Lawson 73eb9fba2c
fix: fix carousel and scrollbars for edge browser (#952) 2019-02-09 12:01:29 -08:00
Nolan Lawson 9d594f0bac
feat: add carousel for media modal (#928) 2019-02-02 23:03:40 -08:00
Stephane Zermatten 2656e11bb0 fix: Follow-up for pull request #870 (#910)
* Cache main-nav in scrollIntoView.js.

This change avoids continuously calling document.getElementById for the
same element.

* Fix firstVisibleElementIndex to always return a dictionary.

Before this change, firstVisibleElementIndex would return -1 if it
doesn't find anything. This made no sense since this function returns a
dictionary on success.

With this change, the function always returns a dictionary with the
expected keys.

* lint fix
2019-01-26 10:14:27 -08:00
Nolan Lawson 031caec406
fix: fix Alt key in keyboard shortcuts (#902)
fixes #896
2019-01-19 15:50:39 -08:00
Nolan Lawson ef44c19e8a
feat: date title shows absolute date (#890)
fixes #759
2019-01-13 15:56:39 -08:00
Nolan Lawson 8f84ae5a51
feat: add setting to disable hotkeys (#889) 2019-01-13 14:02:15 -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 e666eb5955
perf: use lodash-lite for some functions (#853) 2018-12-23 10:10:16 -08:00
Nolan Lawson cf94e7d61e
fix: fix unnecessary request for theme-undefined.css (#852) 2018-12-22 15:37:56 -08:00
Nolan Lawson 4ab9687200
perf: load Toast asynchronously (#851) 2018-12-22 15:37:51 -08:00
Nolan Lawson 27da387a01
fix: preserve newlines correctly in delete-and-redraft (#845)
fixes #830
2018-12-19 00:57:56 -08:00
Nolan Lawson e6ca246527
fix: use emoji-mart all.json, split out json (#839) 2018-12-18 12:45:49 -08:00
Nolan Lawson 098a20db49
feat: add full emoji picker using emoji-mart (#836)
* feat: add full emoji picker using emoji-mart

Fixes #4

* use a sailboat as the default emoji in the emoji picker

* fix tests

* fix lint
2018-12-18 00:43:51 -08:00
Nolan Lawson 14a618f374
perf: lazy-load logged-in observers, fix circular dependencies (#823)
* perf: lazy-load logged-in observers, fix circular dependencies

* I guess async deps don't count as circular deps
2018-12-16 10:22:34 -08:00
Nolan Lawson f2f5508144
perf: only run getSelection() check if we have to (#817) 2018-12-15 19:21:14 -08:00
Nolan Lawson 260f6acf0e
perf: download and cache polyfills on-the-fly (#814)
* perf: download and cache polyfills on-the-fly

* fixup the localhost switch for service worker, does nothing
2018-12-15 17:13:46 -08:00
Nolan Lawson dbd6c35a88
perf: move indexeddb operations to async module (#813) 2018-12-15 17:13:40 -08:00
Nolan Lawson 7ddfe3830a
feat: add drag and drop for media uploads (#809)
* feat: add drag and drop for media uploads

fixes #65

* tweak colors
2018-12-15 02:06:12 -08:00
Nolan Lawson d5c0268ef2
fix: move page-lifecycle and idb-getall-shim to dynamic modules (#804)
This would help with Rollup compat if we ever decided to switch to
Rollup
2018-12-13 22:55:04 -08:00
Nolan Lawson 1940260631
fix: fix delete and redraft on replies (#789)
fixes #786
2018-12-12 23:45:52 -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