1.2.0 • Published 7 months ago

@bliss-design-system/iconset v1.2.0

Weekly downloads
-
License
MIT
Repository
gitlab
Last release
7 months ago

Bliss Iconsets

The home of all Bliss icons

⚠️ This is NOT a component, this the definitive collection of icons designed for Bryter, and as such should be the source of truth regarding the latest icons available for use according to Figma designs. There is an icon component that has been created to consume these icons individually.

Table of Contents

ℹ️ Icons

This repository exists as a single source of truth for Bliss icons, from a design and a development perspective.

As it stands, this repository makes a single sprite available for consuming applications, which attaches itself to the application's DOM on initialization. More on that in the Usage section.

Though it is in its initial stages, the proposal is for the concept of iconsets to be explored so that different applications can consume only the icons they need.

At the moment, there is only one iconset which encompasses all available icons, so further breakdowns are up for discussion in a future version.

🚧 Usage

In order to get the icons sprite install the package in the root of your client-facing application:

yarn add @bliss-designiconsets

//or

npm install @bliss-designiconsets

And within you application's client-facing entry file, you can request the sprite like this:

import { blissIconsetAppendSprite } from '@bliss-design-system/iconset/';

blissIconsetAppendSprite();

So when your app launches, the sprite will attach itself.

If you need a list of icon names, you can also access an array of them by requesting:

import { blissIconNames } from '@bliss-design-system/iconset';

But what's really happening?

This repository holds the original Bliss icons. It is regularly kept up to date as new icons are added or removed, through the build command in the root package.json.

This command will clean up the folder structure, optimize the existing icons, and convert them into a JS file that contains the final sprite. This file also attaches the sprite to the DOM when requested.

As previously mentioned, the current iconset is composed of all available icons, meaning they will all be attached as <symbol>s within an <svg>.

This means that they will be available to any part of the application code that interacts with that application's DOM, but we strongly recommend consuming them through the bliss-icon Component

🛠 Contributing

As this a proof of concept, the best way to contribute is to implement and play. We're aiming to find out how to best serve consistent iconography, and want to be as performant as possible about it.

➕ Adding a new Icon

If you would like to add a new icon, run the following:

git clone git@gitlab.com:bliss-design-system/iconset.git
cd iconsets/
yarn

Then you can add the new icon file to src/icons/original. When you commit (via the command line!), husky will run a pre-commit hook to optimize, rename and rebuild the sprite and icon name list.

You'll be prompted to fill out certain details about your commit, so we recommend the following:

  • If you are updating an icon, this qualifies as a patch version (fix)
  • If you are adding an icon, this qualifies as a minor version (feat)

⚠️ If you are removing or renaming an icon, please speak with us, as this will qualify as a major version and involves a breaking change.

Finally, open an MR with a screenshot of the new icon, or a before and after of a changed icon, with some information about the reasoning behind this change.

🤔 Troubleshooting

We'll fill this section out as we go, but please get in touch with #unit_bliss 🙏✨

1.2.0

7 months ago

1.1.4

7 months ago

1.1.1

7 months ago

1.1.3

7 months ago

1.1.2

7 months ago

1.1.0

7 months ago

1.0.1

7 months ago

1.0.0

8 months ago