1.2.13 • Published 1 year ago

seema v1.2.13

Weekly downloads
-
License
-
Repository
-
Last release
1 year ago

Generation Component Library

This component library is being developed for Generation for use in the employability portal.


Table of Contents


Setup

  1. Make sure to have your Github SSH key set up. Follow these instructions for setting up your SSH key.
  2. To clone this repository, change into your local directory and run
git clone git@github.com:digital-generation/seema.git
  1. To install dependencies, run:
npm i
  1. To test the components in isolation in the browser with Storybook, run
npm run storybook

Development

Development standards are as follows: 1. To begin with new code development, create a new branch off develop by running

git checkout develop
git checkout -b <branch-name>
  1. Name the branch according to the Jira ticket number: <type: feat/fix/bug/chore/etc>(<scope>): [<issue-number>] <description>
  2. To create a new component, run the following command in the terminal. This will create a new directory under components and create four files with the basic starting templates for the component, styles, tests, and stories:
npm run gc <ComponentName>
  1. Develop the component. Make small, regular commits with useful commit messages. Be sure to write unit tests in the *.spec.js file. Make sure the component is 100% covered by unit tests.
  2. Update documentation in Readme. Link the component to the component's directory in the Readme.
  3. Push the branch to Github and create a PR. Make sure to fill out all sections of the PR template. The PR should be set to merge develop. Make sure to tag appropriate reviewers in Github.
  4. PRs should not be merged unless at least one approval is given. Once merged, delete the branch.
  5. The develop branch will be merged to main once leadership has given approval.

Components


Icons

To update icons, add/remove svg files from src/assets/icons and run npm run build-icons For more details, see the Icons Readme.


Design Fundamentals

Colors, Grid, Icons, Spacing and Typography rules are defined here.

Contents

  1. Colors
  2. Grid
  3. Breakpoints
  4. Icons
  5. Typography

Colors

Brand

  • #006AEB Blue00: #006AEB
  • #303135 Gray00: #303135
  • #FFFFFF White: #FFFFFF

Neutrals

  • #737373 Gray01: #737373
  • #DDDDDD Gray02: #DDDDDD
  • #F3F3F3 Gray03: #F3F3F3
  • #FAFAFA Gray04: #FAFAFA

Feedback

  • #01836B Green00: #01836B
  • #E95400 Orange00: #E95400
  • #D91222 Red00: #D91222
  • #C40000 Red01: #C40000
  • #F2ABB1 Red02: #F2ABB1
  • #005CC4 Blue01: #005CC4
  • #004DA3 Blue02: #004DA3

Future Brand Color Exploratory

  • #6E5AED Color00: #6E5AED

Grid

Desktop 1440px

  • Margin: 96px
  • Column: 82px
  • Gutter: 24px

Tablet 1024px

  • Margin: 32px
  • Column: 58px
  • Gutter: 24px

Small Tablet 768px

  • Margin: 24px
  • Column: 69px
  • Gutter: 24px

Mobile 320px

  • Margin: 24px
  • Column: 50px
  • Gutter: 24px

Breakpoints

  • Mobile: 320px - 479px
  • Large Mobile: 480px - 767px
  • Tablet: 768px - 991px
  • Large Tablet: 992px - 1023px
  • Desktop: 1024px - 1272px

Icons

Sizes

  • Large: 24px x 24px
  • Medium: 20px x 20px (default)
  • Small: 16px x 16px

Typography

Azo Sans is the primary typeface

Fallback typefaces (in order):

  • Helvetica
  • Arial
  • Sans-serif

Font-weights:

  • 400 (regular)
  • 500 (medium)
  • 700 (bold)

Linting

Linting rules are set in the .prettierrc file. Commit hooks are set to run prettier on each commit. To run the linter without making a commit, run

npm run lint

Testing

This repository uses the jest testing library. We are aiming for as close to 100% coverage as possible. Test files should be placed in the same directory as the component. To test a specific component, run:

npm run test <relative-path-to-test-file>

To run all tests, run:

npm run test

To run all tests with a test coverage report, run:

npm run test -- --coverage .

To view the code coverage report in the browser, run

open coverage/lcov-report/index.html

Deployment

Before deploying Storybook, please ensure the correct badges are set for each Story. This ensures that the published Storybook communicates effectively the status of each story.

Badges are defined in .storybook/preview.js and the status of each badge is:

  • #db4437 development (default)
  • #f4b400 review
  • #0f9d58 approved

Inside the *.stories.js file for each component, either add a status parameter to the default export:

export default {
  title: 'Button',
  component: Button,
  tags: ['autodocs'],
  parameters: {
    status: 'development',
  },
};

... and/or apply a status to an individual Story:

export const PrimaryDark = {
  parameters: {
    backgrounds: { default: 'dark' },
    status: 'approved',
  },
  args: {
    child: label,
    onClick: () => {},
    theme: 'dark',
  },
};

Technology Used


Contributors

Generation Team

1.2.13

1 year ago

1.2.12

1 year ago

1.2.11

1 year ago

1.2.10

1 year ago

1.2.9

1 year ago

1.2.8

1 year ago

1.2.7

1 year ago

1.2.6

1 year ago

1.2.0

2 years ago

1.1.9

2 years ago

1.1.8

2 years ago

1.1.7

2 years ago

1.2.5

2 years ago

1.1.6

2 years ago

1.2.4

2 years ago

1.1.5

2 years ago

1.2.3

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago