GithubHelp home page GithubHelp logo

autodesk / hig Goto Github PK

View Code? Open in Web Editor NEW
175.0 14.0 114.0 62.92 MB

Autodesk's unified design system

Home Page: https://storybook.weave.autodesk.com

License: Apache License 2.0

HTML 0.36% JavaScript 99.13% CSS 0.33% Shell 0.15% Dockerfile 0.01% MDX 0.03%

hig's Introduction

Weave

Greenkeeper badge

Weave is Autodesk's unified design system, so we can build better products faster.

Getting started

Add a component to your app:

yarn add @weave-design/button

Import and render the component:

import Button from '@weave-design/button';

function MyComponent() {
  return <Button title="Hello, world!" />
}

Theme data and theming components

Theme data is a representation of the Weave visual design language in the form of data. With @weave-design/theme-data, we publish the data in ECMAScript module, JSON, and SCSS formats. This data includes 8 themes that can be used on any platform. There are four color schemes including...

  • Light gray
  • Dark gray
  • Dark blue

...with two densities–high and low–for each scheme. See how to provide a theme to components.

React components

Basics

Components

Each Weave pattern is implemented as a set of React components. Each pattern is published to NPM individually under the @weave-design namespace.

  • <Accordion> - Make content-heavy pages appear less so by vertically stacking items in lists that users can expand or contract
  • <Avatar> - A visual representation of a customer's identity
  • <AvatarBundle> - Indicate a group of people who are associated with a task or information.
  • <Badge> - Visual indicators that communicate status and draw attention to an object.
  • <Banner> - An alert that requires a user action
  • <Button> - Trigger actions or changes
  • <Checkbox> - A control to select from non-exclusive options
  • <Divider> - Separate content inline or in a stack.
  • <Dropdown> - A menu to select one or many from a list
  • <Flyout> - A lightweight popup container
  • <Icons> - Represents a concept in graphical form
  • <IconButton> - Action buttons that include an icon only
  • <Label> - A caption for an item in a user interface
  • <Menu> - Display a list of choices through interaction with a button, icon or other controls
  • <Modal> - An overlay that focuses the customer's attention
  • <NotificationsFlyout> - A less intrusive way of announcing an event of potential interest to the user
  • <NotificationsToast> - Floating message boxes that appear
  • <NumericInput> - For numerical values that allows freehand text entries or toggling values up and down
  • <ProgressBar> - An indication of content loading, presented horizontally
  • <ProgressRing> - An indication of content loading, presented circularly
  • <RadioButton> - A control to select one exclusively from a list
  • <RichText> - Applies the HIG typography styles to whatever is passed to it
  • <SkeletonItem> - A placeholder for loading content
  • <Slider> - A control for selecting a single numeric value from a range
  • <Spacer> - A square of empty space, meant to add space between other components
  • <Surface> - A themable container with the appropriate background color for the current theme
  • <Table> - A collection of data in rows and columns
  • <Tabs> - Keeps related content in a single container
  • <Tag> - Compact elements that can be used to represent small blocks of information
  • <TextArea> - A control to provide a large amount of freeform text
  • <TextLink> - Directs visitors to another location
  • <Thumbnail> - Visual anchors and identifiers for objects
  • <Tile> - A themable container that display information related to a single subject or destination
  • <Timestamp> - Presents a date with humanized phrasing
  • <Toggle> - A control for a single action with a clear on/off or start/stop.
  • <Tooltip> - Provides context in a small popup container
  • <TreeView> - A way to view and manipulate a list of data
  • <Typography> - A set of components in many typographical variations

Contributing

Read our contribution guidelines here: CONTRIBUTING.md

hig's People

Contributors

albertc5 avatar aneyzberg avatar arirusso avatar bryan-young avatar camwest avatar daniellida avatar dependabot[bot] avatar devfoncy avatar dylankenneally avatar eskfung avatar garyps avatar greenkeeper[bot] avatar halfghaninne avatar hig-bot avatar jdai578 avatar kittimiyo avatar matthewpbryant avatar morrisallison avatar nfiniteset avatar r888888888 avatar raebot avatar recyclerobot avatar rroxas avatar scmm17 avatar shannonwells avatar staceyshk avatar supersherm5 avatar t-cordf avatar t-rodrjua avatar wmui51 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

hig's Issues

Add unit testing

Add automated unit tests for HIG.web components.
Consider using jester snapshot approach used in Orion.

rename "Avatar" to "Profile"

After discussions with the content team, they strongly urged us to use the term "profile" instead of "avatar" for the top right area in the global nav, so please change the term "avatar" to "profile" to be more in line with the content guidelines of the HIG

Form elements (basics) – TextField

text-field

                "TextField": {
                    "methods": {
                        "setInstructions": {
                            "desc": "sets the instructions",
                            "params": [
                                "{String} instructions for our text field"
                            ]
                        },
                        "setLabel": {
                            "desc": "sets the label",
                            "params": [
                                "{String} label for our text field"
                            ]
                        },
                        "setName": {
                            "desc": "sets the name of the field as submitted with a form",
                            "params": [
                                "{String} label used to identify the field when submitted"
                            ]
                        },
                        "setPlaceholder": {
                            "desc": "sets the placeholder",
                            "params": [
                                "{String} placeholder for our text field"
                            ]
                        },
                        "setValue": {
                            "desc": "sets the value",
                            "params": [
                                "{String} value for our text field"
                            ]
                        },
                        "required": {
                            "desc": "makes field required",
                            "params": [
                                "{String} required label text"
                            ]
                        },
                        "noLongerRequired": {
                            "desc": "makes field not required"
                        },
                        "disable": {
                            "desc": "Disable the text field, preventing user interaction"
                        },
                        "enable": {
                            "desc": "Enable the text field, reenabling user interaction"
                        },
                        "onBlur": {
                            "desc": "Calls the provided callback when user puts blur on the input field",
                            "params": "HIG.abstract.EventObject.params",
                            "returns": "HIG.abstract.EventObject.returns"
                        },
                        "onChange": {
                            "desc": "Calls the provided callback when user changes the value of the text field then moves focus elsewhere",
                            "params": "HIG.abstract.EventObject.params",
                            "returns": "HIG.abstract.EventObject.returns"
                        },
                        "onFocus": {
                            "desc": "Calls the provided callback when user puts focus on the input field",
                            "params": "HIG.abstract.EventObject.params",
                            "returns": "HIG.abstract.EventObject.returns"
                        },
                        "onInput": {
                            "desc": "Calls the provided callback when user changes the value of the text field",
                            "params": "HIG.abstract.EventObject.params",
                            "returns": "HIG.abstract.EventObject.returns"
                        }
                    },
                    "defaults":{
                        "label": "{String} label for our text field",
                        "name": "{String} name identifier for our text field",
                        "placeholder": "{String} placeholder text for our text field",
                        "value": "{String} (optional) input value for text field",
                        "instructions": "{String} (optional) instructions under the text field",
                        "required": "{Boolean} (optional) is the field required or not",
                        "requiredLabel": "{String} (optional) required text"
                    }
                }

design: https://wiki.autodesk.com/display/HIG/Form+Elements

initial work on features/formelements branch

Todo:

  • Style
  • Enable configuring with defaults
  • Enable configuring with setters
  • Add test/playground page
  • Add Gemini test

Create Advanced Fly Out

Example Flyout: https://wiki.autodesk.com/display/HIG/Profile+Flyout

Create basics flyout, a generic re-usable basic element that has an arrow that attaches itself to a specific location with the arrow

takes a max-height and max-width as input and a top/left/right/bottom arrow location, investigate if automatic placement of flyout on the page is doable with pure CSS (and JS), not breaking the stateless JS goal

To do

  • Define interface and update interface.json
  • Implement interface
  • Style it
  • Unit tests
  • Visual regression test

remove normalize.css dependency

remove global normalize.css, all normalization should be done in the component itself, we cannot rely on global overrides as we need to try to make everything encapsulated

Add visual regression testing

As the system
when an unintended visual change is made
I can fail the build
so hig.web developers don't make unintentional visual changes


Crib Gemini test setup from orion.


Todo

  • Write a Gemini test
  • Enable running Gemini tests from an npm script
  • Add instructions to the readme

Enumerate Icon API

I'd like an API for enumerating icons so that I can build better property validation.

Example of what I'd like to do:

// assuming Item is a react component:

Item.propTypes = {
  icon: PropTypes.oneOf(['icon1', 'icon2'])
}

<Item icon="random-icon" />

// Will log an error to the console because random-icon is not icon1 or icon2. 

Possible solution: Expose Icons in public API

import { Icons } from 'hig.web';

Object.keys(Icons);

This would let me do the following: PropTypes.oneOf(Object.keys(Icons)

@recyclerobot thoughts?

IE11 compatibility

JS:
refactor current code rather than using a polyfill, for example, we use 1 Object.assign, refactoring this instance is more light weight than using a full polyfill for everything

CSS:
look into unsupported properties and weird behaviours on IE11

Tip:
use VM to test IE11, using virtualbox and modern.ie it's easy and free

Form elements (basics) – Text area

see design: https://wiki.autodesk.com/display/HIG/Form+Elements

"TextArea": {
  "methods": {
    "setLabel": {
      "desc": "sets the label",
      "params": [
        "{String} label - label for the text area"
      ]
    },
    "setInstructions": {
      "desc": "sets the instruction text",
      "params": [
        "{String} instructions - instructions for the text area"
      ]
    },
    "setPlaceholder": {
      "desc": "sets the placeholder",
      "params": [
        "{String} placeholder - text that appears in the text area when empty"
      ]
    },
    "setValue": {
      "desc": "sets the value",
      "params": [
        "{String} value - the text inside of the text area"
      ]
    },
    "onBlur": {
      "desc": "Calls the provided callback when focus leaves the text area",
      "params": "HIG.abstract.EventObject.params",
      "returns": "HIG.abstract.EventObject.returns"
    },
    "onChange": {
      "desc": "Calls the provided callback when the user enters text into the text area",
      "params": "HIG.abstract.EventObject.params",
      "returns": "HIG.abstract.EventObject.returns"
    },
    "onFocus": {
      "desc": "Calls the provided callback when focus enters the text area",
      "params": "HIG.abstract.EventObject.params",
      "returns": "HIG.abstract.EventObject.returns"
    }
  },
  "defaults": {
    "label": "{String} label for the text area",
    "instructions": "{String} instructions for the text area",
    "placeholder": "{String} text that appears in the text area when empty",
    "value": "{String} the text inside of the text area"
  }
}

Todo

  • Add to interface.json
  • Style
  • Enable configuring with defaults
  • Enable configuring with setters
  • Add test file
  • Add Gemini test

Run tests on branches and master

As the system
When a developer pushes to a branch or merges to master
I can run the tests
so developers know if they've broken the build.

Development server

As a developer
I want my changes compiled and served
so I can see what I'm working on during development


Add a web server to the development watch command in web pack.

  • Have it run as a part of npm run watch
  • Disable caching

Add better "description" field to events

Right now all events have the same description "listen to events" which doesn't give a clue as to when the event is triggered.

It would be nice to have a content specific description.

Example:

Item.onClick - triggered when the item is clicked on
Item.onHover - triggered when the item is hovered over.

It seems silly for onClick and onHover but as the events become more abstract this will be important.

Deploy builds

As the system
I can deploy a successful build
so developers and stakeholders can see the progress we make


Developer notes

Use GitHub pages

Add Profile to GlobalNav

As a developer
I can add an avatar to the GlobalNav
so my user knows which account is signed in

screen shot 2017-05-18 at 1 30 13 pm

Sketch file

To do

  • Define interface and update interface.json
  • Implement interface
  • Style it
  • Unit tests
  • Visual regression test

Buttons

design: https://wiki.autodesk.com/display/HIG/Buttons

Interface:
Button

  • Size
    • Small
    • Regular (default)
    • Large
  • Icon (optional)
  • Type
    • Primary (default)
    • Secondary
    • Flat

Icon Button

  • Size
    • Small
    • Regular (default)
    • Large

Split Button

Segmented

TODO:

  • Add icon support
  • Add flat button
  • Disabled buttons dispatch no events
  • create classes and write sass implementation
  • create test HTML file which lists all the different button combinations

write docs for gemini testing

add a section to the README.md file about how to setup and run the test framework + guidelines on how to write a test

exclude nohup.out from diff circle build

a nohup.out file is created by circle ci and is failing the diff test

Differing files:
---------------------------------

M dist/hig.css
M dist/hig.js
M index.html
?? nohup.out
---------------------------------

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.