Skip to content

Add data source switch on album search results page#276

Merged
elamperti merged 3 commits intoelamperti:mainfrom
mikeparas:feat-source-switch
Apr 19, 2026
Merged

Add data source switch on album search results page#276
elamperti merged 3 commits intoelamperti:mainfrom
mikeparas:feat-source-switch

Conversation

@mikeparas
Copy link
Copy Markdown
Contributor

After searching for an album, the data source can only be changed by going back to the search form.

On the album results page, the static display of the data source has been changed to a dropdown to facilitate switching. After selecting an album, it goes back to the static text, as switching data sources at this point doesn't really make sense.

Addresses #275.

Screenshot 2026-03-25 at 9 47 09 AM

Changes

  • src/domains/scrobbleAlbum/partials/ProviderItem.tsx
    • New component to handle either dropdown or static display of the data source based on showDropdown prop
  • src/domains/scrobbleAlbum/partials/AlbumBreadcrumb.tsx
    • Use new ProviderItem to display the data source
    • New prop showProviderDropdown that gets passed to ProviderItem
  • src/domains/scrobbleAlbum/ScrobbleAlbumResults.tsx
    • Set showProviderDropdown on AlbumBreadcrumb to show the new dropdown
  • Other instances of AlbumBreadcrumb are unchanged and will show static text

Tests

  • cypress/e2e/scrobbleAlbum/scrobble-album-data-source.spec.js
    • Tests to assert the dropdown displays on the search results page, switching works, and static display shown on the album page

I haven't worked with Cypress before, so please let me know if any changes are needed with the tests.

* New `ProviderItem` component handles data source in the album
  search results breadcrumb, including new optional dropdown display.
* Update `AlbumBreadcrumb` with new `showProviderDropdown` prop which
  gets passed to `ProviderItem`.
* New cypress tests for new data source dropdown and switching
  functionality
@elamperti
Copy link
Copy Markdown
Owner

hey, sorry I didn't get to reply to your issue earlier. This is a good idea and the PR looks good!

I'll test it later and merge if everything is ok. Thanks for your contribution! 😊

@elamperti elamperti force-pushed the main branch 9 times, most recently from dda723a to bcf28c3 Compare April 19, 2026 05:09
Copy link
Copy Markdown
Owner

@elamperti elamperti left a comment

Choose a reason for hiding this comment

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

Looks great! Sorry it took me long to merge, I wanted to fix the CI pipeline first. I've been testing this locally and works as expected. Thanks again for this PR! This feature will be included in the next release 👍🏼

@elamperti elamperti merged commit 57914a9 into elamperti:main Apr 19, 2026
2 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants