fix(accordion): add default expand icon for AccordionSummary - #556
Conversation
|
Warning Review limit reached
Next review available in: 46 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughAccordionSummary now has a default ChevronDown icon, medium font weight, and hover styling in the Oxygen theme. Accordion Storybook examples add explicit Sequence Diagram(s)sequenceDiagram
participant Storybook
participant OxygenThemeBase
participant AccordionSummary
participant ReactState
participant ExpandIcons
Storybook->>OxygenThemeBase: Load Accordion theme defaults
OxygenThemeBase->>AccordionSummary: Set ChevronDown expand icon
Storybook->>AccordionSummary: Render accessible summary and panel associations
Storybook->>ReactState: Track custom expansion state
ReactState->>AccordionSummary: Provide controlled expansion
AccordionSummary->>ExpandIcons: Render Plus or Minus
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@ajirthan shall we add unit tests for this as well |
Ack. |
… and default expand icon
… and improved documentation
7b365cb to
2c0e9ac
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/oxygen-ui/src/styles/OxygenThemeBase.ts`:
- Around line 181-187: Update the AccordionSummary `root` styling to target the
nested Typography class for `fontWeight`, using the existing medium typography
value; leave the hover background and cursor rules unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 3b0d6601-b98a-49f1-a4be-4a491629578c
📒 Files selected for processing (2)
packages/oxygen-ui-docs/stories/Surfaces/Accordion.stories.tsxpackages/oxygen-ui/src/styles/OxygenThemeBase.ts
…lt and custom expand icons
|
Added unit tests for the theme-default AccordionSummary expand icon (default / override / null) in |
Purpose
Accordions previously had no default disclosure icon, so headers looked like static text and were hard to discover as expandable (#514).
This PR:
expandIcon(ChevronDown) onMuiAccordionSummary, with medium font weight and hover styles for clearer hierarchyid/aria-controls, docs notes, an explicitChevronDownexpandIconstory, and a Plus/Minus custom expand-icon storyRelated Issues
Related PRs
Checklist
Security checks