@pnx-mixtape/mxds 0.1.0-rc.4 → 0.1.0-rc.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/skills/create-mxds-component/SKILL.md +77 -0
- package/DESIGN.md +595 -0
- package/README.md +2 -3
- package/dist/build/accordion.entry.js +2 -1
- package/dist/build/autocomplete.entry.js +1 -1
- package/dist/build/back-to-top.css +1 -0
- package/dist/build/back-to-top.entry.js +1 -0
- package/dist/build/base.css +1 -1
- package/dist/build/button.css +1 -1
- package/dist/build/card.css +1 -1
- package/dist/build/chunks/Accordion-Bqe8vTNR.js +44 -0
- package/dist/build/chunks/AccordionGroup-BYtoAFxg.js +47 -0
- package/dist/build/chunks/AccordionMobile-D517oXYZ.js +26 -0
- package/dist/build/chunks/Autocomplete-kRo8RNbC.js +135 -0
- package/dist/build/chunks/BackToTop-4M-Wl7z3.js +64 -0
- package/dist/build/chunks/ClosableAlert-CZ114JsL.js +55 -0
- package/dist/build/chunks/CookieConsent-wd8gQ2Oe.js +18 -0
- package/dist/build/chunks/Dialog-DoYcGqhW.js +48 -0
- package/dist/build/chunks/DropMenu-CSTZq0Zt.js +68 -0
- package/dist/build/chunks/FeedbackForm-BsL7fv8s.js +64 -0
- package/dist/build/chunks/Gallery-DqJPujX5.js +165 -0
- package/dist/build/chunks/GlobalToggle-7H3F1Wvc.js +82 -0
- package/dist/build/chunks/InPageNavigation-D7m3IN89.js +86 -0
- package/dist/build/chunks/Navigation-CRModT40.js +142 -0
- package/dist/build/chunks/Popover-CiTAftNU.js +30 -0
- package/dist/build/chunks/Sticky-C1H8MNqK.js +51 -0
- package/dist/build/chunks/Tabs-BJD3kABL.js +160 -0
- package/dist/build/chunks/Translate-yAgySwet.js +46 -0
- package/dist/build/chunks/cookie-compliance-CG6x-TcV.js +119 -0
- package/dist/build/chunks/enums-BrHxPZZ_.js +36 -0
- package/dist/build/chunks/polyfills-D-qh1a_2.js +33 -0
- package/dist/build/chunks/utilities-B9mNRs7V.js +255 -0
- package/dist/build/content-block.css +1 -1
- package/dist/build/cookie-consent.entry.js +1 -1
- package/dist/build/dialog.entry.js +1 -1
- package/dist/build/drop-menu.entry.js +1 -1
- package/dist/build/elements.js +147 -1
- package/dist/build/feedback-form.css +1 -0
- package/dist/build/feedback-form.entry.js +1 -0
- package/dist/build/filters.entry.js +145 -1
- package/dist/build/form.css +1 -1
- package/dist/build/gallery.entry.js +1 -1
- package/dist/build/global-alert.entry.js +1 -1
- package/dist/build/header.css +1 -1
- package/dist/build/header.entry.js +1 -1
- package/dist/build/icon.css +1 -1
- package/dist/build/in-page-navigation.entry.js +1 -1
- package/dist/build/navigation.css +1 -1
- package/dist/build/navigation.entry.js +1 -1
- package/dist/build/pagination.css +1 -1
- package/dist/build/popover.entry.js +1 -1
- package/dist/build/react.js +2291 -1
- package/dist/build/side-navigation.css +1 -1
- package/dist/build/sidebar.css +1 -1
- package/dist/build/sticky.entry.js +1 -1
- package/dist/build/tabs.entry.js +1 -1
- package/dist/build/translate.css +1 -0
- package/dist/build/translate.entry.js +1 -0
- package/dist/build/utility-list.entry.js +53 -1
- package/dist/types/Component/BackToTop/BackToTop.d.ts +20 -0
- package/dist/types/Component/BackToTop/BackToTop.d.ts.map +1 -0
- package/dist/types/Component/BackToTop/Elements/BackToTop.d.ts +27 -0
- package/dist/types/Component/BackToTop/Elements/BackToTop.d.ts.map +1 -0
- package/dist/types/Component/BackToTop/back-to-top.entry.d.ts +2 -0
- package/dist/types/Component/BackToTop/back-to-top.entry.d.ts.map +1 -0
- package/dist/types/Component/DropMenu/DropMenu.d.ts +2 -1
- package/dist/types/Component/DropMenu/DropMenu.d.ts.map +1 -1
- package/dist/types/Component/Navigation/Elements/Navigation.d.ts +2 -3
- package/dist/types/Component/Navigation/Elements/Navigation.d.ts.map +1 -1
- package/dist/types/Component/SideNavigation/Components/SideNavigationTree.d.ts +3 -3
- package/dist/types/Component/SideNavigation/Components/SideNavigationTree.d.ts.map +1 -1
- package/dist/types/Component/SideNavigation/SideNavigation.d.ts +3 -1
- package/dist/types/Component/SideNavigation/SideNavigation.d.ts.map +1 -1
- package/dist/types/Component/Tabs/Components/TabDropMenu.d.ts.map +1 -1
- package/dist/types/Component/Tabs/Elements/Tabs.d.ts.map +1 -1
- package/dist/types/Component/Translate/Elements/Translate.d.ts +23 -0
- package/dist/types/Component/Translate/Elements/Translate.d.ts.map +1 -0
- package/dist/types/Component/Translate/Translate.d.ts +37 -0
- package/dist/types/Component/Translate/Translate.d.ts.map +1 -0
- package/dist/types/Component/Translate/languages.d.ts +11 -0
- package/dist/types/Component/Translate/languages.d.ts.map +1 -0
- package/dist/types/Component/Translate/translate.entry.d.ts +2 -0
- package/dist/types/Component/Translate/translate.entry.d.ts.map +1 -0
- package/dist/types/Form/FeedbackForm/Elements/FeedbackForm.d.ts +37 -0
- package/dist/types/Form/FeedbackForm/Elements/FeedbackForm.d.ts.map +1 -0
- package/dist/types/Form/FeedbackForm/FeedbackForm.d.ts +36 -0
- package/dist/types/Form/FeedbackForm/FeedbackForm.d.ts.map +1 -0
- package/dist/types/Form/FeedbackForm/feedback-form.entry.d.ts +2 -0
- package/dist/types/Form/FeedbackForm/feedback-form.entry.d.ts.map +1 -0
- package/dist/types/Utility/Elements/google-translate-widget.d.ts +91 -0
- package/dist/types/Utility/Elements/google-translate-widget.d.ts.map +1 -0
- package/dist/types/Utility/utilities.d.ts +2 -0
- package/dist/types/Utility/utilities.d.ts.map +1 -1
- package/dist/types/elements.d.ts +3 -0
- package/dist/types/elements.d.ts.map +1 -1
- package/dist/types/enums.d.ts +3 -1
- package/dist/types/enums.d.ts.map +1 -1
- package/dist/types/react.d.ts +3 -0
- package/dist/types/react.d.ts.map +1 -1
- package/dist/types/tokens.d.ts +1 -0
- package/dist/types/tokens.d.ts.map +1 -1
- package/docs/API.md +1215 -0
- package/docs/CSSGuidelines.md +893 -0
- package/docs/CodeQuality.md +940 -0
- package/docs/ComponentArchitecture.md +714 -0
- package/docs/Contributing.md +626 -0
- package/docs/MemoryManagement.md +598 -0
- package/docs/Migrations.md +6 -0
- package/docs/README.md +100 -0
- package/docs/Security.md +444 -0
- package/docs/Testing.md +739 -0
- package/docs/Troubleshooting.md +674 -0
- package/package.json +9 -6
- package/src/Atom/Button/Button.tsx +1 -1
- package/src/Atom/Button/__snapshots__/Button.stories.tsx.snap +2 -2
- package/src/Atom/Button/_buttons.css +1 -0
- package/src/Atom/Icon/README.md +1 -1
- package/src/Atom/Icon/_icon.css +1 -0
- package/src/Atom/Icon/images/thumb.svg +1 -0
- package/src/Atom/Link/_links.css +1 -0
- package/src/Atom/Media/__snapshots__/Media.stories.ts.snap +4 -9
- package/src/Atom/Media/media.twig +4 -5
- package/src/Component/BackToTop/BackToTop.stories.ts +127 -0
- package/src/Component/BackToTop/BackToTop.stories.tsx +53 -0
- package/src/Component/BackToTop/BackToTop.tsx +120 -0
- package/src/Component/BackToTop/Elements/BackToTop.ts +119 -0
- package/src/Component/BackToTop/README.md +164 -0
- package/src/Component/BackToTop/__snapshots__/BackToTop.stories.ts.snap +24 -0
- package/src/Component/BackToTop/__snapshots__/BackToTop.stories.tsx.snap +3 -0
- package/src/Component/BackToTop/back-to-top.css +70 -0
- package/src/Component/BackToTop/back-to-top.entry.js +1 -0
- package/src/Component/BackToTop/back-to-top.twig +26 -0
- package/src/Component/Card/Components/CardContent.tsx +1 -1
- package/src/Component/Card/Components/CardMedia.tsx +1 -1
- package/src/Component/Card/__snapshots__/Card.stories.tsx.snap +3 -3
- package/src/Component/Card/card.css +1 -1
- package/src/Component/Carousel/Carousel.stories.ts +66 -36
- package/src/Component/Carousel/__snapshots__/Carousel.stories.tsx.snap +5 -5
- package/src/Component/ContentBlock/Components/ContentBlockMedia.tsx +1 -1
- package/src/Component/ContentBlock/content-block.css +1 -1
- package/src/Component/DropMenu/DropMenu.stories.ts +21 -2
- package/src/Component/DropMenu/DropMenu.tsx +14 -4
- package/src/Component/DropMenu/__snapshots__/DropMenu.stories.ts.snap +3 -3
- package/src/Component/DropMenu/__snapshots__/DropMenu.stories.tsx.snap +2 -2
- package/src/Component/DropMenu/drop-menu.twig +7 -1
- package/src/Component/HeroBanner/__snapshots__/HeroBanner.stories.tsx.snap +1 -1
- package/src/Component/InPageNavigation/__snapshots__/InPageNavigation.stories.ts.snap +48 -13
- package/src/Component/InPageNavigation/in-page-navigation.twig +4 -6
- package/src/Component/ListItem/Components/ListItemMedia.tsx +1 -1
- package/src/Component/Navigation/Elements/Navigation.ts +25 -29
- package/src/Component/Navigation/README.md +11 -10
- package/src/Component/Navigation/__snapshots__/Navigation.stories.ts.snap +8 -8
- package/src/Component/Navigation/_navigation-dropdown.css +9 -11
- package/src/Component/Navigation/_navigation-mega.css +5 -11
- package/src/Component/Navigation/_navigation.css +5 -3
- package/src/Component/Navigation/menu.twig +1 -1
- package/src/Component/Navigation/navigation.twig +0 -1
- package/src/Component/Pagination/Pagination.stories.ts +57 -27
- package/src/Component/Pagination/pagination.css +16 -7
- package/src/Component/Popover/__snapshots__/Popover.stories.tsx.snap +3 -3
- package/src/Component/SideNavigation/Components/SideNavigationTree.tsx +68 -24
- package/src/Component/SideNavigation/README.md +78 -32
- package/src/Component/SideNavigation/SideNavigation.stories.ts +41 -2
- package/src/Component/SideNavigation/SideNavigation.stories.tsx +31 -0
- package/src/Component/SideNavigation/SideNavigation.tsx +13 -3
- package/src/Component/SideNavigation/__snapshots__/SideNavigation.stories.ts.snap +87 -3
- package/src/Component/SideNavigation/__snapshots__/SideNavigation.stories.tsx.snap +2 -0
- package/src/Component/SideNavigation/side-navigation.css +3 -3
- package/src/Component/SideNavigation/side-navigation.twig +10 -3
- package/src/Component/Tabs/Components/TabDropMenu.tsx +7 -1
- package/src/Component/Tabs/Elements/Tabs.ts +13 -3
- package/src/Component/Tabs/Tabs.stories.ts +33 -12
- package/src/Component/Tabs/Tabs.stories.tsx +28 -14
- package/src/Component/Tabs/__snapshots__/Tabs.stories.ts.snap +3 -3
- package/src/Component/Tabs/__snapshots__/Tabs.stories.tsx.snap +2 -2
- package/src/Component/Translate/Elements/Translate.ts +76 -0
- package/src/Component/Translate/README.md +285 -0
- package/src/Component/Translate/Translate.stories.ts +87 -0
- package/src/Component/Translate/Translate.stories.tsx +77 -0
- package/src/Component/Translate/Translate.tsx +213 -0
- package/src/Component/Translate/__snapshots__/Translate.stories.ts.snap +18 -0
- package/src/Component/Translate/__snapshots__/Translate.stories.tsx.snap +3 -0
- package/src/Component/Translate/languages.ts +39 -0
- package/src/Component/Translate/translate.css +62 -0
- package/src/Component/Translate/translate.entry.js +1 -0
- package/src/Component/Translate/translate.twig +44 -0
- package/src/Form/Autocomplete/Autocomplete.stories.tsx +2 -1
- package/src/Form/FeedbackForm/Elements/FeedbackForm.ts +122 -0
- package/src/Form/FeedbackForm/FeedbackForm.stories.ts +99 -0
- package/src/Form/FeedbackForm/FeedbackForm.stories.tsx +73 -0
- package/src/Form/FeedbackForm/FeedbackForm.tsx +196 -0
- package/src/Form/FeedbackForm/README.md +233 -0
- package/src/Form/FeedbackForm/__snapshots__/FeedbackForm.stories.ts.snap +125 -0
- package/src/Form/FeedbackForm/__snapshots__/FeedbackForm.stories.tsx.snap +5 -0
- package/src/Form/FeedbackForm/feedback-form.css +74 -0
- package/src/Form/FeedbackForm/feedback-form.entry.js +1 -0
- package/src/Form/FeedbackForm/feedback-form.twig +80 -0
- package/src/Form/form.css +17 -19
- package/src/Introduction.mdx +1 -1
- package/src/Layout/Footer/__snapshots__/Footer.stories.ts.snap +3 -3
- package/src/Layout/Header/Components/GlobalToggle.tsx +1 -1
- package/src/Layout/Header/Header.stories.ts +53 -48
- package/src/Layout/Header/Header.stories.tsx +35 -22
- package/src/Layout/Header/Header.tsx +2 -2
- package/src/Layout/Header/__snapshots__/Header.stories.ts.snap +18 -14
- package/src/Layout/Header/__snapshots__/Header.stories.tsx.snap +2 -2
- package/src/Layout/Header/_toggles.css +7 -7
- package/src/Layout/Page/__snapshots__/Page.stories.tsx.snap +1 -1
- package/src/Layout/Sidebar/sidebar.css +10 -3
- package/src/Utility/Elements/google-translate-widget.ts +293 -0
- package/src/Utility/global.d.ts +4 -0
- package/src/Utility/utilities.ts +2 -0
- package/src/_custom-media.css +2 -0
- package/src/elements.ts +3 -0
- package/src/enums.ts +2 -0
- package/src/react.ts +3 -0
- package/src/tokens.js +1 -0
- package/dist/build/chunks/Accordion-GN0sME4W.js +0 -1
- package/dist/build/chunks/AccordionGroup-Bzqp5__q.js +0 -1
- package/dist/build/chunks/AccordionMobile-DG5jSe8Q.js +0 -1
- package/dist/build/chunks/Autocomplete-B4RtkAyh.js +0 -1
- package/dist/build/chunks/ClosableAlert-DEhj8Nxm.js +0 -1
- package/dist/build/chunks/CookieConsent-BkCMRVST.js +0 -1
- package/dist/build/chunks/Dialog-Haahn-Yn.js +0 -1
- package/dist/build/chunks/DropMenu-1baQc8Yc.js +0 -1
- package/dist/build/chunks/Gallery-D8NGXy2Q.js +0 -1
- package/dist/build/chunks/GlobalToggle-B52fdBQu.js +0 -1
- package/dist/build/chunks/InPageNavigation-Dyn2TR-N.js +0 -1
- package/dist/build/chunks/Navigation-hOrfLq7h.js +0 -1
- package/dist/build/chunks/Popover-Cxg-s5Jn.js +0 -1
- package/dist/build/chunks/Sticky-BGCuuEJK.js +0 -1
- package/dist/build/chunks/Tabs-DYy1YTdU.js +0 -15
- package/dist/build/chunks/cookie-compliance-Bbm-0vpj.js +0 -1
- package/dist/build/chunks/enums-DLV_1NAf.js +0 -1
- package/dist/build/chunks/polyfills-C7pRt54M.js +0 -1
- package/dist/build/chunks/utilities-_Bq3TxAQ.js +0 -1
|
@@ -0,0 +1,626 @@
|
|
|
1
|
+
# Contributing Guide
|
|
2
|
+
|
|
3
|
+
How to contribute to the Mixtape Design System.
|
|
4
|
+
|
|
5
|
+
## Table of Contents
|
|
6
|
+
|
|
7
|
+
- [Getting Started](#getting-started)
|
|
8
|
+
- [Development Workflow](#development-workflow)
|
|
9
|
+
- [Git Workflow](#git-workflow)
|
|
10
|
+
- [Commit Conventions](#commit-conventions)
|
|
11
|
+
- [Pull Request Process](#pull-request-process)
|
|
12
|
+
- [Code Review](#code-review)
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Getting Started
|
|
17
|
+
|
|
18
|
+
### Prerequisites
|
|
19
|
+
|
|
20
|
+
- **Node.js**: v20 or later
|
|
21
|
+
- **pnpm**: v9 or later
|
|
22
|
+
- **Git**: Latest version
|
|
23
|
+
|
|
24
|
+
### Initial Setup
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
# 1. Clone the repository
|
|
28
|
+
git clone https://github.com/previousnext/mxds.git
|
|
29
|
+
cd mxds
|
|
30
|
+
|
|
31
|
+
# 2. Install dependencies
|
|
32
|
+
pnpm install
|
|
33
|
+
|
|
34
|
+
# 3. Start development server
|
|
35
|
+
pnpm dev
|
|
36
|
+
|
|
37
|
+
# 4. Open Storybook
|
|
38
|
+
# HTML: http://localhost:6006
|
|
39
|
+
# React: http://localhost:6008
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Project Structure
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
mxds/
|
|
46
|
+
├── src/
|
|
47
|
+
│ ├── Atom/ # Atomic components
|
|
48
|
+
│ ├── Component/ # Complex components
|
|
49
|
+
│ ├── Form/ # Form elements
|
|
50
|
+
│ ├── Layout/ # Layout components
|
|
51
|
+
│ └── Utility/ # Utilities and helpers
|
|
52
|
+
├── docs/ # Documentation
|
|
53
|
+
├── mockups/ # Page mockups
|
|
54
|
+
└── dist/ # Build output (generated)
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Development Workflow
|
|
60
|
+
|
|
61
|
+
### 1. Create a New Component
|
|
62
|
+
|
|
63
|
+
Don't hand-create the files — use the scaffolding CLI, which generates all of them (React/Twig/Web-Component/stories/Figma Code Connect stub/README) following [Component Architecture](./ComponentArchitecture.md)'s conventions and wires the new component into `src/elements.ts`/`src/react.ts` for you:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
# Dry-run first to see the file list without writing anything
|
|
67
|
+
pnpm scaffold-component Component MyComponent --dry-run
|
|
68
|
+
|
|
69
|
+
# Then for real
|
|
70
|
+
pnpm scaffold-component Component MyComponent
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Omit `--react`/`--webcomponent`/`--twig` to generate all three formats (the default), or pass specific flags to scaffold only what's needed. If you're using an AI assistant, the `create-mxds-component` skill drives this same CLI and walks through filling in the generated stubs.
|
|
74
|
+
|
|
75
|
+
### 2. Develop Component
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
# Start Storybook in watch mode
|
|
79
|
+
pnpm dev
|
|
80
|
+
|
|
81
|
+
# Edit files with live reload
|
|
82
|
+
# - Write component code
|
|
83
|
+
# - Add styles
|
|
84
|
+
# - Create stories
|
|
85
|
+
# - Test in Storybook
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### 3. Test Component
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
# Run linting
|
|
92
|
+
pnpm lint
|
|
93
|
+
|
|
94
|
+
# Run tests
|
|
95
|
+
pnpm test
|
|
96
|
+
|
|
97
|
+
# Fix formatting
|
|
98
|
+
pnpm format
|
|
99
|
+
|
|
100
|
+
# Type check
|
|
101
|
+
pnpm lint-ts
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### 4. Build
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
# Build for production
|
|
108
|
+
pnpm build
|
|
109
|
+
|
|
110
|
+
# Build Storybook only
|
|
111
|
+
pnpm build-storybook
|
|
112
|
+
|
|
113
|
+
# Build Vite only
|
|
114
|
+
pnpm build-vite
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## Git Workflow
|
|
120
|
+
|
|
121
|
+
### Branching Strategy
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
# Feature branch
|
|
125
|
+
git checkout -b feature/add-carousel
|
|
126
|
+
|
|
127
|
+
# Bug fix branch
|
|
128
|
+
git checkout -b fix/button-hover-state
|
|
129
|
+
|
|
130
|
+
# Documentation branch
|
|
131
|
+
git checkout -b docs/update-readme
|
|
132
|
+
|
|
133
|
+
# Refactor branch
|
|
134
|
+
git checkout -b refactor/simplify-tabs
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### Branch Naming
|
|
138
|
+
|
|
139
|
+
| Type | Prefix | Example |
|
|
140
|
+
| ------------- | ----------- | ------------------------ |
|
|
141
|
+
| New feature | `feature/` | `feature/add-tooltip` |
|
|
142
|
+
| Bug fix | `fix/` | `fix/accordion-overflow` |
|
|
143
|
+
| Documentation | `docs/` | `docs/api-reference` |
|
|
144
|
+
| Refactoring | `refactor/` | `refactor/button-styles` |
|
|
145
|
+
| Performance | `perf/` | `perf/optimize-images` |
|
|
146
|
+
| Tests | `test/` | `test/add-snapshots` |
|
|
147
|
+
| Chore | `chore/` | `chore/update-deps` |
|
|
148
|
+
|
|
149
|
+
### Working on a Branch
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
# 1. Create and switch to branch
|
|
153
|
+
git checkout -b feature/my-feature
|
|
154
|
+
|
|
155
|
+
# 2. Make changes
|
|
156
|
+
# ... edit files ...
|
|
157
|
+
|
|
158
|
+
# 3. Stage changes
|
|
159
|
+
git add .
|
|
160
|
+
|
|
161
|
+
# 4. Commit with Commitizen
|
|
162
|
+
pnpm commit
|
|
163
|
+
|
|
164
|
+
# 5. Push to remote
|
|
165
|
+
git push origin feature/my-feature
|
|
166
|
+
|
|
167
|
+
# 6. Create Pull Request on GitHub
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
## Commit Conventions
|
|
173
|
+
|
|
174
|
+
### Using Commitizen
|
|
175
|
+
|
|
176
|
+
We use **Commitizen** for standardized commit messages:
|
|
177
|
+
|
|
178
|
+
```bash
|
|
179
|
+
# Instead of git commit, use:
|
|
180
|
+
pnpm commit
|
|
181
|
+
|
|
182
|
+
# Follow the prompts:
|
|
183
|
+
# 1. Select type (feat, fix, docs, etc.)
|
|
184
|
+
# 2. Enter scope (optional)
|
|
185
|
+
# 3. Write short description
|
|
186
|
+
# 4. Write longer description (optional)
|
|
187
|
+
# 5. List breaking changes (if any)
|
|
188
|
+
# 6. Reference issues (if any)
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
### Commit Types
|
|
192
|
+
|
|
193
|
+
| Type | Description | Example |
|
|
194
|
+
| ---------- | ----------------------- | --------------------------------- |
|
|
195
|
+
| `feat` | New feature | `feat: add tooltip component` |
|
|
196
|
+
| `fix` | Bug fix | `fix: resolve button hover state` |
|
|
197
|
+
| `docs` | Documentation only | `docs: update API reference` |
|
|
198
|
+
| `style` | Code style (formatting) | `style: fix indentation` |
|
|
199
|
+
| `refactor` | Code refactoring | `refactor: simplify tabs logic` |
|
|
200
|
+
| `perf` | Performance improvement | `perf: optimize image loading` |
|
|
201
|
+
| `test` | Adding/updating tests | `test: add snapshot tests` |
|
|
202
|
+
| `build` | Build system changes | `build: update vite config` |
|
|
203
|
+
| `ci` | CI configuration | `ci: add GitHub Actions` |
|
|
204
|
+
| `chore` | Maintenance tasks | `chore: update dependencies` |
|
|
205
|
+
| `revert` | Revert previous commit | `revert: revert "feat: add X"` |
|
|
206
|
+
|
|
207
|
+
### Commit Message Format
|
|
208
|
+
|
|
209
|
+
```
|
|
210
|
+
type(scope): subject
|
|
211
|
+
|
|
212
|
+
body
|
|
213
|
+
|
|
214
|
+
footer
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
**Examples:**
|
|
218
|
+
|
|
219
|
+
```bash
|
|
220
|
+
# Simple commit
|
|
221
|
+
feat: add carousel component
|
|
222
|
+
|
|
223
|
+
# With scope
|
|
224
|
+
fix(button): resolve hover state issue
|
|
225
|
+
|
|
226
|
+
# With body
|
|
227
|
+
feat: add tooltip component
|
|
228
|
+
|
|
229
|
+
Add a reusable tooltip component with positioning
|
|
230
|
+
options and accessibility features.
|
|
231
|
+
|
|
232
|
+
# With breaking change
|
|
233
|
+
feat!: update button API
|
|
234
|
+
|
|
235
|
+
BREAKING CHANGE: Button now requires 'variant' prop
|
|
236
|
+
instead of 'type'. Update all usage to:
|
|
237
|
+
<Button variant="primary">Click</Button>
|
|
238
|
+
|
|
239
|
+
# With issue reference
|
|
240
|
+
fix: resolve accordion overflow
|
|
241
|
+
|
|
242
|
+
Fixes #123
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
### Commit Best Practices
|
|
246
|
+
|
|
247
|
+
✅ **Do:**
|
|
248
|
+
|
|
249
|
+
- Use present tense ("add feature" not "added feature")
|
|
250
|
+
- Use imperative mood ("move cursor" not "moves cursor")
|
|
251
|
+
- Keep subject line under 50 characters
|
|
252
|
+
- Capitalize subject line
|
|
253
|
+
- Don't end subject line with period
|
|
254
|
+
- Separate subject from body with blank line
|
|
255
|
+
- Wrap body at 72 characters
|
|
256
|
+
- Reference issues/PRs in footer
|
|
257
|
+
|
|
258
|
+
❌ **Don't:**
|
|
259
|
+
|
|
260
|
+
- Commit unrelated changes together
|
|
261
|
+
- Use vague messages ("fix stuff", "updates")
|
|
262
|
+
- Include WIP commits in PR
|
|
263
|
+
- Forget to reference breaking changes
|
|
264
|
+
|
|
265
|
+
---
|
|
266
|
+
|
|
267
|
+
## Pull Request Process
|
|
268
|
+
|
|
269
|
+
### Before Creating PR
|
|
270
|
+
|
|
271
|
+
```bash
|
|
272
|
+
# 1. Update from main
|
|
273
|
+
git checkout main
|
|
274
|
+
git pull origin main
|
|
275
|
+
git checkout your-branch
|
|
276
|
+
git merge main
|
|
277
|
+
|
|
278
|
+
# 2. Fix any issues
|
|
279
|
+
pnpm format
|
|
280
|
+
|
|
281
|
+
# 3. Run full test suite
|
|
282
|
+
pnpm lint
|
|
283
|
+
pnpm test
|
|
284
|
+
|
|
285
|
+
# 4. Build to ensure no errors
|
|
286
|
+
pnpm build
|
|
287
|
+
|
|
288
|
+
# 5. Update snapshots if needed
|
|
289
|
+
pnpm test -- -u
|
|
290
|
+
|
|
291
|
+
# 6. Commit any fixes
|
|
292
|
+
pnpm commit
|
|
293
|
+
|
|
294
|
+
# 7. Push to remote
|
|
295
|
+
git push origin your-branch
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
### Creating the PR
|
|
299
|
+
|
|
300
|
+
1. **Go to GitHub** and create Pull Request
|
|
301
|
+
2. **Fill out template** with:
|
|
302
|
+
- Description of changes
|
|
303
|
+
- Motivation and context
|
|
304
|
+
- Type of change
|
|
305
|
+
- Checklist completion
|
|
306
|
+
- Screenshots (if UI change)
|
|
307
|
+
- Related issues
|
|
308
|
+
|
|
309
|
+
### PR Template
|
|
310
|
+
|
|
311
|
+
```markdown
|
|
312
|
+
## Description
|
|
313
|
+
|
|
314
|
+
Brief description of what this PR does.
|
|
315
|
+
|
|
316
|
+
## Type of Change
|
|
317
|
+
|
|
318
|
+
- [ ] Bug fix (non-breaking change which fixes an issue)
|
|
319
|
+
- [ ] New feature (non-breaking change which adds functionality)
|
|
320
|
+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
|
|
321
|
+
- [ ] Documentation update
|
|
322
|
+
|
|
323
|
+
## Checklist
|
|
324
|
+
|
|
325
|
+
- [ ] Code follows style guidelines
|
|
326
|
+
- [ ] Self-review completed
|
|
327
|
+
- [ ] Comments added for complex code
|
|
328
|
+
- [ ] Documentation updated
|
|
329
|
+
- [ ] No new warnings generated
|
|
330
|
+
- [ ] Tests added/updated
|
|
331
|
+
- [ ] All tests passing
|
|
332
|
+
- [ ] Snapshots reviewed and updated
|
|
333
|
+
- [ ] A11y violations = 0
|
|
334
|
+
- [ ] Storybook stories added
|
|
335
|
+
|
|
336
|
+
## Screenshots (if applicable)
|
|
337
|
+
|
|
338
|
+
Before:
|
|
339
|
+
After:
|
|
340
|
+
|
|
341
|
+
## Related Issues
|
|
342
|
+
|
|
343
|
+
Closes #123
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
### PR Best Practices
|
|
347
|
+
|
|
348
|
+
✅ **Do:**
|
|
349
|
+
|
|
350
|
+
- Keep PRs small and focused
|
|
351
|
+
- Write descriptive title and description
|
|
352
|
+
- Add screenshots for UI changes
|
|
353
|
+
- Request specific reviewers
|
|
354
|
+
- Respond to feedback promptly
|
|
355
|
+
- Update PR based on reviews
|
|
356
|
+
- Keep PR up to date with main
|
|
357
|
+
- Test locally before requesting review
|
|
358
|
+
|
|
359
|
+
❌ **Don't:**
|
|
360
|
+
|
|
361
|
+
- Submit WIP code
|
|
362
|
+
- Mix unrelated changes
|
|
363
|
+
- Ignore review feedback
|
|
364
|
+
- Force push after reviews start
|
|
365
|
+
- Merge without approval
|
|
366
|
+
- Skip CI checks
|
|
367
|
+
|
|
368
|
+
---
|
|
369
|
+
|
|
370
|
+
## Code Review
|
|
371
|
+
|
|
372
|
+
### As a Reviewer
|
|
373
|
+
|
|
374
|
+
**What to check:**
|
|
375
|
+
|
|
376
|
+
1. ✅ **Code quality** - Follows guidelines
|
|
377
|
+
2. ✅ **Functionality** - Works as described
|
|
378
|
+
3. ✅ **Tests** - Adequate coverage
|
|
379
|
+
4. ✅ **Documentation** - Updated if needed
|
|
380
|
+
5. ✅ **Performance** - No obvious issues
|
|
381
|
+
6. ✅ **Security** - No vulnerabilities
|
|
382
|
+
7. ✅ **Accessibility** - WCAG compliant
|
|
383
|
+
8. ✅ **Browser compatibility** - Works cross-browser
|
|
384
|
+
|
|
385
|
+
**Review process:**
|
|
386
|
+
|
|
387
|
+
```bash
|
|
388
|
+
# 1. Check out PR branch
|
|
389
|
+
gh pr checkout 123
|
|
390
|
+
|
|
391
|
+
# 2. Install dependencies
|
|
392
|
+
pnpm install
|
|
393
|
+
|
|
394
|
+
# 3. Start Storybook
|
|
395
|
+
pnpm dev
|
|
396
|
+
|
|
397
|
+
# 4. Test manually
|
|
398
|
+
# - Try all variants
|
|
399
|
+
# - Test keyboard nav
|
|
400
|
+
# - Check responsive
|
|
401
|
+
|
|
402
|
+
# 5. Run tests
|
|
403
|
+
pnpm lint
|
|
404
|
+
pnpm test
|
|
405
|
+
|
|
406
|
+
# 6. Leave review on GitHub
|
|
407
|
+
# - Approve, Request changes, or Comment
|
|
408
|
+
# - Be specific and constructive
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
**Review comments:**
|
|
412
|
+
|
|
413
|
+
```markdown
|
|
414
|
+
# ✅ Good feedback
|
|
415
|
+
|
|
416
|
+
Suggestion: Consider using AbortController here for cleanup.
|
|
417
|
+
See: docs/MemoryManagement.md#event-listeners
|
|
418
|
+
|
|
419
|
+
# ❌ Poor feedback
|
|
420
|
+
|
|
421
|
+
This is wrong.
|
|
422
|
+
```
|
|
423
|
+
|
|
424
|
+
### As the Author
|
|
425
|
+
|
|
426
|
+
**Responding to feedback:**
|
|
427
|
+
|
|
428
|
+
- ✅ Thank reviewers for their time
|
|
429
|
+
- ✅ Ask questions if unclear
|
|
430
|
+
- ✅ Implement requested changes
|
|
431
|
+
- ✅ Explain decisions if disagreeing
|
|
432
|
+
- ✅ Mark conversations as resolved
|
|
433
|
+
- ✅ Request re-review after changes
|
|
434
|
+
|
|
435
|
+
**Making changes:**
|
|
436
|
+
|
|
437
|
+
```bash
|
|
438
|
+
# 1. Make changes based on feedback
|
|
439
|
+
# ... edit files ...
|
|
440
|
+
|
|
441
|
+
# 2. Commit changes
|
|
442
|
+
pnpm commit
|
|
443
|
+
|
|
444
|
+
# 3. Push to same branch
|
|
445
|
+
git push origin your-branch
|
|
446
|
+
|
|
447
|
+
# PR automatically updates!
|
|
448
|
+
|
|
449
|
+
# 4. Re-request review on GitHub
|
|
450
|
+
```
|
|
451
|
+
|
|
452
|
+
---
|
|
453
|
+
|
|
454
|
+
## Release Process
|
|
455
|
+
|
|
456
|
+
### Version Bumping
|
|
457
|
+
|
|
458
|
+
```bash
|
|
459
|
+
# Patch version (0.0.x) - Bug fixes
|
|
460
|
+
pnpm bump-version
|
|
461
|
+
|
|
462
|
+
# Minor version (0.x.0) - New features
|
|
463
|
+
pnpm version minor -m "chore: tag %s"
|
|
464
|
+
|
|
465
|
+
# Major version (x.0.0) - Breaking changes
|
|
466
|
+
pnpm version major -m "chore: tag %s"
|
|
467
|
+
```
|
|
468
|
+
|
|
469
|
+
### Publishing
|
|
470
|
+
|
|
471
|
+
```bash
|
|
472
|
+
# 1. Ensure main is up to date
|
|
473
|
+
git checkout main
|
|
474
|
+
git pull origin main
|
|
475
|
+
|
|
476
|
+
# 2. Bump version
|
|
477
|
+
pnpm bump-version
|
|
478
|
+
|
|
479
|
+
# 3. Build for production
|
|
480
|
+
pnpm build-ci
|
|
481
|
+
|
|
482
|
+
# 4. Publish to npm
|
|
483
|
+
pnpm publish
|
|
484
|
+
|
|
485
|
+
# 5. Push tags
|
|
486
|
+
git push --tags
|
|
487
|
+
```
|
|
488
|
+
|
|
489
|
+
---
|
|
490
|
+
|
|
491
|
+
## Common Tasks
|
|
492
|
+
|
|
493
|
+
### Adding a New Component
|
|
494
|
+
|
|
495
|
+
```bash
|
|
496
|
+
# 1. Scaffold the component (see "Create a New Component" above)
|
|
497
|
+
pnpm scaffold-component Component MyComponent
|
|
498
|
+
|
|
499
|
+
# 2. Fill in the generated stubs
|
|
500
|
+
# - Real props/markup/CSS, story variants, README content
|
|
501
|
+
|
|
502
|
+
# 3. Test
|
|
503
|
+
pnpm dev
|
|
504
|
+
pnpm format
|
|
505
|
+
pnpm lint-classes
|
|
506
|
+
pnpm audit-parity --component MyComponent
|
|
507
|
+
pnpm test
|
|
508
|
+
|
|
509
|
+
# 4. Commit
|
|
510
|
+
pnpm commit
|
|
511
|
+
```
|
|
512
|
+
|
|
513
|
+
### Updating Dependencies
|
|
514
|
+
|
|
515
|
+
```bash
|
|
516
|
+
# Check outdated packages
|
|
517
|
+
pnpm outdated
|
|
518
|
+
|
|
519
|
+
# Update all dependencies
|
|
520
|
+
pnpm update
|
|
521
|
+
|
|
522
|
+
# Update to latest versions
|
|
523
|
+
pnpm update --latest
|
|
524
|
+
|
|
525
|
+
# Check for security issues
|
|
526
|
+
pnpm audit
|
|
527
|
+
|
|
528
|
+
# Fix security issues
|
|
529
|
+
pnpm audit --fix
|
|
530
|
+
|
|
531
|
+
# Commit
|
|
532
|
+
pnpm commit
|
|
533
|
+
```
|
|
534
|
+
|
|
535
|
+
### Fixing a Bug
|
|
536
|
+
|
|
537
|
+
```bash
|
|
538
|
+
# 1. Create bug fix branch
|
|
539
|
+
git checkout -b fix/describe-bug
|
|
540
|
+
|
|
541
|
+
# 2. Reproduce bug
|
|
542
|
+
# - Add failing test if possible
|
|
543
|
+
# - Document steps in PR
|
|
544
|
+
|
|
545
|
+
# 3. Fix bug
|
|
546
|
+
# - Make minimal changes
|
|
547
|
+
# - Don't refactor unrelated code
|
|
548
|
+
|
|
549
|
+
# 4. Verify fix
|
|
550
|
+
pnpm test
|
|
551
|
+
|
|
552
|
+
# 5. Update tests/snapshots
|
|
553
|
+
pnpm test -- -u
|
|
554
|
+
|
|
555
|
+
# 6. Commit
|
|
556
|
+
pnpm commit
|
|
557
|
+
|
|
558
|
+
# 7. Create PR
|
|
559
|
+
```
|
|
560
|
+
|
|
561
|
+
---
|
|
562
|
+
|
|
563
|
+
## Getting Help
|
|
564
|
+
|
|
565
|
+
### Resources
|
|
566
|
+
|
|
567
|
+
- **Documentation**: [docs/README.md](./README.md)
|
|
568
|
+
- **Storybook**: https://mxds.pnx.io
|
|
569
|
+
- **GitHub Issues**: https://github.com/previousnext/mxds/issues
|
|
570
|
+
- **Slack**: #mixtape (internal)
|
|
571
|
+
|
|
572
|
+
### Questions?
|
|
573
|
+
|
|
574
|
+
- 💬 Ask in Slack: #mixtape (internal)
|
|
575
|
+
- 🐛 Report bugs in Issues
|
|
576
|
+
- 💡 Suggest features in Issues
|
|
577
|
+
- 📧 Email: rikki.bochow@previousnext.com.au
|
|
578
|
+
|
|
579
|
+
---
|
|
580
|
+
|
|
581
|
+
## Code of Conduct
|
|
582
|
+
|
|
583
|
+
### Our Pledge
|
|
584
|
+
|
|
585
|
+
We are committed to providing a welcoming and inspiring community for all.
|
|
586
|
+
|
|
587
|
+
### Our Standards
|
|
588
|
+
|
|
589
|
+
✅ **Expected behavior:**
|
|
590
|
+
|
|
591
|
+
- Be respectful and inclusive
|
|
592
|
+
- Welcome newcomers
|
|
593
|
+
- Accept constructive criticism
|
|
594
|
+
- Focus on what's best for the community
|
|
595
|
+
|
|
596
|
+
❌ **Unacceptable behavior:**
|
|
597
|
+
|
|
598
|
+
- Harassment or discrimination
|
|
599
|
+
- Trolling or insulting comments
|
|
600
|
+
- Personal or political attacks
|
|
601
|
+
- Publishing others' private information
|
|
602
|
+
|
|
603
|
+
### Enforcement
|
|
604
|
+
|
|
605
|
+
Report issues to: rikki.bochow@previousnext.com.au
|
|
606
|
+
|
|
607
|
+
---
|
|
608
|
+
|
|
609
|
+
## License
|
|
610
|
+
|
|
611
|
+
By contributing, you agree that your contributions will be licensed under the same license as the project.
|
|
612
|
+
|
|
613
|
+
---
|
|
614
|
+
|
|
615
|
+
## Thank You! 🎉
|
|
616
|
+
|
|
617
|
+
Thank you for contributing to the Mixtape Design System! Your contributions help make the web more accessible and consistent for everyone.
|
|
618
|
+
|
|
619
|
+
---
|
|
620
|
+
|
|
621
|
+
## Related Documentation
|
|
622
|
+
|
|
623
|
+
- [Code Quality Guidelines](./CodeQuality.md)
|
|
624
|
+
- [Component Architecture](./ComponentArchitecture.md)
|
|
625
|
+
- [Testing Guide](./Testing.md)
|
|
626
|
+
- [API Documentation](./API.md)
|