1.8 KiB
1.8 KiB
0005 Island product components take their text as props
Status: Proposed · Area: design · Date: 2026-10-04 · Decided by: agent
Context
The Lumina Design System draws product components (post, prediction, and subscription cards, creator stats, tier options, the support sheet) and a status vocabulary that pairs each status with one tone and icon. Both apps use them, and every one shows Persian copy, but island can't read the platform's translations.
Decision
- Island holds Lumina's product components (
PostCard,PredictionCard,SubscriptionCard,CreatorStats,TierOption,SupportSheet) and the status vocabulary:StatusKeymaps to a tone and icon inStatusBadge'sSTATUS_STYLES. - They take every text as props:
children, or onelabelsobject per component that the platform fills from i18next. Island never imports i18next and never hard-codes copy, defaults included. - Their data props are island's own types with the API's values (
PredictionData,SubscriptionStatus). Island never imports fromplatforms/or a feature's entities; the platform's models map each*Payloadto these props. - Page composition (which sections a page has, and where each card goes) stays in the platform and app templates.
Alternatives
- Product components as
platforms/marketorganisms: island stays domain-free, but the design system splits across two projects, away from the atoms and tokens it builds on. - i18next inside island: island would depend on the platform's locale files and i18n setup.
Consequences
- Island is Lumina's design system, not a product-neutral one.
- A new status needs a
StatusKeyand aSTATUS_STYLESentry in island, and its label in the platform's translations. - The platform builds each
labelsobject once per list, not once per card. - Debt:
StepProgressjoins itsaria-valuetextwith a hard-coded «،».