Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decide whether to convert standard elements into custom components #603

Closed
oliverschuerch opened this issue Oct 18, 2022 · 3 comments
Closed
Assignees
Labels
📦 components Related to the @swisspost/design-system-components package

Comments

@oliverschuerch
Copy link
Contributor

There are some pros and cons, why we should build Custom-Components for standard HTML-Elements, such as button, etc.

Pros:

  • We can define a standard behaviour in the Custom-Component.
  • DEVs do not need to know every CSS-Class, internal HTML-Structures or whether attributes can be combined or not.
  • We can provide a more consistence User Experience between all the Components.
  • Styles are capsulated.
  • Some JS logic can be abstracted away.

Cons:

  • It can be hard to build a Custom-Component which reflects a standard HTML-Element.
    • There are a lot of specs to pay attention on to provide a correct Component (W3C, a11y, etc.).
    • We need to find a solution to provide some kind of Attribute heritation.
    • We need to find a solution to make events work correctly with this Components.
    • We need to find a solution to make ScreenReaders work correctly with this Components.
  • The added value for devs may be too low.
  • It is possible, that such Components are to static/not dynamic enough for our DEVs.
@oliverschuerch oliverschuerch added the 📦 components Related to the @swisspost/design-system-components package label Oct 18, 2022
@oliverschuerch oliverschuerch added this to the Next milestone Oct 18, 2022
@oliverschuerch oliverschuerch mentioned this issue Oct 18, 2022
13 tasks
@gfellerph gfellerph modified the milestones: Next, Web Components Nov 2, 2022
@gfellerph
Copy link
Member

gfellerph commented Feb 2, 2023

@oliverschuerch, I will provide some insights from the Successful Design Systems Course. This feels like a good candidate for an RFC just to document the descision.

@gfellerph gfellerph moved this from 📋 Backlog to 🔖 Ready in Design System Production Board Feb 2, 2023
@gfellerph gfellerph self-assigned this Mar 6, 2023
@gfellerph gfellerph moved this from 🔖 Ready to 🏗 In progress in Design System Production Board Mar 6, 2023
@gfellerph
Copy link
Member

gfellerph commented Mar 6, 2023

Started a discussion #1224

@gfellerph gfellerph moved this from 🏗 In progress to 👀 In review in Design System Production Board Mar 6, 2023
@gfellerph
Copy link
Member

According to discussion #1224, we strive for a solution where we have basic html + css components as well as web-components variants that share the same basic styles.

@gfellerph gfellerph moved this from 👀 In review to ✅ Done in Design System Production Board Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 components Related to the @swisspost/design-system-components package
Projects
Development

No branches or pull requests

2 participants