|
| 1 | +# Copilot PR Instructions for New Component Creation |
| 2 | + |
| 3 | +When submitting a PR for a **new component**, please follow these rules: |
| 4 | + |
| 5 | +## 1. Tab in `apps/web/app/page.tsx` |
| 6 | +- Add a new tab for your component in `apps/web/app/page.tsx`. |
| 7 | +- The tab should allow users to navigate to your new editor. |
| 8 | + |
| 9 | +## 2. Editor in `apps/web/components` |
| 10 | +- Implement the main editor logic and UI in a new file under `apps/web/components`. |
| 11 | +- Name the file appropriately (e.g., `my-component-editor.tsx`). |
| 12 | + |
| 13 | +### Important: |
| 14 | +- Do **not** use other brand names in your editor component. |
| 15 | +- All states, props, and logic should be relevant to postmaker.dev (see `x-editor.tsx` for example). |
| 16 | + |
| 17 | +## 3. Preview in `packages/ui/src` |
| 18 | +- Add a preview component for your new editor in `packages/ui/src`. |
| 19 | +- Name the file appropriately (e.g., `my-component-preview.tsx`). |
| 20 | + |
| 21 | +## Example Structure |
| 22 | +``` |
| 23 | +apps/web/app/page.tsx # Add a new tab for your component |
| 24 | +apps/web/components/ # Add your editor here |
| 25 | +packages/ui/src/ # Add your preview here |
| 26 | +``` |
| 27 | + |
| 28 | +## Checklist for PR Review |
| 29 | +- [ ] Tab added in `apps/web/app/page.tsx` |
| 30 | +- [ ] Editor created in `apps/web/components` |
| 31 | +- [ ] Preview created in `packages/ui/src` |
| 32 | + |
| 33 | +- [ ] No other brand names used in editor component; states are relevant to postmaker.dev |
| 34 | + |
| 35 | +--- |
| 36 | +**PRs that do not follow this structure may be rejected or require changes.** |
0 commit comments