Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Show a generated artwork when the audio thumbnail is absent #600

Merged
merged 2 commits into from
Jan 13, 2022

Conversation

dhruvkb
Copy link
Member

@dhruvkb dhruvkb commented Jan 13, 2022

Fixes

Fixes #349 by @zackkrida

Description

This PR adds the code for generating the album art when the audio artwork does not exist or if the image raises an error. It also adds the 'V-' prefix to the component name.

Testing Instructions

  1. Check out the PR and run Storybook.
  2. Check out the VAudioThumbnail stories and docs.

Screenshots

Screenshot 2022-01-13 at 8 00 40 PM

Screenshot 2022-01-13 at 8 00 46 PM

Screenshot 2022-01-13 at 8 00 51 PM

Checklist

  • My pull request has a descriptive title (not a vague title like Update index.md).
  • My pull request targets the default branch of the repository (main) or a parent feature branch.
  • My commit messages follow best practices.
  • My code follows the established code style of the repository.
  • I added or updated tests for the changes I made (if applicable).
  • I added or updated documentation (if applicable).
  • I tried running the project locally and verified that there are no visible errors.

Developer Certificate of Origin

Developer Certificate of Origin
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

@dhruvkb dhruvkb added 🟨 priority: medium Not blocking but should be addressed soon 🌟 goal: addition Addition of new feature 🕹 aspect: interface Concerns end-users' experience with the software labels Jan 13, 2022
@dhruvkb dhruvkb requested a review from a team as a code owner January 13, 2022 16:01
@dhruvkb dhruvkb requested review from krysal and obulat January 13, 2022 16:01
Copy link
Member

@zackkrida zackkrida left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flawless execution. So great. You simplified the p5 code and documented the new mathematical functions so clearly 👍

Copy link
Contributor

@sarayourfriend sarayourfriend left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is awesome! So creative, I really admire how you solved this!!!

I tested it locally and it works great. I tried to do some light performance testing by throwing 20 of them into the story and visiting the non-iframe version of the story on a low-power android device. There was a slight difference between loading only one and loading 20 and I tried several times for each one to make sure I wasn't perceiving slowness or just hitting a bump in the network... I think it is fine. If there really is a difference then it is miniscule.

Anyway, really great work, such a cool solution 😀

@dhruvkb dhruvkb merged commit da0c426 into redesign Jan 13, 2022
@dhruvkb dhruvkb deleted the audio_thumbnail branch January 13, 2022 18:23
@dhruvkb
Copy link
Member Author

dhruvkb commented Jan 13, 2022

I had a couple of mathematical computing courses in college. Really came in handy today!

@dhruvkb dhruvkb linked an issue Jan 13, 2022 that may be closed by this pull request
zackkrida added a commit that referenced this pull request Jan 14, 2022
* Update figma links in README

* Search results title (#577)

* Fix ci tests by restoring scopedSlots param in search results title spec

* Fix search result title casing

* Updated load more button (#578)

* Update `content-types` test with load more button changes

* VHeader (#488)

* Add VHeader stub
Rename VSearchBar and VSearchButton and move to VHeader
Add VLogoLoader to VHeader and adjust header styles

* Extract search route handling into composable, set Logo loading when fetching

* Update pnpm lockfile

* Add VFilterButton (#489)

Co-authored-by: sarayourfriend <24264157+sarayourfriend@users.noreply.github.com>
Co-authored-by: Zack Krida <zackkrida@pm.me>

* Add searchbar to header (#491)

Co-authored-by: sarayourfriend <24264157+sarayourfriend@users.noreply.github.com>
Co-authored-by: Zack Krida <zackkrida@pm.me>

* Update references to `InputField` to point to `VInputField` (#586)

* New 404 page (#583)

Co-authored-by: Krystle Salazar <krystle.salazar@automattic.com>

Co-authored-by: Zack Krida <zackkrida@pm.me>
Co-authored-by: sarayourfriend <24264157+sarayourfriend@users.noreply.github.com>
Co-authored-by: Dhruv Bhanushali <dhruv_b@live.com>
Co-authored-by: Krystle Salazar <krystle.salazar@automattic.com>

* Fix video tab

The media store query.mediaType is null for video, so it's not possible to use it as a key to look up results in the store

* Fix filters e2e tests by opening the sidebar

* Fix openverse.pot after-merge problems

* Fix e2e tests

* Show a generated artwork when the audio thumbnail is absent (#600)

* Fix single result back links

* Fix photo detail test

* Fix photo-details test

* Combine layouts into a single default (#599)

* Add header icons (#604)

* Fix error when `<rect>` dimensions are negative (#605)

* Add `VContentLink` component (#560)

Co-authored-by: sarayourfriend <24264157+sarayourfriend@users.noreply.github.com>
Co-authored-by: Olga Bulat <obulat@gmail.com>

* Prevent unsupported media types causing header errors

* Better video tab fix

* Remove sample audio data (#571)

Co-authored-by: Krystle Salazar <krystle.salazar@ciens.ucv.ve>
Co-authored-by: Olga Bulat <obulat@gmail.com>
Co-authored-by: sarayourfriend <24264157+sarayourfriend@users.noreply.github.com>
Co-authored-by: Dhruv Bhanushali <dhruv_b@live.com>
Co-authored-by: Krystle Salazar <krystle.salazar@automattic.com>
zackkrida added a commit that referenced this pull request Jan 21, 2022
* Update figma links in README

* Search results title (#577)

* Fix ci tests by restoring scopedSlots param in search results title spec

* Fix search result title casing

* Updated load more button (#578)

* Update `content-types` test with load more button changes

* VHeader (#488)

* Add VHeader stub
Rename VSearchBar and VSearchButton and move to VHeader
Add VLogoLoader to VHeader and adjust header styles

* Extract search route handling into composable, set Logo loading when fetching

* Update pnpm lockfile

* Add VFilterButton (#489)

Co-authored-by: sarayourfriend <24264157+sarayourfriend@users.noreply.github.com>
Co-authored-by: Zack Krida <zackkrida@pm.me>

* Add searchbar to header (#491)

Co-authored-by: sarayourfriend <24264157+sarayourfriend@users.noreply.github.com>
Co-authored-by: Zack Krida <zackkrida@pm.me>

* Update references to `InputField` to point to `VInputField` (#586)

* New 404 page (#583)

Co-authored-by: Krystle Salazar <krystle.salazar@automattic.com>

Co-authored-by: Zack Krida <zackkrida@pm.me>
Co-authored-by: sarayourfriend <24264157+sarayourfriend@users.noreply.github.com>
Co-authored-by: Dhruv Bhanushali <dhruv_b@live.com>
Co-authored-by: Krystle Salazar <krystle.salazar@automattic.com>

* Fix video tab

The media store query.mediaType is null for video, so it's not possible to use it as a key to look up results in the store

* Fix filters e2e tests by opening the sidebar

* Fix openverse.pot after-merge problems

* Fix e2e tests

* Show a generated artwork when the audio thumbnail is absent (#600)

* Fix single result back links

* Fix photo detail test

* Fix photo-details test

* Combine layouts into a single default (#599)

* Add header icons (#604)

* Fix error when `<rect>` dimensions are negative (#605)

* Default to all from the homepage; init

* Add `VContentLink` component (#560)

Co-authored-by: sarayourfriend <24264157+sarayourfriend@users.noreply.github.com>
Co-authored-by: Olga Bulat <obulat@gmail.com>

* Prevent unsupported media types causing header errors

* Better video tab fix

* Fix homepage test

* Remove sample audio data (#571)

* Modify "fetchState" mutations to support ALL_MEDIA

* All_MEDIA state working except for SET_MEDIA

* all media state init

* UI suppoort for media count

* wip

* ugh

* Mobile box layout adjustments

* Fix image clicks

* Content links

* Add debugging comment

* Remove dead code

* Result rounded corners

* Update src/utils/srand.js

* Focus states

* Small styling improvements to image grid title and horizontal spacing

* Refactor fetching for all media (#621)

* Refactor all fetching to use getters more

* Disable failing tests

* Revert index/key rename in image cell v-for

Co-authored-by: Zack Krida <zackkrida@pm.me>

* Add a wrapper to FETCH_MEDIA to simplify fetching all content (#640)

Add a wrapper to FETCH_MEDIA to simplify fetching all content

* Double number of skeleton boxes

* Progress

* Remove unused filter display component

* Set query when using filters

* Fix tests

* truncate audio box text

Co-authored-by: Krystle Salazar <krystle.salazar@ciens.ucv.ve>
Co-authored-by: Olga Bulat <obulat@gmail.com>
Co-authored-by: sarayourfriend <24264157+sarayourfriend@users.noreply.github.com>
Co-authored-by: Dhruv Bhanushali <dhruv_b@live.com>
Co-authored-by: Krystle Salazar <krystle.salazar@automattic.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🕹 aspect: interface Concerns end-users' experience with the software 🌟 goal: addition Addition of new feature 🟨 priority: medium Not blocking but should be addressed soon
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Default artwork for audio
3 participants