1.3.5 • Published 1 day ago

atomicform-component-library v1.3.5

Weekly downloads
-
License
ISC
Repository
github
Last release
1 day ago

Atomic Form Components Library

This project holds the components and theming for use across Atomic Form's web properties.

It contains

A Storybook for the review and documentation of components.

An NPM module for importing components into Atomic Form's web properties

Using these components in another codebase

Install the library bun install atomicform-component-library or if you aren't using bun npm install atomicform-component-library

Install Tailwind in your Project

set your tailwind.config.js to match the below Make sure to update the content array to include the files and paths you will be using the styled components in

/** @type {import('tailwindcss').Config} */
// tailwind.config.js
import tailwindConfig from 'atomicform-component-library/tailwind.config.js';

tailwindConfig.content = [
  "./index.html",
  "./src/**/*.{js,ts,jsx,tsx}",
  "./components/**/*.{js,ts,jsx,tsx}",
];

export default tailwindConfig

Import the CSS file into the top level of your app

import 'atomicform-component-library/dist/style/lib.css';

Updates/Changes

This component library will continue to change over time as we add new components, refine existing ones, both in terms of design and functionality (for example, the arguments a component expects or adding a click handler)

The basic flow will be as follows 1. A Jira ticket in the atomicform-components project is created that clearly defines the work to be done and what qualifies as done. 2. If no engineer is assigned to take this ticket, an engineer will need to be assigned in the #software slack channel. 3. The engineer will work on a branch to complete the ticket. 4. Once the work is ready for review, update the JIRA ticket with any necessary screenshots, video recordings or links and share the ticket with the reviewer in Slack and let them know its ready for review. Let's try to keep as much of the feedback and responses in JIRA as possible for future reference. Any feedback will need to be addressed and then go back through the review process. 5. On Approval, the code will be merged in. 6. If being deployed, a new release will be created, changelog filled out and published to NPM

New views/components

Create a JIRA ticket that links to the figma component/view for what should be included in this component library, what it will be used for and what qualifies as complete for this task. If the person creating this ticket is going to implement it, assign it to yourself. If not,share the ticket in the #software channel and ensure that it gets assigned to an engineer.

The engineer will create a new branch of this repo with the naming convention add/{component_or_view_name} and implement the component on this branch. Create the component as well as a story for that component. Once it matches Figma and is ready for review, create a pull request from the add/{component_or_view_name} branch into staging. The Pull Request will automatically create a preview deployment of Storybook. Share this with Dani and incorporate any feedback required until she gives it :+1: , then you can merge to staging.

Requesting Design Changes

If an existing component requires a design change or fix, create a JIRA ticket that includes screenshots/video recordings of the current design/behavior and a link to where the desired design/behavior are in Figma.

Share in #software if there isn't someone assigned to this and ensure it is assigned to someone, if the engineer didn't create the ticket, ensure that they understand the ticket creator on exactly what they're focusing on.

The engineer will create a new branch of this repo with the naming convention fix/{component_or_view_name} and the go through the review process once ready.

Requesting Functionality Changes

The requester will create a JIRA ticket that specifies what change needs to be made and what the desired end result is.

Share in #software if there isn't someone assigned to this and ensure it is assigned to someone, if the engineer didn't create the ticket, ensure that they understand the ticket creator on exactly what they're focusing on.

The engineer will create a new branch of this repo with the naming convention fix/{component_or_view_name} and the go through the review process once ready.

Making code changes

Pull down the latest staging branch, create a new branch off of staging with the following naming convention

add/{component_name} fix/{component_name}_{reason} remove/{component_name}

Versioning

This component library's versioning follows standard naming conventions, being "Major.Minor.Patch". "Major" will include either a significant non-retrocompatible refactor of existing components, or a large new set of components. "Minor" will include either small new features, retrocompatible refactors, or single new components. "Patch" will only include bugfixes, and those fixes must always be retrocompatible.

Deployment

Once something is ready for production, create a release tag, fill out a changelog and merge into main.

Switch to the main branch locally, pull down the latest changes and run npm rollup``npm publish

Storybook

  • Storybook deployments will happen automatically through Vercel

NPM package

To build the library for publising in NPM, it is required to install rollup locally. To do so, run the following command:

npm install rollup -g

Once it is done, it can be verified by running rollup -c inside the project's directory

Then,you must authenticate with NPM to publish the new update. Do so by executing:

npm login

This should ask you for the Atomic Form NPM credentials. Once logged in, you can publish new updates by following these steps:

  • Increment the package version in the package.json
  • Run npm run prebuild to delete the existing dist directory
  • Run npm run rollup to generate a new build
  • Run npm publish to upload it to NPM

If you are working on Windows, run these commands instead:

  • Increment the package version in the package.json
  • Run npm run prebuild:windows to delete the existing dist directory
  • Run npm run rollup:windows to generate a new build
  • Run npm publish to upload it to NPM

Code structure

Try to mirror existing coding conventions in this repo so there is consistency in implementation.

more here coming soon...

Plugins

Tailwind

We are using tailwindcss to help with styling. Additional CSS styles can be added in the traditional way but this helps with development.

All of the colors can be found in tailwind.config.js We have the following Tailwind plugins included

Docs for handling dark mode with tailwind

Docs for handling responsive design with tailwind

Docs for handling focus states

Headless UI

Headless UI is a set of unstyled components that we can expand on top of that provide easier development for interactive components

Headless UI Docs

Resources

Boilerplate codebases with the component library already implemented

React Starter

React Starter

Remix Starter

Remix Starter

1.3.5

1 day ago

1.3.4

2 days ago

1.3.3

2 days ago

1.3.2

2 days ago

1.3.1

8 days ago

1.2.4

9 days ago

1.2.3

9 days ago

1.3.0

9 days ago

1.2.2

10 days ago

1.2.1

10 days ago

1.2.0

15 days ago

1.1.1

16 days ago

1.1.0

16 days ago

1.1.2

16 days ago

1.0.2

17 days ago

1.0.3

17 days ago

0.0.100

20 days ago

1.0.1

20 days ago

1.0.0

20 days ago

0.0.98

20 days ago

0.0.99

20 days ago

0.0.97

24 days ago

0.0.95

27 days ago

0.0.96

27 days ago

0.0.93

27 days ago

0.0.94

27 days ago

0.0.88

1 month ago

0.0.89

1 month ago

0.0.90

1 month ago

0.0.91

1 month ago

0.0.92

29 days ago

0.0.84

1 month ago

0.0.85

1 month ago

0.0.86

1 month ago

0.0.87

1 month ago

0.0.80

1 month ago

0.0.81

1 month ago

0.0.82

1 month ago

0.0.83

1 month ago

0.0.77

1 month ago

0.0.78

1 month ago

0.0.79

1 month ago

0.0.76

1 month ago

0.0.73

1 month ago

0.0.74

1 month ago

0.0.75

1 month ago

0.0.71

1 month ago

0.0.72

1 month ago

0.0.70

2 months ago

0.0.64

2 months ago

0.0.65

2 months ago

0.0.66

2 months ago

0.0.67

2 months ago

0.0.68

2 months ago

0.0.69

2 months ago

0.0.63

2 months ago

0.0.60

2 months ago

0.0.61

2 months ago

0.0.59

2 months ago

0.0.53

2 months ago

0.0.54

2 months ago

0.0.55

2 months ago

0.0.56

2 months ago

0.0.57

2 months ago

0.0.58

2 months ago

0.0.51

2 months ago

0.0.52

2 months ago

0.0.50

2 months ago

0.0.49

2 months ago

0.0.46

2 months ago

0.0.47

2 months ago

0.0.48

2 months ago

0.0.45

2 months ago

0.0.42

2 months ago

0.0.43

2 months ago

0.0.44

2 months ago

0.0.40

2 months ago

0.0.41

2 months ago

0.0.37

2 months ago

0.0.38

2 months ago

0.0.39

2 months ago

0.0.34

2 months ago

0.0.35

2 months ago

0.0.36

2 months ago

0.0.30

3 months ago

0.0.31

3 months ago

0.0.32

3 months ago

0.0.33

3 months ago

0.0.29

3 months ago

0.0.27

3 months ago

0.0.28

3 months ago

0.0.26

3 months ago

0.0.21

4 months ago

0.0.22

4 months ago

0.0.23

4 months ago

0.0.24

4 months ago

0.0.25

4 months ago

0.0.20

4 months ago

0.0.17

4 months ago

0.0.18

4 months ago

0.0.19

4 months ago

0.0.15

4 months ago

0.0.16

4 months ago

0.0.14

4 months ago

0.0.13

5 months ago

0.0.11

5 months ago

0.0.12

5 months ago

0.0.10

5 months ago

0.0.9

5 months ago

0.0.8

5 months ago

0.0.7

5 months ago

0.0.6

5 months ago

0.0.5

5 months ago

0.0.4

5 months ago

0.0.3

5 months ago

0.0.2

5 months ago

0.0.1

5 months ago