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
BodyPortal never uses style, so remove the style parameter from where ToastContainer calls it.
Have Tabs merge style parameters
Address Copilot code review comments
1. Fix Tabs style prop merge order
- Changed from {...style, ...additionalStyle} to {...additionalStyle, ...style}
- Allows consumers to override CSS variables via the style prop
2. Add style prop support to BodyPortal
- Added style to BodyPortalProps type
- Apply style to portal element in useLayoutEffect
- Clean up styles on unmount
- Pass style from BodyPortalToastContainer to BodyPortal
- Fixes z-index CSS variable binding for toast containers
3. Remove unused icon prop from Tooltip
- The icon prop is only used in TooltipGroup, not in Tooltip itself
- Removed from Tooltip destructuring to avoid unused variable
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Fix BodyPortal to avoid teardown/reinsert on style changes
Split the useLayoutEffect into two separate effects:
1. One for portal creation/destruction and non-style props (doesn't depend on style)
2. One for style updates only (depends on style but doesn't remove/reinsert the portal)
This prevents unnecessary DOM churn when only CSS variables/styles change,
which could cause focus loss or UI flicker in portal-based components like
ToastContainer.
Also added comprehensive tests for:
- CSS variable application
- Regular CSS property application
- Style updates without portal removal
- Style cleanup on unmount
- Handling of null/undefined style values
Addresses code review comments about performance and test coverage.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Address Copilot review comments for style handling and prop forwarding
Fix three issues identified in code review:
1. BodyPortal: Convert camelCase to kebab-case for style cleanup
- React style objects use camelCase (e.g., backgroundColor)
- CSS removeProperty expects kebab-case (e.g., background-color)
- Added conversion to prevent style property leaks on unmount
2. BodyPortalToastContainer: Memoize style object
- Fresh style object on each render caused unnecessary portal remounts
- Wrapped style object in useMemo to prevent BodyPortal useLayoutEffect
from triggering on every toast list change
3. Tooltip: Prevent invalid props from reaching AriaTooltip
- icon and ariaLabel are trigger-only props (used by TooltipGroup)
- Now explicitly destructured to avoid spreading them to AriaTooltip
- Prevents invalid DOM attributes and unexpected react-aria behavior
All fixes maintain backward compatibility.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Handle CSS custom property copying
Update ToastContainer.spec.tsx.snap
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-Authored-By: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
0 commit comments