GithubHelp home page GithubHelp logo

talend / design-system Goto Github PK

View Code? Open in Web Editor NEW
54.0 25.0 20.0 13.06 MB

Talend Design System

Home Page: https://design.talend.com

License: Apache License 2.0

JavaScript 23.78% HTML 1.25% TypeScript 67.89% SCSS 7.08%
design-system react reakit styled-components storybook cypress

design-system's Introduction

design-system's People

Contributors

akaseka avatar benrajalu avatar dependabot[bot] avatar github-actions[bot] avatar gjou-tlnd avatar hmassy avatar jmfrancois avatar jsomsanith avatar jsomsanith-tlnd avatar kporal avatar mhuet avatar ocamon avatar supernovaio[bot] avatar tlnd-mhuchet avatar vbocquet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

design-system's Issues

[RFC] Replace Styled Components

Status

In progress

Context

Styled Components are great for managing a design system with several themes or modes.
They have been chosen because we needed multi-themes support and including IE11 support. So CSS custom properties were not an option.
We've since dropped the support of IE11. We can challenge that choice.

Problems

They intertwine styles and components in a way that muddles the component's typings.
Its as property is too permissive for a design system, enabling users to break the intended patterns using any HTML element or React component.
There is no guarantee about the tokens you use (or not) in your styles.
You cannot quickly identify which DOM node will be generated because of the exported Styled Components.
You must precise the displayName for each component and their variations

What do we need

  • A styling solution that does not pollute the components' typing
  • A styling solution that handles theming (white-labeling as much as a possible dark theme)
  • A styling solution that easily exploits tokens and variables
  • We must be able consume variables that represent tokens

What would we like

  • Exportable themes-as-variables: our customers (the front-end engineers) mostly use CSS modules with Sass variables in their projects. When the design system doesn't provide everything they need, we should still give them variables accessing the theme.
  • Global stylesheets
  • Something simple and familiar to use
  • No need for displayName

Solutions

Try several options:

  • CSS Modules #267
  • Vanilla Extract #261
  • Other?

Fonts

Get the good fonts from Webpack build

Create a new package @talend/fonts to rely on

Use ThemeProvider on Talend/UI

Styled components need to instantiate a ThemeProvider to get theme colors

  • A possible solution is to use Layout and add this for once
  • Another one may be to declare a new CMF module

RFC: [data-test] attributes

Status

Validation

Context

Quality Assurance teams perform automated tests on Products for non-regression testing.

Problems

QA teams lean on HTML ID attributes or XPath to automate tests on UI, and updates on the shared library can break these scenarios.

Solutions

I suggest including [data-testid] in the components or layout markup.
1 — By documenting them, the first benefit will be to act on a contract with our QA team.
2 — By using them, after all, the second benefit will also be to perform component testing.

Consequences

We need to agree on a specific vocabulary to use for their values.

I suggest this pattern: <component_name>.<element_type>.<interactive_action>

Identifier Description
component_name Component identifier from our design language (ex: modal, search, password, inlineediting, etc.)
element_type Element or its type used (ex: button, link, input, textarea, etc.)
interactive_action Interactive action as an identifier (ex: cancel, edit, submit, etc.)

For example, for the button Edit used in the Ìnline editing

<Button data-testid="inlineediting.button.edit">Edit</Button>

Or for a search bar used as Filter in a list

<Search data-testid="filter.input" />

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.