1. Purpose
To provide a safe, step-by-step method for updating components in a shared library without disrupting existing designs, developer workflows, or QA.
2. Why This Matters
- Master components are used across multiple files/projects.
- If updated recklessly →
- Instances detach or break.
- Dev handoff gets inconsistent.
- Teams lose trust in the library.
- This guide ensures updates are predictable, reversible, and documented.
3. Golden Rules Before Updating
- Never edit directly in production library → always work in a sandbox copy.
- Version everything → if you can’t tag changes, you can’t roll them back.
- Announce change window → team should know when updates are being made.
- Test in consumer files before publishing → validate impact.
4. Step-by-Step Update Process
Stage A – Prep & Sandbox
- Duplicate the component into a sandbox page/file.
- Tag current version → e.g.,
Button/Primary v1.3. - Check usage → list all files using this component.
Stage B – Apply Changes Safely
- Make updates in sandbox, not in master.
- Examples: token change (new color), structural update (icon slot), new state.
- Test responsiveness (desktop, mobile, tablet).
- Validate against Token–Component Sync Map (Doc 10.6).
- Confirm all states + variants are still intact.
Stage C – Test & Validate
- Swap sandbox component into 1–2 consumer screens.
- Validate spacing, overrides, responsiveness.
- Run peer review with Component Consistency Checklist (Doc 4.7).
- Run accessibility validation (contrast, focus states, tap targets).
Stage D – Publish & Communicate
- Update component in master library → tag new version (e.g., v1.4).
- Document update in Component Review Log (Doc 10.8).
- Publish with changelog → include: what changed, what broke, what to test.
- Notify team with migration guide (Slack/Email).
Stage E – Post-Update Monitoring
- Monitor adoption → check consumer files in 1 sprint.
- If bugs appear → hotfix publish (v1.4.1) or rollback to v1.3.
5. Failure Handling
- If update breaks multiple screens →
- Immediately rollback to last stable version.
- Announce rollback + issue fix ETA.
- If conflicting overrides found in consumer files →
- Provide migration guidance (swap to correct variant).
6. Example – Updating Button/Primary
- Before: Blue background (#3B82F6), no icon slot.
- Change: Add optional left icon property.
- Process:
- Sandbox test → create variant with icon slot.
- Swap in 2–3 screens → validate spacing.
- Document in Review Log → “v1.4 added icon property.”
- Publish → notify devs → “React Button v1.4 now supports icons.”
7. Usage Notes
- Treat library updates like code releases.
- Never surprise devs or QA → always log in Review Log & Changelog.
- If a breaking change is unavoidable → provide migration table.