feat(list-selectable): add cornerTag prop with Highlight Corner Tag (MR-490)#1241
Closed
leonardodouradol wants to merge 1 commit into
Closed
feat(list-selectable): add cornerTag prop with Highlight Corner Tag (MR-490)#1241leonardodouradol wants to merge 1 commit into
leonardodouradol wants to merge 1 commit into
Conversation
…MR-490) Adds support for the Highlight Corner Tag in ListSelectable, ListReadOnly and the shared ListContainer. The new CornerTag component lives as an internal subcomponent under src/CornerTag (not exported publicly in this release) and is rendered as an overlay at the top-right corner of card containers. - New CornerTag component with primaryDown/complementaryPure colors - ListSelectable receives a cornerTag prop via discriminated union: only allowed when type='card'; type='text' sets cornerTag?: never to block at compile-time - ListContainer renders CornerTag conditionally for type='card' - ListReadOnly accepts and forwards cornerTag (covers isSelectableDisabled) - New stories cover all V-02..V-14 variants from the spec - Unit tests cover CornerTag standalone + 16 ListSelectable variants - SCSS uses tokens: $color-brand-primary-down / $color-complementary-pure Spec: https://github.com/Pagnet/pagnet/issues/16178#issuecomment-4343595459 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Adds support for the Highlight Corner Tag in
ListSelectable(andListReadOnlyviaisSelectableDisabled). The newCornerTaglives as an internal subcomponent undersrc/CornerTag/(not exported publicly in this release) and is rendered as an overlay at the top-right corner of card containers.CornerTagcomponent withprimaryDown/complementaryPurecolors (tokens:$color-brand-primary-down/$color-complementary-pure)ListSelectablereceives a newcornerTagprop via discriminated union: only allowed whentype='card';type='text'setscornerTag?: neverto block at compile-time (per spec OQ-S6 — no runtime warns)ListContainerrendersCornerTagconditionally fortype='card'(single source of truth)ListReadOnlyaccepts and forwardscornerTag(coversisSelectableDisabledflow)CornerTagstandalone + 16ListSelectablevariantsSpec & PRD
API contract
type='text'+cornerTagis blocked by TypeScript (discriminated union).Test plan
yarn lint— zero errors on changed filesyarn jest(ocean-react) — 722/722 passing, 64 suites, zero regressionsaria-label, norole="status", reading order after card contentDecisions resolved during the spec
cornerTagis a discriminated-union prop —type='text'blocks usage at compile-timeCornerTagis internal-only (not exported insrc/index.tsthis release; future export is a follow-up when consumers likeCardGroupneed it)$color-brand-primary-down,$color-complementary-pure,$font-family-base,$font-weight-extrabold,$font-size-xxxsListContainer(shared) is the single source of truth —ListSelectableandListReadOnlyboth inherit support automatically