GithubHelp home page GithubHelp logo

baffipelo / palette Goto Github PK

View Code? Open in Web Editor NEW

This project forked from artsy/palette

0.0 1.0 0.0 5.24 MB

Artsy's design system

Home Page: https://palette.artsy.net/

License: MIT License

JavaScript 7.81% TypeScript 91.52% HTML 0.03% Ruby 0.64%

palette's Introduction

@artsy/palette CircleCI npm version Netlify Status

Artsy's Design System

Meta

What is Palette?

Palette is a collection of primitive, product-agnostic elements that help encapsulate Artsy's look and feel at base level. This project is intended to be used across our digital product portfolio.

Does my component belong in Palette?

If the component applies to Artsy as a brand and can/will be used across multiple digital products, then Palette is a great place for it. If it's highly product specific then it's best to leave the component where it's used. We can always move things later!

If the above guidance still doesn't give you a good sense of what to do, please join the bi-weekly design systems sync.

How to contribute

If you'd like to add a new component to Palette please create an issue using the component spec template. That'll give both design and engineering a chance to peek at the proposal and provide feedback before moving forward.

Local development

In the project root run the following:

$ yarn start
$ open http://localhost:8000/

When developing components for Emission, boot the Simulator and run:

$ yarn workspace @artsy/palette watch:emission

Since React Native doesn't support symlinks, this will copy changes directly to the Emission folder and hot-reload the app.

Linking and Unlinking with Reaction

To link your local palette with your local reaction, run:

$ yarn workspace @artsy/palette link && yarn workspace @artsy/palette watch
(wait until you see a message that X files have been successfully compiled before moving on)

$ cd ../reaction && yarn link @artsy/palette && yarn start

To _unlink_ your local palette from your local reaction, run (in **Reaction**):

$ yarn unlink @artsy/palette
$ yarn add @artsy/palette
$ yarn start

### ⚠️ Don't Forget About iOS!

When adding a new component to Palette, it's important to be aware that this library is used on the web as well as in React Native, via Emission, and therefore must follow a few rules in terms of structure, namely:

> Components exported from the main `/elements/index.tsx` must have a corresponding `.ios.tsx` file, even if the component isn't yet used in React Native.

Example:

/elements /MyComponent index.tsx MyComponent.tsx MyComponent.ios.tsx


And from within `/elements/index.tsx`, we export our component:

```tsx
export * from "./MyComponent";

When React Native imports @artsy/palette, it will automatically look for files with a .ios extension and import those first, and then secondarily import everything else. If a component contains web-only features but doesn't have a corresponding iOS file stub, React Native tooling will error out.

Deployment process

Commits and Deployments

Palette uses auto-release to automatically release on every PR. Every PR should have a label that matches one of the following

  • Version: Trivial
  • Version: Patch
  • Version: Minor
  • Version: Major

Major, minor, and patch will cause a new release to be generated. Use major for breaking changes, minor for new non-breaking features, and patch for bug fixes. Trivial will not cause a release and should be used when updating documentation or non-project code.

If you don't want to release on a particular PR but the changes aren't trivial then use the Skip Release tag along side the appropriate version tag.

Zeplin Plugin

Artsy uses Zeplin and we have developed a plugin that you can install to get Palette component JSX copied directly from Zeplin mocks.

Repos consuming Palette

palette's People

Contributors

damassi avatar artsyit avatar zephraph avatar jonallured avatar ds300 avatar kierangillen avatar peril-staging[bot] avatar renovate[bot] avatar oxaudo avatar lilyfromseattle avatar alloy avatar renovate-bot avatar mdole avatar pepopowitz avatar nicoleyeo avatar l2succes avatar sweir27 avatar dblandin avatar deliciousnachos avatar sepans avatar mzikherman avatar erikdstock avatar orta avatar iskounen avatar javamonn avatar owendodd avatar yuki24 avatar anandaroop avatar ashleyjelks avatar starsirius avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.