Skip to content

Commit 7a472c6

Browse files
authored
Merge pull request #258 from jeff-phillips-18/ai_enabled
Update to latest from https://github.com/patternfly/patternfly-ai-coding
2 parents 376b249 + 71d6e6b commit 7a472c6

File tree

6 files changed

+69
-20
lines changed

6 files changed

+69
-20
lines changed

ai-documentation/charts/README.md

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22

33
Essential rules for PatternFly Charts implementation using Victory.js and ECharts.
44

5-
## Related Files
6-
- [**Component Architecture**](../guidelines/component-architecture.md) - Chart component structure rules
7-
- [**Performance Optimization**](../troubleshooting/performance.md) - Chart performance considerations
8-
95
## Installation Rules
106

117
### Required Installation
@@ -79,16 +75,44 @@ Module not found: Can't resolve '@patternfly/react-charts'
7975
8076
## Chart Implementation Rules
8177
78+
### Best Practices
79+
80+
### Color families
81+
- Chart color families include
82+
- red-orange
83+
- orange
84+
- yellow
85+
- teal
86+
- green
87+
- blue
88+
- purple
89+
- black
90+
- Use the same brightness of colors first, then use other brightness
91+
- Base: 300
92+
- Lightest: 100
93+
- Darkest: 500
94+
- Second-lightest: 200
95+
- Second-darkest: 400
96+
- Use PatternFly tokens to define your color variables
97+
- --pf-t-chart-color-[color-family]-[brightness]
98+
- example: --pf-t-chart-color-blue-300
99+
- When selecting colors for your chart, adhere to these general rules:
100+
- Within a color family, use the base color first. Then use the other lighter and darker hues.
101+
- Some families have predetermined uses:
102+
- Blue: Use to show success.
103+
- Red-orange: Use to show failure. Do not use this family unless you're communicating failure.
104+
- Other colors: Use for neutral purposes or categories.
105+
82106
### Color Rules
83107
- ✅ **Use PatternFly chart color tokens** - For consistency with design system
84108
- ❌ **Don't use hardcoded colors** - Use design tokens instead
85109
86110
```jsx
87111
// ✅ Correct - Use PatternFly color tokens
88112
const chartColors = [
89-
'var(--pf-t--chart--color--blue--300)',
90-
'var(--pf-t--chart--color--green--300)',
91-
'var(--pf-t--chart--color--orange--300)'
113+
'var(--pf-t--chart--color--[color family 1]--300)',
114+
'var(--pf-t--chart--color--[color family 2]--300)',
115+
'var(--pf-t--chart--color--[color family 3]--300)'
92116
];
93117
94118
<ChartDonut data={data} colorScale={chartColors} />
@@ -239,7 +263,8 @@ const LazyChart = lazy(() => import('./HeavyChart'));
239263
## Quick Reference
240264
- **[PatternFly Charts README](https://github.com/patternfly/patternfly-react/tree/main/packages/react-charts#readme)** - Installation and usage
241265
- **[Victory.js Documentation](https://formidable.com/open-source/victory/)** - Chart library documentation
242-
- **[PatternFly Chart Guidelines](https://www.patternfly.org/charts/about)** - Design guidelines
266+
- **[PatternFly Chart Guidelines](https://www.patternfly.org/charts/about-charts)** - Design guidelines
267+
- **[PatternFly Chart Colors](https://www.patternfly.org/charts/colors-for-charts)** - Colors for charts
243268
244269
## Reference Documentation
245270

ai-documentation/components/layout/README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,13 @@ PatternFly layout components provide the foundation for structuring application
1010

1111
## Reference Documentation
1212

13-
- [PatternFly Layouts on PatternFly.org](https://www.patternfly.org/layouts)
13+
- [PatternFly Layouts on PatternFly.org](https://www.patternfly.org/layouts/about-layouts)
1414
- [PatternFly React GitHub Repository](https://github.com/patternfly/patternfly-react)
1515

1616
> For the most up-to-date documentation and code examples, consult both PatternFly.org and the official GitHub repository. When using AI tools, leverage context7 to fetch the latest docs from these sources.
1717
1818
## Related Files
1919

20-
- [**Page Sections**](./page-sections.md) - PageSection component usage and patterns
21-
- [**Grid System**](./grid-system.md) - Grid layout and responsive design
2220
- [**Component Architecture**](../../guidelines/component-architecture.md) - Component structure patterns
2321
- [**Styling Standards**](../../guidelines/styling-standards.md) - Layout styling guidelines
2422

@@ -40,7 +38,7 @@ This section describes common page layout patterns and links to their official d
4038
### Standard Page Layout
4139
A standard page layout typically consists of a page title, an optional toolbar for actions, and a main content area.
4240

43-
- [**Page Layout Documentation**](https://www.patternfly.org/layouts/page)
41+
- [**Page Layout Documentation**](https://www.patternfly.org/components/page/design-guidelines)
4442
- [**Page Component Examples on GitHub**](https://github.com/patternfly/patternfly-react/tree/main/packages/react-core/src/components/Page/examples)
4543

4644
### Dashboard Layout

ai-documentation/resources/external-links.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ External resources are essential for staying current with PatternFly updates, fi
88

99
## Related Files
1010

11-
- [**Code Examples**](./code-examples.md) - Curated, reusable code snippets.
1211
- [**PatternFly Guidelines**](../guidelines/README.md) - Core development principles.
1312
- [**Setup Guide**](../setup/README.md) - Initial project setup resources
1413
- [**Troubleshooting**](../troubleshooting/common-issues.md) - Problem-solving resources
@@ -34,7 +33,7 @@ External resources are essential for staying current with PatternFly updates, fi
3433
- **[Alignment](https://www.patternfly.org/utility-classes/alignment)** - Alignment utility classes
3534
- **[Background color](https://www.patternfly.org/utility-classes/background-color)** - Background utility classes
3635
- **[Box shadow](https://www.patternfly.org/utility-classes/box-shadow)** - Box shadow utility classes
37-
- **[Display](https://www.patternfly.org/utility-classes/accessibility)** - Display utility classes
36+
- **[Display](https://www.patternfly.org/utility-classes/display)** - Display utility classes
3837
- **[Flex](https://www.patternfly.org/utility-classes/flex)** - Flex utility classes
3938
- **[Float](https://www.patternfly.org/utility-classes/float)** - Float utility classes
4039
- **[Sizing](https://www.patternfly.org/utility-classes/sizing)** - Sizing utility classes
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Local Documentation Resources
2+
3+
This document describes the key project-specific documentation files available for PatternFly development. These files provide essential context that complements the official PatternFly documentation.
4+
5+
## Related Files
6+
- [**External References**](./external-links.md) - Links to official PatternFly documentation.
7+
- [**Code Examples**](./code-examples.md) - Curated, reusable code snippets.
8+
- [**PatternFly Guidelines**](../guidelines/README.md) - Core development principles.
9+
10+
## Core Local Documentation Files
11+
12+
The following files are located in the project root and provide critical, specialized context for development. When working with AI assistants, providing relevant sections from these files is crucial for getting accurate and project-specific guidance.
13+
14+
### 1. `patternfly-chatbot.txt`
15+
16+
- **Location**: `../../patternfly-chatbot.txt`
17+
- **Purpose**: The primary context file for the PatternFly Chatbot architecture. It contains component hierarchy, implementation patterns, and best practices specific to chatbot development.
18+
- **When to Use**: Use as the main reference when building, integrating, or troubleshooting any chatbot features.
19+
20+
### 2. `patternfly-react-component-groups.txt`
21+
22+
- **Location**: `../../patternfly-react-component-groups.txt`
23+
- **Purpose**: A comprehensive reference for PatternFly React component groups and specialized libraries. It covers component classifications, dependencies, and advanced composition patterns.
24+
- **When to Use**: Use this file to discover appropriate components for complex UIs, understand component relationships, and implement enterprise-level features.
25+
26+
## How to Use These Files
27+
28+
1. **Consult First**: Before implementing a complex feature, check these files for project-specific patterns.
29+
2. **Provide Context to AI**: When asking for help, copy and paste the most relevant sections from these files into your prompt. This will give the AI the context it needs to provide accurate guidance.
30+
3. **Stay Updated**: These files are living documents. Refer to them for the latest project standards.

ai-documentation/setup/development-environment.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ A properly configured development environment enhances productivity and ensures
1111
- [**Setup Guide**](./README.md) - Initial project setup
1212
- [**Quick Start**](./quick-start.md) - Project initialization steps
1313
- [**Styling Standards**](../guidelines/styling-standards.md) - CSS and styling configuration
14-
- [**Performance Optimization**](../troubleshooting/performance.md) - Development performance tips
1514

1615
## Development Server Configuration
1716

ai-documentation/troubleshooting/common-issues.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ PatternFly development can present various challenges ranging from setup issues
88

99
## Related Files
1010

11-
- [**Component Issues**](./component-issues.md) - Component-specific troubleshooting
12-
- [**Performance Optimization**](./performance.md) - Performance-related problems and solutions
1311
- [**Setup Guide**](../setup/README.md) - Initial setup troubleshooting
1412
- [**External References**](../resources/external-links.md) - Additional troubleshooting resources
1513

@@ -158,9 +156,9 @@ Module not found: Can't resolve '@patternfly/react-charts'
158156
```jsx
159157
// ✅ Correct - Use design tokens
160158
const chartColors = [
161-
'var(--pf-v6-chart-color-blue-300)',
162-
'var(--pf-v6-chart-color-green-300)',
163-
'var(--pf-v6-chart-color-orange-300)'
159+
'var(--pf-t-chart-color-blue-300)',
160+
'var(--pf-t-chart-color-green-300)',
161+
'var(--pf-t-chart-color-orange-300)'
164162
];
165163
<ChartDonut colorScale={chartColors} />
166164
```

0 commit comments

Comments
 (0)