You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .cursor/rules/patternfly-vibe-coding.mdc
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -13,8 +13,8 @@ This rule applies to all code generation, refactoring, and review tasks involvin
13
13
14
14
## Documentation to Reference
15
15
- The root `README.md`
16
-
- The `documentation/README.md` file, which serves as the table of contents for all documentation in the `documentation/` directory and its subdirectories. Use this file to discover and navigate all relevant rules, guidelines, and best practices for PatternFly development.
17
-
- All markdown files referenced by `documentation/README.md`.
16
+
- The `ai-documentation/README.md` file, which serves as the table of contents for all documentation in the `ai-documentation/` directory and its subdirectories. Use this file to discover and navigate all relevant rules, guidelines, and best practices for PatternFly development.
17
+
- All markdown files referenced by `ai-documentation/README.md`.
18
18
19
19
## Rule
20
20
- **Always consult the above documentation before generating or editing any PatternFly code.**
Copy file name to clipboardExpand all lines: ai-documentation/components/data-display/README.md
+8-1Lines changed: 8 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -212,4 +212,11 @@ Key integration patterns from this example include:
212
212
213
213
> **Note:** Always consult the latest PatternFly Data View documentation and demo source code for the most up-to-date usage patterns and best practices.
214
214
- [PatternFly React Data View GitHub](https://github.com/patternfly/react-data-view)
215
-
- [PatternFly Data View NPM](https://www.npmjs.com/package/@patternfly/react-data-view)
215
+
- [PatternFly Data View NPM](https://www.npmjs.com/package/@patternfly/react-data-view)
216
+
217
+
## Empty State Button Placement Rules
218
+
219
+
- ✅ **Place all buttons in an EmptyState inside the `EmptyStateFooter` component.**
220
+
- ✅ **Group each row of buttons within an `EmptyStateActions` container inside the `EmptyStateFooter`.**
221
+
- ✅ **Use a separate `EmptyStateActions` for each row of actions if multiple rows are needed.**
222
+
- ❌ **Do not place buttons directly inside `EmptyState` or `EmptyStateBody`.**
- ❌ **Don't override component internals** - Use provided props and APIs
24
24
25
+
### Tokenss
26
+
- ✅ **ALWAYS use PatternFly tokens** - Use `pf-t-` prefixed classes over `pf-v6-` classes (e.g., `var(--pf-t--global--spacer--sm)` not `var(--pf-v6-global--spacer--sm)`)
27
+
25
28
### Text Components (v6+)
26
29
```jsx
27
30
// ✅ Correct
@@ -43,7 +46,7 @@ import { UserIcon } from '@patternfly/react-icons';
43
46
### Styling Rules
44
47
45
48
- ✅ **Use PatternFly utilities** - Before writing custom CSS
46
-
- ✅ **Use semantic design tokens** for custom CSS (e.g., `var(--pf-v6-global--primary-color--light)`), not base tokens with numbers (e.g., `--pf-v6-global--Color--100`) or hardcoded values
49
+
- ✅ **Use semantic design tokens** for custom CSS (e.g., `var(--pf-t--global--text--color--regular)`), not base tokens with numbers (e.g., `--pf-t--global--text--color--100`) or hardcoded values
47
50
- ❌ **Don't mix PatternFly versions** - Stick to v6 throughout
<Card className="pf-v6-u-height-100"> {/* Force card to full height */}
108
+
<Card className="pf-v6-u-h-100"> {/* Force card to full height */}
108
109
<CardBody>
109
110
<Text className="pf-v6-u-text-align-center"> {/* Center text when component doesn't provide prop */}
110
111
Centered content
@@ -116,35 +117,35 @@ Use utility classes only when:
116
117
## Design Token Rules
117
118
118
119
### Use Semantic PatternFly Tokens for Custom CSS
119
-
- ✅ **Use semantic tokens** (e.g., `--pf-v6-global--primary-color--light`) for custom CSS. These tokens do not end in numbers and are intended for application-level styling.
120
-
- ❌ **Don't usebase tokens** (which end in numbers, e.g., `--pf-v6-global--Color--100`) for custom CSS. Base tokens are for internal PatternFly use and may change.
120
+
- ✅ **Use semantic tokens** (e.g., `--pf-t--global--text--color--regular`) for custom CSS. These tokens do not end in numbers and are intended for application-level styling.
121
+
- ❌ **Don't usebase tokens** (which end in numbers, e.g., `--pf-t--global--text--color--100`) for custom CSS. Base tokens are for internal PatternFly use and may change.
0 commit comments