Giter Site home page Giter Site logo

design-system's Introduction

Design system

Proton Design system, for all Proton Projects: https://design-system.protontech.ch/

How to install it

First clone the project, then do a npm i.

Linting

We suggest to use the extension stylelint (stylelint.vscode-stylelint) to take avantage of our linter config.

Commands

CSS Reset used by Android app

If you need to refresh the CSS build, you can perform a npm run build:reset.

MISC

Where is the documentation?

Actually there is a static website, but it will be soon revamped. Stay tuned.

design-system's People

Contributors

dhoko avatar econdepe avatar epokk avatar jeremybenaim avatar mantvidasproton avatar matthiasmargot avatar mmso avatar nico3333fr avatar sergonius avatar swiip avatar twikito avatar vincaslt avatar yiin 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  avatar  avatar  avatar  avatar  avatar  avatar

design-system's Issues

Containers

Add basic containers:

  • alert
  • fieldset / legend

Top nav icons

Quick summary of bug

On resize icons are too small:
image

Change asset structure

Feature description

Image shared, images only for design system website, images only per project, etc.

Benefits (optional)

To facilitate dev of product :)

Prepare panels

Sometimes v4 display panels like that:
capture d ecran 2019-03-08 a 11 05 47

Give us the HTML / CSS to use.

Support cascade for helpers (ex: margin)

Feature description

margin: 0;
margin-left: 1rem

This is valid CSS, so the fw should allow the same behavior:

<div class="m0 ml1">popopo</div>

It should be ~= margin: 0 0 0 1rem

Use cases

reset a margin on an element and add a margin

Benefits (optional)

Same behavior as the cascade, we forget about the fw, it works.

Add design for Breadcrumb

Component

Add design for Breadcrumb component (fil d'ariane).

Design

capture d ecran 2019-03-04 a 16 37 31

Code

import React from 'react';
import PropTypes from 'prop-types';

const Breadcrumb = ({ list, current, onClick }) => {
    const handleClick = (index) => {
        if (onClick) {
            onClick(index);
        }
    };

    return (
        <div className="breadcrumb-container">
            {list.map((item, index) => {
                return <button
                    disabled={index === current}
                    onClick={handleClick(index)}
                    key={index.toString()}
                    className={`breadcrumb-item ${current === index ? 'breadcrumb-item--active' : ''}`}>{item}</button>;
            })}
        </div>
    );
};

Breadcrumb.propTypes = {
    onClick: PropTypes.func,
    list: PropTypes.array.isRequired,
    current: PropTypes.number.isRequired
};

Breadcrumb.defaultProps = {
    current: 0
};

export default Breadcrumb;

Note

  • The active step is disabled.
  • Other steps need to react on hover.
  • The component can be edited if needed for HTML / CSS reasons.

Password input

The password input has a button to toggle the type between text and password.
Capture d’écran 2019-04-09 à 17 56 12

Create SVG sprite dedicated to CSS use

Feature description

Example:

<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 50 50">
    <style>
        use         { display: none; }
        use:target  { display: block; }

        .white { fill: #fff; }
        .black  { fill: #000; }
    </style>
    <symbol id="symbol-blahblah">
        <path d="M22.6 25L.49 47.3a1.6 1.6 0 0 0 1.1 2.7c.43 0 .83-.17 1.12-.47L25 27.08l22.3 22.45a1.57 1.57 0 0 0 2.22 0 1.6 1.6 0 0 0 0-2.24L27.4 25.01 49.54 2.7a1.6 1.6 0 0 0 0-2.25c-.61-.61-1.6-.62-2.22 0L25 22.93 2.68.47a1.57 1.57 0 0 0-2.23 0 1.6 1.6 0 0 0 0 2.24L22.61 25z"/>
    </symbol>
    ...
    <use id="blahblah" xlink:href="#symbol-blahblah" class="black" />

And called via background: url("../img/sprite.svg#blahblah");

Use cases

input type search, select, special cases that can't use inline sprite.

Benefits

Avoid inlining too much base64 in CSS, CSS should be LIGHTWEIGHT!

Toggle style

Feature description

can you please try a version were you hide the check and x while loading and jsut show the spinner in the middle? (for loading state for toggle)

To test.

State "working" on toggle

Feature description

Because API call can take some time to execute. The user needs to have visual feedback that "something is happening, please be patient" (especially on bad connexions).

To test with aria-busy, other attribute, etc.

Add small modal

Just added a class to make the modal smaller when needed. Check with Keven for the width.

Better readme

It's the mess. :-\

Detail and notes for deploying/etc.

Change stroke width icons

Feature description

the stroke is often too thin, it would be great to be able to change it.

Use cases

screenshot from 2019-03-08 16-10-36

Benefits (optional)

More visible, better rendering

I tried a few things, I can't change the width 😢

Tooltip

Feature description

A tooltip class that can be used to style the tooltips

Use cases

For example when hovering a badge we show a tooltip:

screenshot 2019-03-06 at 18 05 29

Classes to increase tap zone

Feature description

  • Class to increase "tap zone": uses a pseudo-element to increase element

Use cases

For mobile/tables/etc.

Benefits (optional)

Because UX matters.

webkit-overflow-scrolling: touch

Feature description

-webkit-overflow-scrolling: touch; might be added to scroll-if-needed
or scroll-smooth-touch, whatever.

Use cases

for scrolling in app.

Use relative paths for images from CSS

Feature description

Use relative paths for images from CSS

Use cases

This will be easier for webpack build.
Might check if everything is okay for Design System website.

Make design system more RTL-friendly

Feature description

Being RTL-friendly makes the system more robust, and will save a LOT of time when we will need it.

Use cases

For languages like arabic, etc.

Benefits (optional)

The less we will have to do, the better it is.

Gradient in navigation

Feature description

This.
image

Benefits (optional)

Scrolling, display with zoom, saving innocent kittens, etc.

Overflow visible on Chrome

Quick summary of bug

Overflow visible on the body for Chrome

Actual Behavior

Overflow visible

Expected Behavior

We should not have the overflow

Steps to Reproduce the Problem

  1. Cf my export DM

Possible fixes

cf our discussion, fixed via .mod--hidden on the body

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.