All Projects → dcos-labs → ui-kit

dcos-labs / ui-kit

Licence: Apache-2.0 license
D2iQ UI Kit

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to ui-kit

Hacktoberfest
Everyone is free to contribute. Not eligible for Hacktoberfest
Stars: ✭ 36 (+24.14%)
Mutual labels:  hacktoberfest-accepted, hacktoberfest2022
Aec-Library-Website
This is an Open-Source Library Website in which you get Resources to learn different topics, Donate book section to donate your old books, and a Book issue section to keep a record of all the books issued. -HacktoberFest Accepted
Stars: ✭ 52 (+79.31%)
Mutual labels:  hacktoberfest-accepted, hacktoberfest2022
galgotias icloud feedback bot
No description or website provided.
Stars: ✭ 21 (-27.59%)
Mutual labels:  hacktoberfest-accepted, hacktoberfest2022
jahir.dev
My personal website 💎 – Built using Next.js, TypeScript, MDX, contentlayer, Notion and Stitches styled components
Stars: ✭ 119 (+310.34%)
Mutual labels:  hacktoberfest-accepted, hacktoberfest2022
react-uswds
USWDS 3.0 components built in React
Stars: ✭ 108 (+272.41%)
Mutual labels:  storybook, design-system
Dseized-Bot
This repository contains all of the code required NOTE you may need to download other dependencies which will be mentioned below. This bot has many features such as playing songs in multiple servers and making a queue for songs.
Stars: ✭ 20 (-31.03%)
Mutual labels:  hacktoberfest-accepted, hacktoberfest2022
Hacktoberfest2021
Make your first Pull Request on Hacktoberfest 2022. Don't forget to spread love and if you like give us a ⭐️
Stars: ✭ 1,320 (+4451.72%)
Mutual labels:  hacktoberfest-accepted, hacktoberfest2022
Componentdriven.org
Static site and content for Component Driven
Stars: ✭ 237 (+717.24%)
Mutual labels:  storybook, design-system
HacktoberFest2021
Make your first PR! ~ A beginner-friendly repository made specifically for open source beginners. Add your profile, a blog, or any program under any language or update the existing one. Just make sure to add the file under the correct directory. Happy hacking!
Stars: ✭ 9 (-68.97%)
Mutual labels:  hacktoberfest-accepted, hacktoberfest2022
shared-react-components-example
An example of a mono-repository of shared React components libraries!
Stars: ✭ 85 (+193.1%)
Mutual labels:  storybook, design-system
CodeForces-Solutions
Solutions to CodeForces ProblemSets
Stars: ✭ 47 (+62.07%)
Mutual labels:  hacktoberfest-accepted, hacktoberfest2022
SlugTerra
Hactoberfest 2020-2022 Project
Stars: ✭ 35 (+20.69%)
Mutual labels:  hacktoberfest-accepted, hacktoberfest2022
Quizzon
Quizzon: Create and play quizzes free
Stars: ✭ 48 (+65.52%)
Mutual labels:  hacktoberfest-accepted, hacktoberfest2022
react-learning-resources
A curated list of resources to learn React and related web technologies as fast as possible.
Stars: ✭ 65 (+124.14%)
Mutual labels:  storybook, react-testing-library
Learnstorybook Code
Code for Learn Storybook
Stars: ✭ 249 (+758.62%)
Mutual labels:  storybook, design-system
nextjs-with-chakra-ui-boilerplate
Next.js with Chakra UI boilerplate. PWA ready with storybook and tests configured.
Stars: ✭ 48 (+65.52%)
Mutual labels:  storybook, react-testing-library
Learnstorybook.com
Static site and content for Storybook tutorials
Stars: ✭ 2,291 (+7800%)
Mutual labels:  storybook, design-system
Awesome Design Systems
A curated list of bookmarks, resources and articles about design systems focused on developers.
Stars: ✭ 222 (+665.52%)
Mutual labels:  storybook, design-system
Hacktoberfest-2021
Participate in Hacktoberfest by contributing to any Open Source project on GitHub! Here is a starter project for first time contributors. #hacktoberfest
Stars: ✭ 1 (-96.55%)
Mutual labels:  hacktoberfest-accepted, hacktoberfest2022
wongames
🎮 Ecommerce de jogos no estilo Steam. Desenvolvido com Next.js, TypeScript, GraphQL, etc.
Stars: ✭ 18 (-37.93%)
Mutual labels:  storybook, react-testing-library

UI Kit Space Banner

D2iQ UI Kit

UI Kit is a collaboration between D2iQ's product design team and engineering team. UI Kit provides tools for engineers to build applications that follow the standards and guidelines of the Design System.

Getting started

Install dependencies (Node v16+, NPM 7+)

npm i

Start the Storybook server locally then visit http://localhost:6006/

npm start

Linting

ESLint is used for linting within the project. We suggest installing the ESLint extension in your preferred code editor.

For more detailed information, see CONTRIBUTING.md.

New Components

To generate a new component run the command:

npm run create:component <ComponentName>

Unit Testing

npm test

Use test:watch if you want the tests to run automatically when a file changes:

npm run test:watch

Pass parameters to the test engine (in this case jest) to run a single spec, for example, badge:

npm run test -- --watch badge

Writing Unit Tests

Important guidelines to follow for testing:

  • Single Expectation test. Every unit test should verify one behavior.
  • Keep your descriptions concise (bellow 40 chars ideally). One easy way to achieve this one is avoiding using "should".
  • Create the data you need. If you have a more complicated scenario, generate the data that is relevant to that particular case.

For more on this topic, and examples we recommend Better Specs.

import React from "react";
import { render } from "@testing-library/react";
import { BadgeButton } from "../";

describe('Badge', () => {
  it("match default badge button component", () => {
   const { asFragment } = render(
      <BadgeButton onClick={fn} appearance="success">
        success
      </BadgeButton>
    );
    expect(asFragment()).toMatchSnapshot();
  });
});

The function asFragment is preferred over create from react-test-renderer as it seems to give more robust components and less failures.

baseElement can also be useful for testing if you are dealing with testing something that renders out side of the container, such as a component that uses a portal like a DropdownMenu or Modal.

Testing with Cypress

To make it easier to select DOM nodes of our components in integration tests, DOM nodes have a data-cy attribute.

Naming Conventions for data-cy Values

Parent nodes: The value of data-cy for component's parent node is the same as the component name, and should be camelCased. For example: The parent node for <PrimaryButton> will have data-cy="primaryButton".

Child nodes: If a child node has a data-cy added, there will be a dash between the parent node's name and a string to describe the child node. For example: The footer element of a <DialogModal> will have data-cy="fullscreenModal-footer"

States and variants: If a node has a special "state", data-cy will prepend a string describing that state after a dot. For example:

  • <TextInput disabled> will have data-cy="textInput textInput.disabled"
  • A <TextInput> with an error will have data-cy="textInput textInput.error"

For more information on writing selectors, see the Cypress guide.

Commits

We follow Conventional Commit formatting rules, as they provide a framework to write explicit messages that are easy to comprehend when looking through the project history and enable automatic change log generation.

These Guidelines got written based on AngularJS Git Commit Message Conventions.

<type>[optional scope]: <description>

[optional body]

[optional footer]

Release / Publishing

After your PR is merged into main, semantic-release will automatically cut a release if one of your commits is of type feat, fix, or perf.

Pre-release Testing in a Host Project

Build

The first step for downstream pre-release testing requires updating the dist directory with the changes.

From ui-kit, run:

npm run dist

Link

Use npm-link to create a symlink.

Run the following in the host project:

npm link @d2iq/ui-kit

After running the command above, restart the host application.

Note: Do not run npm install again or you will override changes.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].