Giter Site home page Giter Site logo

design-system's Introduction

Equinor Design System

The EDS is the official design system of Equinor and is to be used when designing, prototyping and developing internal digital interfaces. The EDS provides structure, guidance and tools that enable designers and developers to efficiently build consistent, inclusive and flexible solutions.

While the design system itself lives in Figma, this repository contains implementations of the EDS in code.

Quick links

Table of contents

Status

Package  Status Version
Core React Checks Version
Tokens Checks Version
Icons Checks Version

How to run

Would you like to contribute? Awesome! 👏

We use a fork and pull-request workflow, so start with forking the repository on Github, then either open it in Gitpod or clone your fork locally.
Checkout Github docs on how to work with forks

Use Gitpod and develop in the browser

Just prepend the url to your fork with https://gitpod.io/#, so for example https://gitpod.io/#https://github.com/yourusername/design-system. Dependencies will be installed automatically, then tests and linting will run, and finally the storybook will open in it’s own preview window ready to start coding.

Clone and develop locally

$ git clone [email protected]:your-github-username/design-system

We use pnpm as the package manager, because it’s fast, space efficient, and has some very useful commands when working with a monorepo – so you should start off by installing it globally.

$ npm install -g pnpm

Currently the project only runs on up to Node.js v16.15

Install dependencies & build using our init script:

$ cd design-system
$ pnpm run init

Work with the React components

We use storybook as a development environment.

Start storybook on localhost:9000 by running the following command from root:

$ pnpm run storybook

Run tests once or by watching

$ pnpm run test:core-react 
$ pnpm run test:watch:core-react 

Figma

The EDS in Figma is the single source of truth. You can apply for access to Figma in AccessIT. The EDS Core team has workshops and demos on using Figma from time to time, these are announced in Slack and Teams (see «Get in touch»)

Storefront

The storefront is the official documentation for the EDS.

React

This is the main implementation of the EDS, and will eventually contain accessible React components of each and every EDS component in Figma.

Installation

npm install @equinor/eds-core-react styled-components

If you use Typescript, make sure you have typescript >= 3.8 as a devDependency:

npm install typescript --save-dev

Usage

import { Button } from '@equinor/eds-core-react'

<Button variant="outlined" color="secondary">
  Click me!
</Button>

See our storybook for more examples.

Icons

Built on a copy of the Outlined Material Design icons, the icons have been customised and renamed for Equinor’s use and supplemented with our own icons for Equinor specific domains.

All the icons are available in our Storybook, and can also be installed from NPM.

The following example uses the <Icon> component from @equinor/eds-core-react – but the icons package can also be used without React.

Installation

npm install @equinor/eds-icons @equinor/eds-core-react

If you use Typescript, make sure you have typescript >= 3.8 as a devDependency:

npm install typescript --save-dev

Usage

import { Icon } from '@equinor/eds-core-react'
import { info_circle } from '@equinor/eds-icons'

<Icon data={info_circle} size={24} />

Tokens

Design tokens are design decisions from Figma extracted into code, and form the basis for the EDS Core React library. For projects that don’t use React, the tokens are available as an independent NPM package that can be used to build your own implementation of the EDS in your technology of choice. The following example uses vanilla javascript.

Installation

npm install @equinor/eds-tokens

If you use Typescript, make sure you have typescript >= 3.8 as a devDependency:

npm install typescript --save-dev

Usage

import { tokens } from '@equinor/eds-tokens'

const {
  typography: {
    heading: { h1 },
  },
} = tokens

const header = document.createElement('h1')

Object.keys(h1).forEach((token) => {
  header.style[token] = h1[token]
})

header.textContent = 'Some header'

document.body.appendChild(header)

Fonts

The Equinor typeface is available from the EDS CDN.

Usage

All the fonts

<link rel="stylesheet" href="https://cdn.eds.equinor.com/font/equinor-font.css" />

Individual fonts

<link rel="stylesheet" href="https://cdn.eds.equinor.com/font/equinor-regular.css" />

We currently don’t support the font-display property, so if that’s something you need then please let us know.

Logo

When it comes to the Equinor logo, we have two versions – primary and horizontal – and you pick the colour with a fragment identifier in the url. The following example uses the primary logo in red, other colour options are white and black – with black being the default if you omit the fragment identifier.

Usage

<img src="https://cdn.eds.equinor.com/logo/equinor-logo-primary.svg#red" alt="Equinor" />

Browser support

We support the most up to date version of evergreen browsers (browsers that auto-update), which means Chrome, Safari, Firefox and (Chromium) Edge.

Contributions

Contributions are welcome and encouraged! File bug reports and feature requests in Github issues, and get in touch with us if you want to help us out with implementing the components or have ideas for components we should include in the EDS.

Get in touch

We use #eds-design-system on Slack as our main communication channel – but we have an internal team on Teams as well that you can join if you want to get in touch with us. If you’re outside Equinor and want to get in touch with the team, then please create an issue.

design-system's People

Contributors

beckybrekke avatar benkeq avatar benteljones avatar bjartebore avatar bovan avatar cbuv avatar denektenina avatar dependabot[bot] avatar fernandolucchesi avatar fredrikmwold avatar hjaf avatar jaakson avatar joelmheim avatar khollund avatar laliq avatar magnh avatar maiaht avatar martalalik avatar mhwaage avatar mimarz avatar nilsml avatar oddvernes avatar pomfrida avatar shikhamishra9 avatar snyk-bot avatar svsven avatar torleifhalseth avatar vnys avatar wenche avatar yusijs 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  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

design-system's Issues

Training material: As a user I want to see real life examples based on EDS

As a Product Owner I would like to know the prosess for how others can contribute to creating React Components (for Desktop)

As a user I want guidelines for how to use EDS in Power BI

Create guidelines for users on how to use EDS practices in Power BI.
Decided not to have guidelines specifically for PowerBi but for data viz and dashboards in general.

  • Review what Lotte already has for Fusion and decide how much more is needed
  • Decide where to have this in Storefront
  • Create pages and write content
  • Share

As a user I want an EDS theme file for Power BI so I can easily implement EDS design components

Create a Power BI theming file (json) file that contains EDS components

  • Decide which components to add to json file (colors only, other things?)
  • Create json file and test
  • Decide where to store files
  • Test using Equinor font
  • Communicate with Power BI users (replace existing color json already in use? or in addition?)
  • Share data viz guidelines at the same time
    https://eds.equinor.com/patterns/data-visualisation/

Aug 3 - ready to share a first draft with super users and those that have showed interest to get feedback.
https://app.powerbi.com/groups/me/apps/2fc55c86-4da0-46d9-b0c3-5ad31c3aee82/reports/842ab784-828a-4e3a-b918-d3179a27a72e/ReportSection6733e16b600c25762a61?ctid=3aa4a235-b6e2-48d5-9195-7fcf05b459b0

TEXT FIELDS: As a designer I need to review the suggestions from Figma/documentation QA

  • Review suggestions/comments
  • Decide if adjustments should be made
  • Update documentation/Figma accordingly
  • Perform documentation QA
    Comments from Ørjan Blytt Polden:
  • The Text Fields/Input component has a total height of 78px, seemingly across all versions of it? Is this supposed to be the case, seeing as how it breaks with the 8px grid?
  • Are there any set guidelines for the preferred gap between multiple input elements, or is this intended to be a bit at the designer's behest?
  • Guidance on the use of icons for text fields could be clearer.
    Partly by making the language more direct (e.g. use icons to convey input methods).
    And partly by stating if there are any icons that are preferable over others. Though, this is technically already covered by the fact that each icon does have its specific intended use.
  • Are there any specifications as to whether labels should be written with just a single uppercase first letter, or if there should be several uppercase letters in a label?
    If there are, maybe it would be an idea to reference this under Label for the Text Fields documentation?

As a Figma admin I need to write and share guideline for usage of Figma

See what has been written already and what is missing. Here is input from the other board:
Added some questions that I got from persons using Figma. Think it will be good to include the answers in this user story.
Team admin responsibilities - single point of contact, true-up, deleting default project folder 'design system' , close vs open teams. Need to see pages: storefront, getting started, designers, figma
Including answers to these questions:

  1. Do I need to make my own Figma User ?
  2. Should I make my project open for all persons in Equinor ?
  3. How can I share a prototype with others inside Equinor (but not outside the organization) ?
  4. Do I need to pay for the licence is if I have a read only role ?
  5. How can I make sure only a define set of people have access to the prototype?

DIVIDER: As a designer I need to review the suggestions from Figma/documentation QA

  • Review suggestions/comments
  • Decide if adjustments should be made
  • Update documentation/Figma accordingly
  • Perform documentation QA
    Comments from Ørjan Blytt Polden
  • The documentation for the Card component declares that dividers cannot bleed the edges of the card, while the documentation for the Divider component itself says that it can be used full-bleed.
  • Does this then also mean the divider can bleed the edges on components that aren't cards -- such as when the content is situated in a white content block against a grey background?

Remove duplicates & numerical names in assets/system-icons

Icons have duplicate and numerical names which are a hard to work with in javascript and bad design when it comes to code conventions.

Duplicates identified so far are:

  • movie
  • block

Numerical identified so far are:

  • 360
  • 3d_rotation
  • 4k_outlined
  • 4k_filled

Assets page in storefront

Simple page that lists all the assets in EDS

  • System Icon page
  • Click to download as svg file

Updated

  • Fix malformed svg icons after running through svgo optimize

Some epic

  • Some sub task
  • Some sub task
  • Some sub task
  • Some sub task

As a user I need guidelines in the on language choice and consistency

Fonda: I think that this section, the glossary tab, could actually just easily merge into the Patterns sections. And that with time, when there are too many or there is a need to highlight 'terms' that we pull it out to be it's own page. I worry now that there are just sooo many pages to take it.
Fonda: I have been and am getting lots of questions about it we will have a 'Language Consistency' page. Not like the page we talk about for writing documentation - but something more like "We always use the term 'Save' or such" like this page: https://www.carbondesignsystem.com/guidelines/content/glossary
Might not be something that we get out in the first MVP, but I think it is a good idea and something we can make a page for and add notes to as we think/come across things.
Common actions - words/verbs that match icons
Examples for overview tab:

  • Voice + Tone
    Capitalisation
    Verb tense
  • Data formats
    Date formats
    Date range
    Number formats
  • Liquid volumes
    Gross and net volume
    Volume units
    Operational, capacity and accounting units
    Changes in density
  • Types of measurement
    ***** All standard, unless project has own domain standard.
  • Decide if this page should go under patterns or under Guidelines > content page - glossary and overview tabs
  • Write the content
  • QA documentation

As a user I want to read info related to charts on the storefront

add navigation

  • Implement tabs
  • Add currentCategory
  • Add placeholder pages
  • Add navigation in yaml-format
  • Decide how we should redirect

CHIPS: As a designer I need to review the suggestions from Figma/documentation QA

  • Review suggestions/comments
  • Decide if adjustments should be made
  • Update documentation/Figma accordingly
  • Perform documentation QA
    Comments from Ørjan Blytt Polden:
  • Under Variations, the text may be more easily skimmable if the text denoting what chip types are valid for what purposes, are listed up after the main body describing how that particular variation should be used.

CARD: As a designer I need to review the suggestions from Figma/documentation QA

  • Review suggestions/comments
  • Decide if adjustments should be made
  • Update documentation/Figma accordingly
  • Perform documentation QA
    Comments from : Ørjan Blytt Polden
  • One thing I am missing a little bit, is a clearer indicator what to do if there's a want to have some kind of heading for the card. An options menu in the corner, with options concerning the card itself rather than the contents of the card, for instance.
  • The text for the card details that the dividers for the cards cannot bleed the page edges. There doesn't appear to be any indication, however, whether that is the case for other components.
  • For example, there's no clear indication as to whether an image used in a card is allowed to bleed, whether it must have a clear heading above but is allowed to bleed on the edges, and so forth.
  • As a result of the Paragraph/Body Short text component being 20pt tall, all the card Title components that use this text component are 84pt tall. That's 4pt short of the nearest vertical grid, at 88pt. Is that intentional?

Create Navigation: Tabs component

Description

See how Material UI and Reach UI have implemented their components. Reach UI has an interesting approach where the consumer can choose between controlling the component from the outside, or letting the component handle it's own internal state. Should we offer something similar?

Use the base tokens to build the component, see which tokens are used in Figma.

Documentation

Sub tasks

  • Write tests
  • Create set of tokens (from base tokens)
  • Create react component

This component is used in the storefront (see #106)

Fix figma embeds in storefront

Research show that SSO broke figma embeds as they are contradicting approaches with embeds being public and SSO limiting things to organization only.

We will then replace the embeds with static images of components from Figma using the Figma API. This will not be as good as embeds but hopefully better than nothing.

  • Figma image export in Figma-broker
  • Storefront React component for Figma image preview
  • Review embed links to see if they fit as "image previews"

As a user a need to see info in the storefront regarding known issues and change log

Under release information, there is a page for changelog and known issues. (PRI 2)

ACCORDIAN: As a designer I need to review the suggestions from Figma/documentation QA

  • Review suggestions/comments
  • Decide if adjustments should be made
  • Update documentation/Figma accordingly
  • Perform documentation QA
    Comments from Ørjan Blytt Polden
    The text given under Header Area can be clarified further, I think. Specifically by having one sentence first talking about interacting with the header area itself, and then another sentence after talking about having additional actions within the header area that must be interacted with directly.

refactor menu

Use details/summary instead of checkbox + ul for more semantic html

GRID: As a designer I need to review the suggestions from Figma/documentation QA

  • Review suggestions/comments
  • Decide if adjustments should be made
  • Update documentation/Figma accordingly
  • Perform documentation QA
    Input from Ørjan Blytt Polden:
  • The Grid/Small layout appears to be using a 12-column layout. Is this intentional? Not entirely sure if 12 columns would be necessary on a 600dp display.
  • I'm also missing an X-Small grid, for working with designs all the way down at 320dp. This is entirely my own opinion, as I'd normally be using a 4-column layout at that size.
  • As a lead-in into the guidelines, it is stated that it is the designer's responsibility to define a maximum width and choose the correct grid.
  • Should it be stated more clearly that this is because the grid styles are all fluid?
  • It feels as though the introducing guidelines are missing a clear overview of what grids are present and what screen sizes they are intended for. This is instead listed under Grid Columns, which itself does not actually list the grid columns.
  • The point on Grid Influencers feels unclear. Would consider rewording to give more direct instructions to the reader.
  • The documentation for Usage of the Grid component start off with instructions for adding a frame to the current page (Step 1.), but go from there directly to the settings for that panel.
  • Perhaps Step 1 could be changed to assume the user already has a frame placed, with a sub-point stating that different frames can be found by pressing A or F?

As a user I want to view the icons in the storefront

For product and system icons.

  • Product icons>Library - Build icon viewer: The page should have its own search within in the page, and be organised by the groupings from Figma.
  • System icons>Library - Build icon viewer: The page should have its own search within in the page, and be organised by the groupings from Figma.
  • Documentation QA on product icons library page
  • Documentation QA on System icons library page

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.