Skip to content

Polish import/settings UI and fix Share Importer composer#207

Merged
dprodger merged 1 commit into
mainfrom
import-ui-and-composer-fixes
May 31, 2026
Merged

Polish import/settings UI and fix Share Importer composer#207
dprodger merged 1 commit into
mainfrom
import-ui-and-composer-fixes

Conversation

@dprodger

Copy link
Copy Markdown
Owner

Summary

UI polish across the import/settings flows plus a fix for composer data not coming through when importing a song from MusicBrainz via the Share Importer.

Settings (logged-out)

  • Replace the custom Sign In button with the standard ApproachNoteButton (no icon, primary styling); relabel to Sign In / Sign Up so it fits on one line.

Import Song shelf (iOS + macOS share extensions)

  • Remove the music-note icon and the grey card container.
  • De-emphasize the MusicBrainz ID (smaller monospace, secondary color).
  • Widen the data fields to use the full available width.

Create Song form (iOS + macOS)

  • Remove the MusicBrainz ID field and the entire Additional Details section (incl. the "added later through the app" footer).
  • Move Cancel below Create Song, both using standard ApproachNoteButton styling.
  • Drop the now-unused key state var. (Imported musicbrainz_id / work_type are still submitted to the API.)

Share Importer composer fix

The composer was never being scraped: on a MusicBrainz work page, composer is a relationship (<dt>composer:</dt><dd>…), not a classed sidebar property, so the old dd.composer/dd.writer selectors never matched. The work page is now also served behind a JS challenge, making DOM scraping unreliable.

  • Resolve composers via the MusicBrainz web service (/ws/2/work/{id}?inc=artist-rels&fmt=json, same-origin) instead of the DOM.
  • Prefer composer, fall back to writer/lyricist.
  • Keep DOM scraping as a fallback; guard completionFunction to fire exactly once, with a 4s timeout safety net.

Test plan

  • Build iOS and macOS schemes (SwiftUI + extension changes were not compiled locally).
  • Re-import "Donna" (227437b0-…) and confirm composer populates as Jackie McLean (log should show composer = 'Jackie McLean').
  • Verify Settings, Import Song shelf, and Create Song form render correctly on both platforms.

🤖 Generated with Claude Code

- Settings: replace custom logged-out sign-in button with standard
  ApproachNoteButton, relabel "Sign In / Sign Up"
- Import Song shelf (iOS + macOS): drop icon and grey card, de-emphasize
  MusicBrainz ID, widen fields to full width
- Create Song form (iOS + macOS): remove MusicBrainz ID field and the
  Additional Details section, move Cancel below Create Song, use standard
  ApproachNoteButton styling; drop unused `key` state
- Share Importer JS: resolve composers via the MusicBrainz web service
  (artist-rels) instead of brittle DOM scraping, with a DOM fallback and
  a one-shot async completion guard

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@dprodger dprodger merged commit ee300dd into main May 31, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant