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
Fix FilterPicker `renderSummary` to be evaluated regardless of selection state. The custom summary renderer and `renderSummary={false}` now work correctly even when no items are selected, providing consistent control over trigger content display.
Add `showActionsOnHover` prop to Item component. When enabled, actions are hidden by default and revealed smoothly on hover, focus, or focus-within states using opacity transitions. This provides a cleaner interface while keeping actions easily accessible without content shifting.
Add `Text.Placeholder` variant with disabled opacity styling. This new text variant is useful for displaying placeholder content with reduced visual emphasis.
Copy file name to clipboardExpand all lines: .cursor/rules/documentation.mdc
+45-82Lines changed: 45 additions & 82 deletions
Original file line number
Diff line number
Diff line change
@@ -1,30 +1,18 @@
1
1
---
2
-
description: When updating the component documentation file *.docs.mdx
2
+
description: When creating or updating the component documentation file *.docs.mdx
3
3
alwaysApply: false
4
4
---
5
5
# Component Documentation Guidelines
6
6
7
-
This guide outlines the standards and structure for documenting components in the Cube UI Kit. Following these guidelines ensures consistency, clarity, and comprehensive coverage of component features.
- Start with a clear, concise description of what the component is
171
-
- Follow with scenarios where the component should be used
172
-
- Avoid technical implementation details in the introduction
173
-
174
-
### 2. Properties Documentation
175
-
176
-
#### Base Properties
177
-
- If the component uses `filterBaseProps`, don't list base properties individually
178
-
- Instead, include the link: `Supports [Base properties](/base-properties.md)`
179
-
- Exception: Always document the `qa` property if it has special behavior
180
-
181
-
#### Styling Properties
182
-
- Document each `styles` or `*Styles` property separately
183
-
- For each styling property, list all available tasty sub-elements with descriptions. Count only those sub-elements that are mentioned in tasty styles in the root element inside component and can be overrided by passing an object with a specific key (sub-element name) to `styles` property
184
-
- Format: `ElementName` - Description of what this element represents
185
-
186
-
#### Style Properties
187
-
- List all properties that can be used for direct styling (e.g., `width`, `height`, `padding`)
188
-
- These are properties that map to `tasty` styles without using the `styles` prop
189
-
- Use `src/tasty/styles/list.ts` file to understand how it works.
160
+
### Properties
190
161
191
-
#### React Aria Properties
192
-
- Document all React Aria properties with clear descriptions
193
-
- It's acceptable to rewrite React Aria descriptions for clarity
194
-
- Focus on practical usage rather than technical implementation
162
+
- **Props List**: Use `<Controls of={componentStories.Default} />` - DO NOT manually list props if Controls is used
163
+
- **Base Properties**: Link to `/base-properties.md` instead of listing (unless `qa` has special behavior)
164
+
- **Styling Properties**: Document `styles`/`*Styles` props. List sub-elements that can be overridden (check component's tasty styles)
165
+
- **Style Properties**: List direct styling props (`width`, `height`, etc.) - see `src/tasty/styles/list.ts`
166
+
- **React Aria Properties**: Only document if adding clarifications beyond what Controls shows
195
167
196
-
### 3. Examples
168
+
### Examples
197
169
198
-
- Provide practical, real-world examples written in `jsx` code
199
-
- Avoid styling examples unless it demonstrates essential capabilities
200
-
- Each example should have a clear purpose and title
201
-
- Do not use Storybook's Canvas and Story components for interactive examples
202
-
- Each story should describe a usage case
203
-
- The more sophisticated component, the more stories we need to cover all cases
170
+
- **CRITICAL**: Must include JSX code snippets, not just story references
171
+
- Provide real-world examples with clear purpose
172
+
- Avoid pure styling examples unless demonstrating essential capabilities
173
+
- More sophisticated components need more examples to cover all cases
204
174
205
-
### 4. Modifiers
175
+
### Modifiers
206
176
207
-
- Document all available modifiers that can be passed via the `mods` property
208
-
- Explain how each modifier affects the component's appearance or behavior
209
-
- Include any modifier combinations that have special behavior
177
+
- Document all `mods` property values
178
+
- Explain effects on appearance/behavior
179
+
- Note special modifier combinations
210
180
211
-
### 5. Accessibility Section
181
+
### Accessibility
212
182
213
-
- Include keyboard navigation patterns
214
-
- Document screen reader behavior
215
-
- List relevant ARIA properties and their usage
216
-
- Provide guidance on ensuring accessible implementations
183
+
- Keyboard navigation patterns
184
+
- Screen reader behavior
185
+
- Relevant ARIA properties
186
+
- Accessible implementation guidance
217
187
218
-
### 6. Form Integration
188
+
### Form Integration
219
189
220
-
For input components (TextInput, Select, DatePicker, etc.):
221
-
- Don't duplicate field property documentation
222
-
- Include: "This component supports all [Field properties](/field-properties.md) when used within a Form."
190
+
For input components: "This component supports all [Field properties](/field-properties.md) when used within a Form."
**Important:** Always import `userEvent` and `within` from `'storybook/test'` in story files. This ensures they respect Storybook's configuration (e.g., `testIdAttribute: 'data-qa'` set in `.storybook/preview.jsx`). Do NOT use `@testing-library/react` imports in stories.
106
+
**Important:** Always import `userEvent` and `within` from `'@storybook/test'` in story files. This ensures they respect Storybook's configuration (e.g., `testIdAttribute: 'data-qa'` set in `.storybook/preview.jsx`). Do NOT use `@testing-library/react` imports in stories.
0 commit comments