Background
The condition isn't resulting in the correct output:
<cdx-card
:url="entry.url"
:thumbnail="{ url: entry.thumbnail }"
:custom-placeholder-icon="!entry.url || entry.missing ? cdxIconAlert : undefined"
:class="{ 'cdx-card--is-link': entry.url || editing }"It duplicates to <a href="https://en.wikipedia.beta.wmcloud.org/wiki/Main_Page" class="cdx-card cdx-card--is-link cdx-card--is-link">
Requirement
Scope: ReadingLists (desktop + mobile).
- Remove the duplicate cdx-card--is-link class from the rendered <cdx-card> elements in Reading List entry items.
- Cards for saved pages on the Saved Pages (Special:ReadingLists) page must render with a single instance of the cdx-card--is-link class.
- The removal must not affect card styling, interactivity, or link behavior.
- The fix applies to all Reading List cards where entry.url or editing determines the link state.
BDD
Feature: Prevent duplicate `cdx-card--is-link` class in Reading List cards
Scenario: Rendering saved page cards
Given I open the Saved Pages (Special:ReadingLists) page
When the Reading List entries are rendered
Then each `<cdx-card>` element has only one instance of the `cdx-card--is-link` class
And all card styles and link behavior remain unchangedTest Steps
Test Case 1: Verify duplicate class removal
- Open Special:ReadingLists and view saved entries.
- Inspect a Reading List card element in the DOM.
- AC1: The <cdx-card> element contains only one instance of the cdx-card--is-link class.
- AC2: The card styling and clickable behavior remain functional.
QA Results - Prod
| AC | Status | Details |
|---|---|---|
| 1 | ✅ | T405540#11326020 |
| 2 | ✅ | T405540#11326020 |
Acceptance criteria for done
- Remove duplicated class in output
