Socket
Socket
Sign inDemoInstall

cb-ui-library-storybook

Package Overview
Dependencies
224
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    cb-ui-library-storybook

> The main purpose of this repository is for the development and distribution of Cloudbeds Presentational components and global styles through the **@cloudbeds private npm registry**. Storybook is an open source tool we use for building our ui-library co


Version published
Weekly downloads
0
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Cloudbeds: ( 💼 ui-library & 📚 Storybookjs )

The main purpose of this repository is for the development and distribution of Cloudbeds Presentational components and global styles through the @cloudbeds private npm registry. Storybook is an open source tool we use for building our ui-library components and styles in isolation. It provides Cloudbeds Designers and User Experience professionals with the opportunity to review the look and feel of components, while also providing Developers documentation on how to use the components.



Libraries and Tooling

Current Dependencies and Baseline Associations


packagesversionsexpectation
React^17.0.2your project includes
Chakra-UI/react1.6.4will be added to your node_module
Framer-Motion4.1.17 (exact)will be added to your node_module
emotion/react^11.4.1CSS-in-JS
TypeScript^ 4.4.2JavaScript compatible
StorybookJs^6.2.7React Specific

Version Issues

  • Chakra-UI: ( latest version >=1.7.0), has breaking changes with "css" prop. Please see Chakra-ui issue #5045

  • Framer-Motion ( latest version >=4.1.17, has breaking changes related to React using .mjs files. Please see framer-motion issue #1307

Installation

The usual npm i should work as expected.

In case you encounter npm ERR! Conflicting peer dependency run

npm i --force

Stories

MDX

For more elaborate documentation you can create a Component.stories.mdx file

import { Canvas, Meta, Story, ArgsTable } from '@storybook/addon-docs';
import * as CbMenuStories from './CbMenu.stories';

<Meta title="Cloudbeds/Components/Menu" />

<Canvas>
  <Story name="with args" story={CbMenuStories.WithArgs} />
</Canvas>
<ArgsTable />

Full canvas view

By default, a story canvas has padding for a nicer view. For components that span through the viewport (e.g. Sidebar, Navbar) you can add the layout: 'fullscreen story parameter.

See https://storybook.js.org/docs/react/configure/story-layout

Builds


Builds and Deploys of the ui-library are facilitated through bit-bucket pipeline, which builds and publishes a production version to our private Cloudbeds NPM registry.

@cloudbeds/ui-library: NPM VERSION



How to Contribute


We do not submit directly to the Main( master) of the ui-library. Instead, we create branches, using a Jira work reference and the type of task to be completed. The type of task is based on the concept of Conventional Commits, which triggers specific Semantic Versions.

Typical Scenario

Sarah has been working on a Jira Ticket AR-123 for the current sprint, which involves adding rollover functionality to a button group. At the end of each day, she updates her branch AR-123-menu-popover.

 git commit -m"AR-123 : completed update of the global styled darkmode..."

Eventually Sarah finishes the work need to complete this task, and she is ready to issue a pull request, which will bump up the current version of the @cloudbeds/ui-library when approved.

 git commit -m"feat: AR-123  : completed update of the global styled darkmode..."
Brief explanation of task types:

Example @cloudbeds/ui-library is at version 1.1.0

  • BREAKING CHANGE: is a MAJOR change : 1.1.0 to 2.1.0
    • A version which makes incompatible API changes often denoted as Breaking Changes
      • git commit -m "BREAKING CHANGE: AR-123 converted all component..."
  • feat: is a MINOR change : 1.1.0 to 1.2.0
    • A version which adds functionality in a backwards compatible manner Most frequent changes
      • git commit -m "feat: AR-123 updates the ..."
  • fix: is a PATCH change : 1.1.0 to 1.1.1
    • A version which adds functionality in a backwards compatible manner Most frequent changes
      • git commit -m "fix: AR-123 removes bug from ..."

more reference can be reviewed in the documentation @Conventional Commits



Usage


Consumers of the ui-library should do so through including it as a dependency in their project's package.json.


Package.json
  ...
  dependency: {
    ...
    "@cloudbeds/ui-library": "^1.0.3",
  }

Local Development with Cloudbeds MFD repos


While the components and styles within the Cloudbeds ui-library are intended to be consumed by other Cloudbeds frontend efforts, all development work is contained within the repository. For optimal development to take place, the constant changes of styles and components need to appear in a "hot module reloading" fashion with other repositories.

A Local Dev repository has been created for this exact purpose. Instructions for assembling a local integrated local development environment can be found on the confluence page How to Develop in the ui-library.

FAQs

Last updated on 25 Oct 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc