npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@getsynapse/design-system

v5.24.1

Published

Design System for the Synapse environment

Downloads

4,195

Readme

Design System

Welcome to the repo for Synapse's Design System 🎉

Before you jump into creating components, make sure you've read this.

Typescript

This project uses Typescript to build the library, as oposed to plain Javascript; if you're new to Typescript (and TSX), these links should help get started with Typescript's type checking:

Atomic Design

The Design System is built using the Atomic Design methodology; this means we're thinking of components in hierarchical way, where we have Atoms, Molecules, Organisms, Templates, and Pages, and each level in the hierarchy is composed of elements from the levels below. Here are a couple of links with more information:

Libraries

Tailwindcss

Instead of relying on CSS files and preprocessors, like Sass, we're opting for a CSS utility framework. Colors and breakpoints are already configured for the project.

Colors

The colors in the Design System specifications are aleady configured here, but keep in mind that more semantic names were used, where the main color in each section is the default one, so something like SYN2_DARK_BLUE will be primary-dark.

Note that the tertiary and system colors were renamed. Tertiary colors are implemented as their color names (teal and purple). System colors use names related to their roles (success, error, and warning).

This is with the intentions to make theming easier to implement.

Reach UI

Accessibilty is a requirement for the Design System, and not all common web patterns are straighforward, so we're leveraging a library that provides some React components with accessibility features already in place. It's also good practice to get familiarized with WAI-ARIA practices.

This library isn't installed already, since each component can be installed individually, we'll add it as needed. If you do need to install a component, make sure the stylesheet attached to it is imported at the top of src/index.ts and .storybook/preview.js.

Storybook

Along with any component created, be sure to include it's stories. This helps us see how the components behave as we're developing, it helps other devs know how the components work without having to implement them, and it can also provide designers a way to see the implementation of their work.

Jest

Whenever you create (or modify) a component, try to also think of potential ways the component can fail and include tests to make sure the component works as expected. This can help catch errors before a component is published, and it also helps prevent new erros being introduced.

Creating Components

Every component created needs to be placed inside a folder named after the component, along with it's stories and tests file

.
└── src
    ├── Atoms
    │   └── Foo
    │       ├── Foo.stories.tsx
    │       ├── Foo.test.tsx
    │       └── Foo.tsx
    └── index.ts

Where index.ts would contain mostly lines like export { Foo } from './Atoms/Foo/Foo';

Scripts

  • storybook - Run the Storybook server
  • build - Generate a new bundle
  • test - Run Jest tests
  • release - Bundle files, bump version, and publish to NPM. It takes a --level argument that corresponds to npm version's parameter (major | minor | patch | premajor | preminor | prepatch | prerelease | from-git)

Development with YALC

YALC is a tool to sidestep the need to publish incremental updates to the NPM repo and still use changes in the main learn_ops application.

Installation

npm i yalc -g

In the design-system root folder: yalc publish

In the learnops-frontend root folder: yalc link @getsynapse/design-system

Development

Whenever you need to publish a change to the client pacakge: npm run build && yalc push

This will automatically push the changes to the frontend app. You may need to refresh.

NPM

Install and run the YALC tool under node v17+. Run a separate terminal to build design-system in v14.

Extras

P.S. This repo uses npm and node v14 (Fermium)