feat(elements): Enable Blueprint animations#4718
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughAdds a reusable ChangesBlueprint animations
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Storybook
participant AnimationDecorator
participant BlueprintProvider
participant Story
Storybook->>AnimationDecorator: render story
AnimationDecorator->>BlueprintProvider: set animation phases enabled
BlueprintProvider->>Story: render wrapped story
Possibly related PRs
Suggested labels: Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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 @.storybook/preview.tsx:
- Around line 33-47: Update withBlueprintAnimations in .storybook/preview.tsx so
Chromatic explicitly disables both animationsPhase1Enabled and
animationsPhase2Enabled for all wrapped components, including their nested
BlueprintProvider instances; retain the existing enabled configuration for
non-Chromatic runs.
In `@src/elements/common/withBlueprintAnimations.tsx`:
- Around line 15-26: Update the WithBlueprintAnimations wrapper to destructure
enableBlueprintAnimations before rendering Component, forwarding only the
remaining props so the HOC-only control prop cannot reach wrapped DOM elements.
Add a regression test using a DOM-facing child that verifies the control prop is
not rendered as an attribute.
🪄 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: c2c55441-2ad1-43c4-b541-7dc19de20c7f
📒 Files selected for processing (11)
.storybook/preview.tsxsrc/elements/common/__tests__/withBlueprintAnimations.test.tsxsrc/elements/common/withBlueprintAnimations.tsxsrc/elements/content-explorer/ContentExplorer.tsxsrc/elements/content-picker/ContentPicker.jssrc/elements/content-preview/ContentPreview.jssrc/elements/content-sharing/ContentSharing.jssrc/elements/content-sharing/ContentSharingV2.tsxsrc/elements/content-sidebar/ContentSidebar.jssrc/elements/content-uploader/ContentUploader.tsxsrc/features/presence/PresenceAvatarList.tsx
f5221ff to
ee33922
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 `@src/elements/common/withBlueprintAnimations.tsx`:
- Around line 9-16: Rename the exported control prop in BlueprintAnimationsProps
and its resolution in withBlueprintAnimations to enableBlueprintAnimations,
preserving the existing boolean and per-phase behavior. Update
src/elements/common/withBlueprintAnimations.tsx lines 9-16 and the resolver at
line 53; replace animationsEnabled inputs in
src/elements/common/__tests__/withBlueprintAnimations.test.tsx lines 50-105 and
verify enableBlueprintAnimations is not forwarded to the rendered element.
🪄 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 Plus
Run ID: d33b4ab9-8aa0-4c19-a746-3baf8b1b850b
⛔ Files ignored due to path filters (1)
src/features/presence/__tests__/__snapshots__/Presence.test.js.snapis excluded by!**/*.snap
📒 Files selected for processing (11)
.storybook/preview.tsxsrc/elements/common/__tests__/withBlueprintAnimations.test.tsxsrc/elements/common/withBlueprintAnimations.tsxsrc/elements/content-explorer/ContentExplorer.tsxsrc/elements/content-picker/ContentPicker.jssrc/elements/content-preview/ContentPreview.jssrc/elements/content-sharing/ContentSharing.jssrc/elements/content-sharing/ContentSharingV2.tsxsrc/elements/content-sidebar/ContentSidebar.jssrc/elements/content-uploader/ContentUploader.tsxsrc/features/presence/PresenceAvatarList.tsx
🚧 Files skipped from review as they are similar to previous changes (8)
- src/elements/content-picker/ContentPicker.js
- src/elements/content-sidebar/ContentSidebar.js
- src/elements/content-sharing/ContentSharingV2.tsx
- src/elements/content-uploader/ContentUploader.tsx
- src/elements/content-preview/ContentPreview.js
- src/elements/content-explorer/ContentExplorer.tsx
- .storybook/preview.tsx
- src/elements/content-sharing/ContentSharing.js
ee33922 to
0bce84c
Compare
Animations will be turned on by default in all elements. Opt out with `animationsEnabled={false}`.
0bce84c to
4ff5fa3
Compare
Merge Queue Status
This pull request spent 10 minutes 21 seconds in the queue, with no time running CI. Waiting for any of
All conditions
ReasonThe merge conditions cannot be satisfied due to failing checks Failing checks: HintYou may have to fix your CI before adding the pull request to the queue again. Tick the box to put this pull request back in the merge queue (same as
|
Enables Blueprint animations in Elements (Explorer, Picker, Preview, Sidebar, Uploader, Sharing, Presence)
animationsEnabled={false}.animationsEnabled={{ animationsPhase1Enabled: true }}Followup: animations phase 3 is in progress in Blueprint, we should add when they ship it.
Summary by CodeRabbit
New Features
Tests