Nolan Lawson
b8d9c29bac
perf: move async modules to individual files ( #1611 )
2019-10-29 18:58:49 -07:00
Nolan Lawson
bb85bcb32b
fix: switch to arrow-key-navigation library ( #1607 )
...
For left/right arrow key navigation, switch to a small library I made to
handle this. Also make it load asynchronously, because why not.
2019-10-28 08:16:51 -07:00
Nolan Lawson
9f12d1ca07
fix: use small modules for userAgent.js instead of terser magic ( #1602 )
2019-10-24 20:37:23 -07:00
Nolan Lawson
7c04b86405
fix: use smooth scroll polyfill in Chrome for scroll-to-top ( #1601 )
...
* fix: use smooth scroll polyfill in Chrome for scroll-to-top
* rename thunk to __thunk__ for safety
2019-10-24 19:03:10 -07:00
Nolan Lawson
c174c19ddd
fix: fix tesseract.js progress bar ( #1599 )
...
* fix: fix tesseract.js progress bar
* fixup
2019-10-23 18:07:24 -07:00
Nolan Lawson
2a248cb482
fix: update tesseract to the latest version ( #1596 )
...
* chore: update tesseract to the latest version
* fix stuff
* fix delay
* fix caching, fixes #1457
2019-10-22 20:45:30 -07:00
Nolan Lawson
afb06d988e
perf: use webpack contenthash for better caching ( #1573 )
2019-10-14 20:00:57 -07:00
Nolan Lawson
3209d934e8
fix: tweak autocomplete behavior ( #1570 )
...
tweak the hashtag sort algorithm
fix issue where wrong results shown when offline or on slow network
refactor RequestThrottler
2019-10-13 08:08:06 -07:00
Nolan Lawson
89265f709e
fix: combine request throttling logic ( #1568 )
2019-10-12 21:08:08 -07:00
Nolan Lawson
8b3842f15a
feat: add hashtag autocomplete ( #1567 )
...
* feat: add hashtag autocomplete
fixes #1209
* add test and tweak aria label and styles
* do not prefer lowercase
* Change text
2019-10-12 18:06:04 -07:00
Nolan Lawson
d53430fee5
fix: fix uploading photos on iOS 13 ( #1550 )
...
fixes #1546
2019-10-07 07:15:05 -07:00
Nolan Lawson
56ba259ccf
fix: fix basic login - clear store on log out ( #1545 )
...
fixes #1544
2019-09-26 09:07:49 -07:00
Nolan Lawson
2ada968439
fix: fix search on Mastodon v3 ( #1541 )
...
fixes #1539
2019-09-26 05:24:20 -07:00
Nolan Lawson
038dc27163
perf: lazy-load computations ( #1538 )
...
* perf: lazy-load computations (experimental)
* fix lint
* add marks
* fixup
* lazy-load mixins too
* add missing files
* fix tests
2019-09-26 05:23:36 -07:00
Nolan Lawson
65524105f9
fix: hotkeys work with caps lock on ( #1531 )
...
fixes #1530
2019-09-24 18:46:53 -07:00
Nolan Lawson
3d58c86963
feat: left/right keys can change columns or focus ( #1516 )
...
* feat: left/right keys can change columns or focus
* fixup
* fixup, add tests
2019-09-22 23:53:29 -07:00
Nolan Lawson
489319a3a6
fix: improve nav height on tiny screens, use variables ( #1503 )
2019-09-20 23:17:57 -07:00
Nolan Lawson
6358af5d04
feat: add legacy build ( #1502 )
...
* feat: add legacy build
* service worker should also be in ES5
* fixup
2019-09-20 23:17:52 -07:00
Nolan Lawson
58af4d888e
feat: clicking avatar opens media modal ( #1485 )
...
fixes #1464
2019-09-14 22:26:29 -07:00
Nolan Lawson
72e187a0fa
perf: disable database cleanups when page is not active ( #1471 )
...
* perf: disable database cleanups when page is not active
* fix test
2019-09-07 21:05:36 -07:00
Nolan Lawson
26a036259e
chore: update standard ( #1466 )
2019-09-07 20:27:47 -07:00
Nolan Lawson
ebd10a43d2
perf: fetch lists from database on page load ( #1450 )
...
* perf: fetch lists from database on page load
follow-up to #1448 , I would like for there not to be a flash on the /community page where the lists suddenly load in, but I would still like to avoid the network request if possible. So when the page first loads, we can load the lists from the database and only fetch them from the network if not in the cache.
* add comment
2019-08-29 18:41:36 -07:00
Nolan Lawson
56f266cb93
perf: terminate tesseract worker after a delay ( #1449 )
...
fixes #1447
2019-08-29 08:51:41 -07:00
Nolan Lawson
c8738f17b0
fix: add progress bar for OCR ( #1444 )
2019-08-27 23:23:35 -07:00
Nolan Lawson
e2c137b2ef
fix: prefer local file URLs for OCR ( #1436 )
2019-08-25 21:48:59 -07:00
Nolan Lawson
ca9a32d303
feat: add OCR for image descriptions using tesseract.js ( #1433 )
...
* feat: add OCR for image descriptions using tesseract.js
* tweak style of alt editor
* remove unnecessary files
2019-08-25 18:33:44 -07:00
Nolan Lawson
8c6a701d6f
fix: ensure "disable blurhash" setting is honored ( #1422 )
...
* fix: ensure "disable blurhash" setting is honored
fixes #1421
* remove play button for audio/video
2019-08-22 09:09:21 -07:00
Nolan Lawson
4232da5e33
fix: fix lint
2019-08-19 20:23:58 -07:00
Nolan Lawson
c98b96aa44
fix: move worker-loader to webpack config ( #1405 )
...
This avoids ESLint complaining about the `worker-loader!` declaration
2019-08-18 15:15:20 -07:00
Nolan Lawson
009a511c80
perf: call revokeObjectURL() on stale blurhash blob URLs ( #1403 )
...
* perf: call revokeObjectURL() on stale blurhash blob URLs
fixes #1402
* add a test
* add comment
2019-08-18 15:15:13 -07:00
Nolan Lawson
03dff1c595
fix: remove firefox UA sniff for img.decode ( #1393 )
...
fixes #1388
2019-08-17 15:35:43 -07:00
Nolan Lawson
f8180e813f
fix: move blurhash worker operations to before status rendering ( #1391 )
...
* fix: move blurhash worker operations to before status rendering
* slight refactor
* avoid sending encoded data back and forth
* move cache outside worker
2019-08-17 14:36:13 -07:00
Sorin Davidoi
77bb784efd
feat(media): Blurhash ( #1381 )
...
* chore(npm): Install blurhash
* feat(media): Show blurhash
* fix(media/blurhash): Better sensitive video handling
* feat(media): Preference for using blurhash
* chore(utils/blurhash): Add performance marks
* fix(utils/blurhash): Performance marks
* fix(utils/blurhash): Use correct dimension
* refactor(utils/blurhash): Use constant for number of pixels
* refactor(media): Simplify logic for displaying blurhash
* chore(tests/spec): Attempt to adjust sensitivity tests for blurhash
* chore(tests/spec): Update sensitivity tests for blurhash
* chore(tests/spec): Check for sensitive
* fix(media/blurhash): Handle videos
* fix: Video handling
* fix: Videos
* minor refactoring, fix Svelte warning
* fix: Large inline images and videos
* feat(settings): Rename blurhash setting
* refactor: Use toBlob, block media rendering until blurhash ready
* refactor: Move computations to Web Worker
* fix(workers/blurhash): More error handling
* feat(workers/blurhash): Use quick-lru for caching
* fix: Don't create Context2D needlessly
* fix(workers/blurhash): Increase cache size to 100
* fix(workers/blurhash): Don't resolve promise twice
* fix(utils/decode-image): Ignore data URLs
Throws exception which prevents the image from loading.
2019-08-17 10:54:45 -07:00
Nolan Lawson
ea58242b85
fix: fix malformed URLs in statuses ( #1385 )
...
fixes #1384
2019-08-11 11:09:51 -07:00
Nolan Lawson
b2d7fad435
perf: only update draggable x/y state at end of drag ( #1379 )
...
* perf: only update draggable x/y state at end of drag
This is more intelligent and more performant than using requestIdleCallback willy-nilly. We can just update the store when the user is actually done dragging the button.
* remove console.log
* consistent syntax
2019-08-07 20:38:01 -07:00
Nolan Lawson
87bab8662c
perf: use requestPostAnimationFrame to reduce layout thrashing ( #1376 )
2019-08-07 09:11:34 -07:00
Nolan Lawson
d58ab52a09
fix: improve focal points draggable style/perf ( #1371 )
...
* fix: improve focal points draggable style/perf
* remove unnecessary global
* fix all the things
* fix comment
2019-08-04 13:31:51 -07:00
Nolan Lawson
00945a3608
chore: update standard to v13 ( #1370 )
2019-08-03 13:49:37 -07:00
Nolan Lawson
467eb85209
fix: simplify window.matchMedia ( #1359 )
...
There is really no reason to call window.matchMedia instead of just matchMedia.
2019-07-23 20:33:40 -07:00
Nolan Lawson
6c58052684
fix: remove unnecessary function cache ( #1358 )
...
This is just a bit of code cleanup; I think this cache logic is excessive
2019-07-23 20:33:31 -07:00
Nolan Lawson
fbcac6d3e4
fix: fix Firefox img.decode bug ( #1357 )
...
* fix: fix Firefox img.decode bug
Fixes #1344
* fix error
2019-07-23 20:33:22 -07:00
Nolan Lawson
7628eeed66
fix: fix grayscale wellness setting in dark mode ( #1351 )
2019-07-21 18:21:35 -07:00
Nolan Lawson
4d098d6b46
fix: fix streaming gap ( #1349 )
2019-07-21 15:31:26 -07:00
Nolan Lawson
6fafe19454
fix: fix html style of glitch-soc markdown content ( #1350 )
2019-07-21 15:31:17 -07:00
Nolan Lawson
68343a7a09
fix: use pure CSS for focus effect ( #1323 )
...
* fix: use pure CSS for focus effect
fixes #1322
* apply elsewhere too
* fix comment
2019-07-08 09:42:45 -07:00
Nolan Lawson
8615c6e4fd
fix: add warnings when click delegates return non-booleans ( #1319 )
2019-07-07 18:26:06 -07:00
Nolan Lawson
7fd6cdc22c
fix: fix event propagation for click delegates ( #1317 )
...
fixes #1316
2019-07-07 17:32:50 -07:00
Nolan Lawson
b26ec958a5
fix: fix return focus on keyboard-clicking media ( #1306 )
...
fixes #1305
2019-07-07 12:09:29 -07:00
Nolan Lawson
19566bda2e
fix: use focusin/focusout instead of custom events ( #1308 )
2019-07-07 11:43:35 -07:00
Nolan Lawson
85b75900c1
feat: add ability to set focal points for media ( #1303 )
...
* feat: add ability to set focal points for media
fixes #739
* fix tests
* actually fix tests
* really really fix tests
* really really really fix tests pinkie swear
2019-07-07 00:14:19 -07:00
Nolan Lawson
58a8772edc
perf: lazy-load the ComposeBox ( #1262 )
2019-06-01 17:01:50 -07:00
Nolan Lawson
74230cfe8e
fix: fix service worker for real ( #1258 )
...
fixes #1243
2019-06-01 13:07:38 -07:00
Nolan Lawson
a35f5ee2d9
feat: implement wellness settings ( #1256 )
...
* implement wellness settings
fixes #1192
Adds
- grayscale mode (as well as separate grayscale/dark grayscale
themes)
- disable follower/boost/fav counts (follower counts capped at 10)
- disable unread notification count (red dot)
* fix lint
* fix crawler
2019-06-01 13:07:31 -07:00
Nolan Lawson
27864fc47f
fix: Revert "fix: no need for double reload of SW in Chrome ( #1251 )" ( #1257 )
...
This reverts commit fa2eb8fe52
.
2019-06-01 12:17:12 -07:00
Nolan Lawson
fa2eb8fe52
fix: no need for double reload of SW in Chrome ( #1251 )
...
fixes #1243
2019-05-28 08:18:11 -07:00
Nolan Lawson
692e8b57c3
fix: separate "inline theme" from "default theme" ( #1216 )
2019-05-25 08:19:11 -07:00
Nolan Lawson
70da9a92a6
fix: close/open websocket on freeze/resume events ( #1195 )
...
* fix: close/open websocket on freeze/resume events
attempt to address #14
* fix unit tests
2019-05-08 19:58:32 -07:00
Nolan Lawson
0887196db4
feat: add snackbar alert with refresh button ( #1193 )
...
* feat: add snackbar alert with refresh button
fixes #77
* fixup
* change refresh to reload
2019-05-08 07:52:12 -07:00
Nolan Lawson
de220e7262
fix: throttle XHRs from autosuggest ( #1190 )
...
* fix: throttle XHRs from autosuggest
* throttle and abort properly
* add comment
* fix xhr bug
2019-05-06 20:29:43 -07:00
Nolan Lawson
8d0db2c97c
fix: make autosuggestion accessible ( #1183 )
...
* fix: make autosuggestion accessible
fixes #129
* remove tabindexes, fix aria-hidden
2019-05-05 22:08:54 -07:00
Nolan Lawson
23bdc6c87e
feat: implement notification filters (all vs mentions) ( #1177 )
...
fixes #1176
2019-05-04 17:58:44 -07:00
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