Skip to content

A card's link back keeps its licence's wording when the mark is on the shelf - #155

Merged
holden merged 1 commit into
mainfrom
claude/link-text-with-shelf-mark
Sep 22, 2026
Merged

holden merged 1 commit into
mainfrom
claude/link-text-with-shelf-mark

Conversation

@holden

@holden holden commented Sep 22, 2026 •

Copy link
Copy Markdown
Member

After #154 every Spotify card read Open at Spotify instead of Listen on Spotify: the card only read a :card-placed mark, and Spotify's moved to the shelf. The wording of the link back is per item wherever the image goes, so the card now reads the supplying source's mark regardless of placement, draws the image only for :card, and words the link and its hover title from link_text. Two chrome tests pin it for both placements. Refs #152.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Attribution marks can now provide custom text for source links.
    • Shelf-placed attribution marks use the custom link text without displaying a card mark.
    • Card-placed attribution marks continue to display on cards while using the custom link text.
  • Bug Fixes

    • Improved attribution-mark handling across different placements.

…he mark's image goes

#152 moved Spotify's mark from the card to the shelf, and `card_mark/1`
handed a card only a `:card`-placed mark — so every Music card's link-out
fell through to the generic *Open at Spotify*, which is not one of the
three phrases Spotify's Branding Guidelines permit, while the PR said
*Listen on Spotify* stayed. Measured on `/define/war` after the merge:
twelve cards, zero with the phrase.

A mark carries two obligations. Its image has a placement; the wording
of the link back is per item whatever that placement is. The card now
reads the supplying source's mark whether it is drawn on the card or on
the shelf, draws the image only for `:card`, and words the link — and
its hover title — from `link_text` when the mark has one. Two tests
render a shelf-placed and a card-placed mark and count the phrase on
every card.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Essentials

Run ID: c4616c52-996b-477c-9ba2-3e1cd7596c4c

📥 Commits

Reviewing files that changed from the base of the PR and between 5b491bf and 7d2736c.

📒 Files selected for processing (2)
  • lib/devils_dictionary_web/components/culture.ex
  • test/devils_dictionary_web/components/culture_chrome_test.exs

Included review availability: 0 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour.


📝 Walkthrough

Walkthrough

The change separates attribution-mark selection from card rendering. Shelf marks remain available for source links without rendering on cards. Source-link titles use custom mark text when present. Tests cover shelf and card placements.

Changes

Attribution Mark Rendering

Layer / File(s) Summary
Mark selection, rendering, and coverage
lib/devils_dictionary_web/components/culture.ex, test/devils_dictionary_web/components/culture_chrome_test.exs
card_mark/1 returns validated marks for shelf and card placements. Card markup renders only card-placed marks. Source-link titles use link_text when available. Tests cover both placements and link text.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 7d273

The attribution wording and placement behavior are covered for both supported mark placements, with no identified merge-blocking risk.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: card links retain the licence wording when the attribution mark is placed on the shelf.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Comment @coderabbitai help to get the list of available commands.

@holden
holden merged commit 6cb1ffa into main Sep 22, 2026
2 checks passed
@holden
holden deleted the claude/link-text-with-shelf-mark branch November 7, 2026 12:04
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