Skip to main content
Brand and assetsBuild
Monitor and contribute
  • Component health
/
Monitor and contribute
  • Component health
  • Contribution
    • How to contribute
    • Guides
    • For designers
    • For engineers
    • For documentation
    • Figma training
    • Reference
    • Component page template
    • Component lifecycle
    • Naming conventions
    • Component thumbnails
  • Contribution
  • Component lifecycle

Managing a component's lifecycle

How to create, update or deprecate a component.

When is it time to create a global component?​

Creating a new component is discussed during UI Reviews.

What you need to think about:

  • Is it really a shortcut for engineers? Will it make their work a lot faster? Eg. inputs have a lot of states to think through, it’s much faster for engineers to use the inputs made available in Murray but a simple card with no interaction is not that interesting to add to Murray as it doesn't take a lot of time to implement.
  • Will it help consistency a lot? Is there a good chance it won’t change often?
  • Does it apply in all contexts? Can it be made to apply to all contexts in a simple way? If not, it should probably a local component.

At all times, we have to balance consistency with creativity.

How to update a component?​

We will consider two types of changes:

  • Breaking changes
  • Updates
  • As an engineer
  • As a designer

We consider a breaking change something that will alter the component's instances. Eg. if you change the API definition of a component or change a default value.

All other changes are considered updates.

Updates​

Straightforward, make the change and ping @murray_owner on the pull-request.

Breaking changes​

If the modification implies a breaking change, two options are available:

  1. The better way
  • Update the component
  • Update all instances of the component
  1. When it's not possible
We avoid components deprecation as much as possible.

Ping a Murray owner first to discuss the change.

  • Ping a Murray owner first
  • Deprecate the existing component
  • Document the breaking change and write a migration guide with a link to the new one
  • Create new version of the component

We consider a breaking change something that will alter the component's instances. Eg. if you change the <Button> component and as a result the existing mock-ups using <Button> loose their labels, it is a breaking change.

All other changes are considered updates.

Updates​

Straightforward, make the change following the Figma contribution guide.

Breaking changes​

For a component called <Name>:

  • Rename <Name> to _🚫<Name> - Date/of/DeprecationEg. <Button> becomes _🚫<Button> - 2021-01-15
  • Create your new version and call it <Name>
  • Move the older version to the “Deprecated” page of our Figma file
  • Hit publish & describe the changes you’ve made
  • Make sure changes to the components are implemented in code.

How to deprecate a component?​

  • As an engineer
  • As a designer
  • Add @deprecated to the component's MD description
  • Add @deprecated to the component's JSDoc

If a component is no longer to be used:

  • Rename <Name> to _🚫<Name> - Date/of/Deprecation
  • Move it to the “Deprecated” page of our Figma file
  • Hit publish & describe the changes you’ve made
  • Make sure the component is also deprecated in code.
Edit this page
Previous
Component page template
Next
Naming conventions
  • When is it time to create a global component?
  • How to update a component?
    • Updates
    • Breaking changes
    • Updates
    • Breaking changes
  • How to deprecate a component?