digdir / designsystemet

Designsystemet
https://designsystemet.no
MIT License
84 stars 38 forks source link

Simplify Figma components #2506

Open Febakke opened 2 months ago

Febakke commented 2 months ago

We have gotten feedback that users want to edit text in the component properties. For this to work without showing all settings for core components we need to swap typography components with text styles. This is a major breaking change, so we need to careful so that we dont overwrite all text used in apps.

We will keep typography components as they contain the correct use of color tokens.

Febakke commented 3 weeks ago

Cleaner settings

Keep overrides across component swapping

Case: I want to swap between form components and keep all my overrides. Solution: If we want to support this all elements needs to have the same names as overrides are mostly handled by naming.

Test: Image Kept: Label and description Not overridden: Input text and state (error message) Also testet radio/check. Overrides only handled for legend/description

Label and description: Works as is Text inside fields: Maybe we can support this if we give fields generic names Error-message: Should work as is radio/check labels and descriptions: If we want overrides to work across these components the "list" elements need to have the same name inside both components. I suggest we do this so users can swap between radio and check and keep labels and descriptions

Febakke commented 3 weeks ago

Radio and Checkbox suggestion

Figma test