Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add blurhash #10630

Merged
merged 9 commits into from Apr 27, 2019

Conversation

Projects
None yet
3 participants
@Gargron
Copy link
Member

commented Apr 23, 2019

Blurhash encodes an image as a short string of ASCII characters that can be saved in the database and transmitted via the API. It allows displaying a blurred preview on the clients before the real image file loads. It's also blurred enough that it can be displayed instead of the black box when media is hidden.

grafik

Making the hidden media box a little more visually appealing should hopefully help the adult content creators on the network. But also beyond that, being able to show a nice placeholder is especially useful for media that has been uncached and that is being (slowly) reloaded through the media proxy.

It's also potentially useful for federation with servers from which you do not want to store/load media. The short ASCII code is safe to store and display to the end-user, allowing them to make the decision to click-through to the original resource.

@Gargron Gargron added api ui labels Apr 23, 2019

@Gargron Gargron force-pushed the feature-blurhash branch 2 times, most recently from 807d21b to 80d9e4e Apr 23, 2019

@Gargron Gargron force-pushed the feature-blurhash branch from 80d9e4e to a220a8b Apr 25, 2019

@Gargron Gargron marked this pull request as ready for review Apr 25, 2019

@Shleeble

This comment has been minimized.

Copy link
Contributor

commented Apr 26, 2019

Excellent little UX tweak.

@Gargron Gargron force-pushed the feature-blurhash branch from 8e839ae to e932a91 Apr 26, 2019

@ykzts

ykzts approved these changes Apr 27, 2019

@Gargron Gargron merged commit fba96c8 into master Apr 27, 2019

11 checks passed

ci/circleci: build Your tests passed on CircleCI!
Details
ci/circleci: check-i18n Your tests passed on CircleCI!
Details
ci/circleci: install Your tests passed on CircleCI!
Details
ci/circleci: install-ruby2.4 Your tests passed on CircleCI!
Details
ci/circleci: install-ruby2.5 Your tests passed on CircleCI!
Details
ci/circleci: install-ruby2.6 Your tests passed on CircleCI!
Details
ci/circleci: test-ruby2.4 Your tests passed on CircleCI!
Details
ci/circleci: test-ruby2.5 Your tests passed on CircleCI!
Details
ci/circleci: test-ruby2.6 Your tests passed on CircleCI!
Details
ci/circleci: test-webui Your tests passed on CircleCI!
Details
codeclimate All good!
Details

@Gargron Gargron deleted the feature-blurhash branch Apr 27, 2019

lucida3rd added a commit to lucida3rd/mastodon that referenced this pull request Apr 27, 2019

lucida3rd added a commit to lucida3rd/mastodon that referenced this pull request Apr 29, 2019

lucida3rd added a commit to lucida3rd/mastodon that referenced this pull request Apr 29, 2019

lucida3rd added a commit to lucida3rd/mastodon that referenced this pull request Apr 30, 2019

@neet neet referenced this pull request May 4, 2019

Merged

Support Mastodon 2.8.1 #48

rosylilly added a commit to best-friends/mastodon that referenced this pull request May 4, 2019

Add blurhash (tootsuite#10630)
* Add blurhash

* Use fallback color for spoiler when blurhash missing

* Federate the blurhash and accept it as long as it's at most 5x5

* Display unknown media attachments as blurhash placeholders

* Improve style of embed actions and spoiler button

* Change blurhash resolution from 3x3 to 4x4

* Improve dependency definitions

* Fix code style issues

rosylilly added a commit to best-friends/mastodon that referenced this pull request May 4, 2019

Add blurhash (tootsuite#10630)
* Add blurhash

* Use fallback color for spoiler when blurhash missing

* Federate the blurhash and accept it as long as it's at most 5x5

* Display unknown media attachments as blurhash placeholders

* Improve style of embed actions and spoiler button

* Change blurhash resolution from 3x3 to 4x4

* Improve dependency definitions

* Fix code style issues

rosylilly added a commit to best-friends/mastodon that referenced this pull request May 5, 2019

Add blurhash (tootsuite#10630)
* Add blurhash

* Use fallback color for spoiler when blurhash missing

* Federate the blurhash and accept it as long as it's at most 5x5

* Display unknown media attachments as blurhash placeholders

* Improve style of embed actions and spoiler button

* Change blurhash resolution from 3x3 to 4x4

* Improve dependency definitions

* Fix code style issues

joycem137 added a commit to BeachCity/mastodon that referenced this pull request May 5, 2019

Merge with 2.8.2 (#7)
* Add new pt-br translations (tootsuite#10564)

* New strings added into the Slovak translation (tootsuite#10562)

* New strings added into the Slovak translation

* Update sk.yml

* Update sk.yml

* Update sk.yml

* Update sk.yml

* Small SK locale fixes (tootsuite#10561)

* Small SK locale fixes

* Update devise.sk.yml

* Bump capybara from 3.16.1 to 3.16.2 (tootsuite#10552)

Bumps [capybara](https://github.com/teamcapybara/capybara) from 3.16.1 to 3.16.2.
- [Release notes](https://github.com/teamcapybara/capybara/releases)
- [Changelog](https://github.com/teamcapybara/capybara/blob/master/History.md)
- [Commits](teamcapybara/capybara@3.16.1...3.16.2)

Signed-off-by: dependabot[bot] <support@dependabot.com>

* Bump rubocop from 0.67.1 to 0.67.2 (tootsuite#10500)

Bumps [rubocop](https://github.com/rubocop-hq/rubocop) from 0.67.1 to 0.67.2.
- [Release notes](https://github.com/rubocop-hq/rubocop/releases)
- [Changelog](https://github.com/rubocop-hq/rubocop/blob/master/CHANGELOG.md)
- [Commits](rubocop-hq/rubocop@v0.67.1...v0.67.2)

Signed-off-by: dependabot[bot] <support@dependabot.com>

* Bump oj from 3.7.11 to 3.7.12 (tootsuite#10581)

Bumps [oj](https://github.com/ohler55/oj) from 3.7.11 to 3.7.12.
- [Release notes](https://github.com/ohler55/oj/releases)
- [Changelog](https://github.com/ohler55/oj/blob/master/CHANGELOG.md)
- [Commits](ohler55/oj@v3.7.11...v3.7.12)

Signed-off-by: dependabot[bot] <support@dependabot.com>

* i18n: Update Corsican translation (tootsuite#10583)

* Updates the Slovak translation further (tootsuite#10584)

* Important Slovak grammar fixes (tootsuite#10585)

* Important grammar fixes for SK Devise translation

* Important Slovak grammar fixes

* Update devise.sk.yml

* Important Slovak grammar fixes

Last batch for today :-)

* Update devise.sk.yml

* Update sk.yml

* Update sk.yml

* Update sk.yml

* Allow modal secondary button to shrink and allow wider confirmation modals (tootsuite#10586)

Fixes tootsuite#10531

* Update sk.yml translation again (tootsuite#10589)

* Update sk.yml

* Update sk.yml

* Update sk.yml

* Bump sidekiq-unique-jobs from 6.0.12 to 6.0.13 (tootsuite#10580)

Bumps [sidekiq-unique-jobs](https://github.com/mhenrixon/sidekiq-unique-jobs) from 6.0.12 to 6.0.13.
- [Release notes](https://github.com/mhenrixon/sidekiq-unique-jobs/releases)
- [Changelog](https://github.com/mhenrixon/sidekiq-unique-jobs/blob/master/CHANGELOG.md)
- [Commits](mhenrixon/sidekiq-unique-jobs@v6.0.12...v6.0.13)

Signed-off-by: dependabot[bot] <support@dependabot.com>

* Bump sidekiq from 5.2.5 to 5.2.6 (tootsuite#10582)

Bumps [sidekiq](https://github.com/mperham/sidekiq) from 5.2.5 to 5.2.6.
- [Release notes](https://github.com/mperham/sidekiq/releases)
- [Changelog](https://github.com/mperham/sidekiq/blob/master/Changes.md)
- [Commits](mperham/sidekiq@v5.2.5...v5.2.6)

Signed-off-by: dependabot[bot] <support@dependabot.com>

* Some new strings for Slovak (tootsuite#10596)

* Configrationable repository url (tootsuite#10600)

* config: Add GITHUB_REPOSITORY for repository name

* config: Add SOURCE_BASE_URL for repository url

* Show source_url and repository name on getting started

* Use correct local names for fonts (tootsuite#10594)

* Update NL (Dutch) translation (tootsuite#10601)

* Update NL language strings

Have to do it this way, cause this file is locked on Weblate

* fix

* Update simple_form.nl.yml

* Update nl.yml

* Animate avatar GIFs on-hover on public profiles (tootsuite#10549)

* Third time is the charm?

* Use full asset URL for data-static and data-original

̀image_tag` expands to the full asset URL, we have to do the same in `data` attributes so that it can work when assets and user data are stored on a different host

* Treat meta[property] as a space-separated list (tootsuite#10604)

The @Property attribute in HTML is a space-separated list of values.
This change normalizes whitespace and finds the desired value in
the list instead of requiring an exact single-value match.

More details:
https://www.ctrl.blog/entry/rdfa-socialmedia-metadata.html

* Update hy.json (tootsuite#10591)

* Bump lograge from 0.10.0 to 0.11.0 (tootsuite#10588)

Bumps [lograge](https://github.com/roidrage/lograge) from 0.10.0 to 0.11.0.
- [Release notes](https://github.com/roidrage/lograge/releases)
- [Changelog](https://github.com/roidrage/lograge/blob/master/CHANGELOG.md)
- [Commits](roidrage/lograge@v0.10.0...v0.11.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>

* Bump webpush from 0.3.7 to 0.3.8 (tootsuite#10592)

Bumps [webpush](https://github.com/zaru/webpush) from 0.3.7 to 0.3.8.
- [Release notes](https://github.com/zaru/webpush/releases)
- [Changelog](https://github.com/zaru/webpush/blob/master/CHANGELOG.md)
- [Commits](zaru/webpush@v0.3.7...v0.3.8)

Signed-off-by: dependabot[bot] <support@dependabot.com>

* Add hi.json (tootsuite#10573)

* Default to the web domain (eg. mastodon.lubar.me) instead of the local domain (eg. lubar.me) for keybase proofs (tootsuite#10565)

* i18n: Update Catalan translation (tootsuite#10559)

* Updated Catalan strings

* Update ca.yml

* Update ca.yml

* Update ca.yml

* Update ca.yml

* Update ca.yml

* Update ca.yml

* Update ca.yml

* Update simple_form.ca.yml

* Update simple_form.ca.yml

* Update simple_form.ca.yml

* bundle exec i18n-tasks

* Update ca.json

* Update simple_form.ca.yml

* i18n: Update Catalan translations

* i18n: Update Catalan translations

* i18n: Update Catalan translations

* i18n: Update Catalan translations

* i18n: Update Catalan translations

* i18n: Update Catalan translations

* i18n: Update Catalan translations

* i18n: Update Catalan translations

* i18n: Update Catalan translations

* Small fix Dutch translation (tootsuite#10612)

* Small fix Dutch translation

* Better descriptive titles

See tootsuite#10611

* i18n: Fix misleading strings in Polish translation (tootsuite#10615)

* Bump cld3 from 3.2.3 to 3.2.4 (tootsuite#10617)

Bumps [cld3](https://github.com/akihikodaki/cld3-ruby) from 3.2.3 to 3.2.4.
- [Release notes](https://github.com/akihikodaki/cld3-ruby/releases)
- [Commits](akihikodaki/cld3-ruby@v3.2.3...v3.2.4)

Signed-off-by: dependabot[bot] <support@dependabot.com>

* Minor code cleanup (tootsuite#10613)

* Fix modal items cannot scroll on touch devices (tootsuite#10605)

* Allow switching between singe-option and multiple-option polls (tootsuite#10603)

* Bump doorkeeper from 5.0.2 to 5.1.0 (tootsuite#10598)

Bumps [doorkeeper](https://github.com/doorkeeper-gem/doorkeeper) from 5.0.2 to 5.1.0.
- [Release notes](https://github.com/doorkeeper-gem/doorkeeper/releases)
- [Changelog](https://github.com/doorkeeper-gem/doorkeeper/blob/master/NEWS.md)
- [Commits](doorkeeper-gem/doorkeeper@v5.0.2...v5.1.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>

* Bump aws-sdk-s3 from 1.36.0 to 1.36.1 (tootsuite#10618)

Bumps [aws-sdk-s3](https://github.com/aws/aws-sdk-ruby) from 1.36.0 to 1.36.1.
- [Release notes](https://github.com/aws/aws-sdk-ruby/releases)
- [Changelog](https://github.com/aws/aws-sdk-ruby/blob/master/gems/aws-sdk-s3/CHANGELOG.md)
- [Commits](aws/aws-sdk-ruby@v1.36.0...v1.36.1)

Signed-off-by: dependabot[bot] <support@dependabot.com>

* Fixed Healthchecks in docker-compose.yml (tootsuite#10553)

* Bump capybara from 3.16.2 to 3.17.0 (tootsuite#10602)

Bumps [capybara](https://github.com/teamcapybara/capybara) from 3.16.2 to 3.17.0.
- [Release notes](https://github.com/teamcapybara/capybara/releases)
- [Changelog](https://github.com/teamcapybara/capybara/blob/master/History.md)
- [Commits](teamcapybara/capybara@3.16.2...3.17.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>

* [Security] Bump nokogiri from 1.10.2 to 1.10.3 (tootsuite#10620)

Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.10.2 to 1.10.3. **This update includes security fixes.**
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/master/CHANGELOG.md)
- [Commits](sparklemotion/nokogiri@v1.10.2...v1.10.3)

Signed-off-by: dependabot[bot] <support@dependabot.com>

* Fix sign up button not saying sign up when invite is used (tootsuite#10623)

Fix tootsuite#10616

* Fix stoplight logging to stderr separate from Rails logger (tootsuite#10624)

* Bump capybara from 3.17.0 to 3.18.0 (tootsuite#10626)

Bumps [capybara](https://github.com/teamcapybara/capybara) from 3.17.0 to 3.18.0.
- [Release notes](https://github.com/teamcapybara/capybara/releases)
- [Changelog](https://github.com/teamcapybara/capybara/blob/master/History.md)
- [Commits](teamcapybara/capybara@3.17.0...3.18.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>

* Bump sidekiq from 5.2.6 to 5.2.7 (tootsuite#10627)

Bumps [sidekiq](https://github.com/mperham/sidekiq) from 5.2.6 to 5.2.7.
- [Release notes](https://github.com/mperham/sidekiq/releases)
- [Changelog](https://github.com/mperham/sidekiq/blob/master/Changes.md)
- [Commits](mperham/sidekiq@v5.2.6...v5.2.7)

Signed-off-by: dependabot[bot] <support@dependabot.com>

* Reject follow requests of blocked users (tootsuite#10633)

* Fix upload progressbar when image resizing is involved (tootsuite#10632)

* Fix not being able to save e-mail preference for new pending accounts (tootsuite#10622)

* Fix LDAP/PAM/SAML/CAS users not being approved instantly (tootsuite#10621)

* Bump bootsnap from 1.4.3 to 1.4.4 (tootsuite#10634)

Bumps [bootsnap](https://github.com/Shopify/bootsnap) from 1.4.3 to 1.4.4.
- [Release notes](https://github.com/Shopify/bootsnap/releases)
- [Changelog](https://github.com/Shopify/bootsnap/blob/master/CHANGELOG.md)
- [Commits](Shopify/bootsnap@v1.4.3...v1.4.4)

Signed-off-by: dependabot[bot] <support@dependabot.com>

* New string added for Slovak translation (tootsuite#10637)

* Add blurhash (tootsuite#10630)

* Add blurhash

* Use fallback color for spoiler when blurhash missing

* Federate the blurhash and accept it as long as it's at most 5x5

* Display unknown media attachments as blurhash placeholders

* Improve style of embed actions and spoiler button

* Change blurhash resolution from 3x3 to 4x4

* Improve dependency definitions

* Fix code style issues

* Fix approved column being set to nil instead of false (tootsuite#10642)

Fix tootsuite#10621 (comment)

* Update hy.json (tootsuite#10644)

* Bump rubocop from 0.67.2 to 0.68.0 (tootsuite#10654)

Bumps [rubocop](https://github.com/rubocop-hq/rubocop) from 0.67.2 to 0.68.0.
- [Release notes](https://github.com/rubocop-hq/rubocop/releases)
- [Changelog](https://github.com/rubocop-hq/rubocop/blob/master/CHANGELOG.md)
- [Commits](rubocop-hq/rubocop@v0.67.2...v0.68.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>

* Bump bullet from 5.9.0 to 6.0.0 (tootsuite#10635)

Bumps [bullet](https://github.com/flyerhzm/bullet) from 5.9.0 to 6.0.0.
- [Release notes](https://github.com/flyerhzm/bullet/releases)
- [Changelog](https://github.com/flyerhzm/bullet/blob/master/CHANGELOG.md)
- [Commits](flyerhzm/bullet@5.9.0...6.0.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>

* Bump annotate from 2.7.4 to 2.7.5 (tootsuite#10651)

Bumps [annotate](https://github.com/ctran/annotate_models) from 2.7.4 to 2.7.5.
- [Release notes](https://github.com/ctran/annotate_models/releases)
- [Changelog](https://github.com/ctran/annotate_models/blob/develop/CHANGELOG.rdoc)
- [Commits](ctran/annotate_models@v2.7.4...2.7.5)

Signed-off-by: dependabot[bot] <support@dependabot.com>

* Bump rubocop from 0.68.0 to 0.68.1 (tootsuite#10658)

Bumps [rubocop](https://github.com/rubocop-hq/rubocop) from 0.68.0 to 0.68.1.
- [Release notes](https://github.com/rubocop-hq/rubocop/releases)
- [Changelog](https://github.com/rubocop-hq/rubocop/blob/master/CHANGELOG.md)
- [Commits](rubocop-hq/rubocop@v0.68.0...v0.68.1)

Signed-off-by: dependabot[bot] <support@dependabot.com>

* Minor fixes to the French translation (tootsuite#10662)

* Disallow robots from indexing /interact/ (tootsuite#10666)

This does not provide any new information and may just triple the number
of crawled pages

* Check that an invite link is valid before bypassing approval mode (tootsuite#10657)

* Check that an invite link is valid before bypassing approval mode

Fixes tootsuite#10656

* Add tests

* Only consider valid invite links in registration controller

* fixup

* Change account gallery in web UI (tootsuite#10667)

- 3 items per row instead of 2
- Use blurhash for previews
- Animate/hover-to-play GIFs and videos
- Open media modal instead of opening status
- Allow opening status instead with ctrl+click and open in new tab

* Fix alignment of items in the account gallery in web UI and load more per page (tootsuite#10674)

* Make the "mark media as sensitive" button more obvious in web UI (tootsuite#10673)

* Make the "mark media as sensitive" button more obvious in web UI

* Use eye-slash icon instead of eye icon to mean "hide"

* When selecting a toot via keyboard, ensure it is scrolled into view (tootsuite#10593)

* Bump fabrication from 2.20.1 to 2.20.2 (tootsuite#10677)

Bumps [fabrication](https://github.com/paulelliott/fabrication) from 2.20.1 to 2.20.2.
- [Release notes](https://github.com/paulelliott/fabrication/releases)
- [Changelog](https://github.com/paulelliott/fabrication/blob/master/Changelog.markdown)
- [Commits](paulelliott/fabrication@2.20.1...2.20.2)

Signed-off-by: dependabot[bot] <support@dependabot.com>

* Bump scss_lint from 0.57.1 to 0.58.0 (tootsuite#10678)

Bumps [scss_lint](https://github.com/sds/scss-lint) from 0.57.1 to 0.58.0.
- [Release notes](https://github.com/sds/scss-lint/releases)
- [Changelog](https://github.com/sds/scss-lint/blob/master/CHANGELOG.md)
- [Commits](sds/scss-lint@v0.57.1...v0.58.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>

* Bump rack-attack from 5.4.2 to 6.0.0 (tootsuite#10599)

* Bump rack-attack from 5.4.2 to 6.0.0

Bumps [rack-attack](https://github.com/kickstarter/rack-attack) from 5.4.2 to 6.0.0.
- [Release notes](https://github.com/kickstarter/rack-attack/releases)
- [Changelog](https://github.com/kickstarter/rack-attack/blob/master/CHANGELOG.md)
- [Commits](kickstarter/rack-attack@v5.4.2...v6.0.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>

* fix payload[:request]

* Add button to view context to media modal (tootsuite#10676)

* Add "view context" button to media modal when opened from gallery

* Add "view context" button to video modal

Allow closing the video modal by navigating back in the browser,
just like the media modal

* Provide a link to existing domain block when trying to block an already-blocked domain (tootsuite#10663)

* When trying to block an already-blocked domain, provide a link to the block

* Fix styling for links in flash messages

* Allow blocks to be upgraded but not downgraded

* Explicitly disable storage of REST API results (tootsuite#10655)

Fixes tootsuite#10652

* Change font weight of sensitive button to 500 (tootsuite#10682)

* Fix accounts created through tootctl not being always pre-approved (tootsuite#10684)

Add `--approve` option to `tootctl accounts modify`

* Change e-mail whitelist/blacklist to not be checked when invited (tootsuite#10683)

* Change e-mail whitelist/blacklist to not be checked when invited

And only when creating an account, not when updating it later

Fix tootsuite#10648

* Fix test

* Do not retry processing ActivityPub jobs raising validation errors (tootsuite#10614)

* Do not retry processing ActivityPub jobs raising validation errors

Jobs yielding validation errors most probably won't ever be accepted,
so it makes sense not to clutter the queues with retries.

* Lower RecordInvalid error reporting to debug log level

* Remove trailing whitespace

* Bump version to 2.8.1 (tootsuite#10687)

* Add `tootctl cache clear` (tootsuite#10689)

* i18n: Update Corsican translation (tootsuite#10692)

* Minor account media gallery fixes (tootsuite#10695)

* Make the cursor icon consistant across media types in account media gallery

* Fix the video player modal causing scroll position to reset

* Add SOURCE_TAG to show source repository's tag (tootsuite#10698)

* Fix transition: all (tootsuite#10699)

* Bump blurhash from 0.1.2 to 0.1.3 (tootsuite#10700)

* Make sure the instance banner is never cropped (tootsuite#10702)

* I18n: Update Czech translation 🇨🇿 (tootsuite#10704)

* I18n: Update Czech translation

* Tiny fix

* Minor Slovak locale update (tootsuite#10705)

* Bump version to 2.8.2 (tootsuite#10703)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.