Commit graph

253 commits

Author SHA1 Message Date
Nolan Lawson 5c9416b7fa
fix: fix blurhash for reblogged images (#1412)
fixes #1411
2019-08-19 20:23:05 -07:00
Sorin Davidoi acb134e518 fix(components/media): Handling of grouped videos (#1409)
* fix(components/media): Handling of grouped videos

Fixes #1404

* fix(status/media): Wrap in a div
2019-08-19 19:01:35 -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
Sorin Davidoi c127d0a6bc feat(settings): Increase clickable area (#1401) 2019-08-18 12:29:36 -07:00
Sorin Davidoi 94cf7df954 fix(components/media): Autoplay and blurhash (#1400)
Fixes https://github.com/nolanlawson/pinafore/issues/1399.
2019-08-18 10:29:03 -07:00
Sorin Davidoi 823a7abebf fix(workers/blurhash): Don't use OffscreenCanvas (#1398) 2019-08-18 05:14:11 -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 f25c93526c
fix: rename "hide all media by default" (#1394) 2019-08-17 15:35:38 -07:00
Nolan Lawson be3b5eb9d9
fix: reduce number of blurhash performance measures (#1395) 2019-08-17 15:35:31 -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
Nolan Lawson daa1978945
fix: tweak position of sensitive media button in blurhash mode (#1390) 2019-08-17 14:36:07 -07:00
Nolan Lawson aca1067568
fix: tweak colors for blurhash sensitive media button/text (#1389) 2019-08-17 14:33:57 -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 c5e2eeee2d
perf: fix potential memory leak in IntersectionObserver (#1383) 2019-08-11 11:09:43 -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 a5f68aa45c
fix: make focal point button a bit larger (#1377)
* fix: make focal point button a bit larger

* make it a tad smaller
2019-08-07 09:11:52 -07:00
Nolan Lawson 87bab8662c
perf: use requestPostAnimationFrame to reduce layout thrashing (#1376) 2019-08-07 09:11:34 -07:00
Nolan Lawson 98e02cf650
perf: avoid measureText() where possible (#1375) 2019-08-07 09:11:15 -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 59bdd0bb77
fix: large streaming gaps by refetching (#1362)
fixes #1356
2019-07-28 19:38:34 -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 1a53ad3fe4
fix: fix bugs in streaming gap (#1355) 2019-07-22 07:43:36 -07:00
Nolan Lawson 734d1d7bbd
fix: fix useless nav-indicator-key attribute (#1353) 2019-07-21 19:31:19 -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
Louise de Beaufort 53f0fdf1a8 fix: Fix the style of blockquotes, ul and li in toots (#1348)
* Fix the style of blockquotes, ul and li in toots

* fixup based on review comments

fixes #1324
2019-07-21 15:31:05 -07:00
Nolan Lawson fa57608056
fix: improve style of report dialog (#1345) 2019-07-19 20:08:26 -07:00
Nolan Lawson 95a68e1fe2
fix: delete-and-redraft preserves polls (#1343)
* fix: delete-and-redraft preserves polls

fixes #1342

* fix test
2019-07-19 20:08:17 -07:00
Louise de Beaufort e5df77b2a8 fix: Use unformatted status content in deleteAndRedraft (#1340)
* Use unformatted status content in deleteAndRedraft

* deleteStatus always returns an object even when the deletion fails

* throw error

fixes #1340
2019-07-19 08:09:52 -07:00
Nolan Lawson a6235ded8c
fix: fix autosizing of delete/redraft (#1338)
fixes #1334
2019-07-17 21:34:53 -07:00
Nolan Lawson 015fe0080c
fix: limit search results from 40 to 5 (#1336)
40 is too much, also this aligns us with the Mastodon frontend UI.
2019-07-17 21:34:37 -07:00
Nolan Lawson 0e2479559b
fix: correctly parse hostname for instance block (#1328) 2019-07-08 20:51:17 -07:00
Nolan Lawson 6b40b2efbf
fix: add instance blocks (#1326)
* fix: add instance blocks

* block domains, not just instances
2019-07-08 19:26:44 -07:00
Nolan Lawson ade28cca5d
fix: remove useless noop methods (#1325) 2019-07-08 19:26:37 -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 8f6681ad7a
fix: clicking outside image closes modal (#1312)
fixes #862
2019-07-07 14:51:08 -07:00
Nolan Lawson 9fd5c8f6d2
fix: focal point should be only visible for images (#1311) 2019-07-07 13:24:49 -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 e5125a5a63
fix: fix poll color inside of notifications (#1304)
fixes #1271
2019-07-07 11:06:52 -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 d31f2ce010
feat: add support for audio attachments (#1293)
This is a new thing in Mastodon v2.9. I kept the "camera" icon because I like it better than the paperclip, and I think it covers the 99% use case.
2019-06-23 09:41:31 -07:00