-
Notifications
You must be signed in to change notification settings - Fork 557
[TOOL-4831] SDK: Fix MediaRenderer not showing poster for 3d models #7387
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TOOL-4831] SDK: Fix MediaRenderer not showing poster for 3d models #7387
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
🦋 Changeset detectedLatest commit: 70e024f The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
""" WalkthroughThe changes update the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant MediaRenderer
participant ImageRenderer
User->>MediaRenderer: Render media (may be 3D model)
alt Media type is 3D model
MediaRenderer->>MediaRenderer: Check for poster image
alt Poster image exists
MediaRenderer->>ImageRenderer: Render poster image
else Poster image missing
MediaRenderer->>MediaRenderer: Log error, render fallback UI
end
else Media type not 3D model
MediaRenderer->>MediaRenderer: Render media as usual
end
Assessment against linked issues
Assessment against linked issues: Out-of-scope changesNo out-of-scope changes found. Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (1)
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (3)
⏰ Context from checks skipped due to timeout of 90000ms (8)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
size-limit report 📦
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7387 +/- ##
==========================================
+ Coverage 52.35% 52.42% +0.06%
==========================================
Files 939 939
Lines 63161 63173 +12
Branches 4217 4223 +6
==========================================
+ Hits 33070 33116 +46
+ Misses 29984 29950 -34
Partials 107 107
🚀 New features to boost your workflow:
|
8943361
to
4495fb9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
.changeset/heavy-ghosts-nail.md
(1 hunks)packages/thirdweb/src/react/web/ui/MediaRenderer/MediaRenderer.test.tsx
(3 hunks)packages/thirdweb/src/react/web/ui/MediaRenderer/MediaRenderer.tsx
(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
- .changeset/heavy-ghosts-nail.md
- packages/thirdweb/src/react/web/ui/MediaRenderer/MediaRenderer.tsx
⏰ Context from checks skipped due to timeout of 90000ms (8)
- GitHub Check: E2E Tests (pnpm, webpack)
- GitHub Check: Size
- GitHub Check: E2E Tests (pnpm, esbuild)
- GitHub Check: E2E Tests (pnpm, vite)
- GitHub Check: Unit Tests
- GitHub Check: Build Packages
- GitHub Check: Lint Packages
- GitHub Check: Analyze (javascript)
🔇 Additional comments (2)
packages/thirdweb/src/react/web/ui/MediaRenderer/MediaRenderer.test.tsx (2)
17-20
: LGTM! Good refactoring for maintainability.The addition of constants for test URLs improves code readability and maintainability by eliminating hardcoded URLs in multiple places.
36-36
: LGTM! Consistent use of the new constant.Good refactoring to use the new
imageLink
constant instead of the hardcoded URL.
packages/thirdweb/src/react/web/ui/MediaRenderer/MediaRenderer.test.tsx
Outdated
Show resolved
Hide resolved
4495fb9
to
b6d2ab7
Compare
Merge activity
|
…7387) <!-- ## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes" If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000): ## Notes for the reviewer Anything important to call out? Be sure to also clarify these in your comments. ## How to test Unit tests, playground, etc. --> <!-- start pr-codex --> --- ## PR-Codex overview This PR focuses on fixing the display of the `poster` in the `MediaRenderer` component for 3D models and adding tests to ensure expected behavior. ### Detailed summary - Updated the `MediaRenderer` component to show a `poster` image for 3D models. - Added a new test case to verify rendering of the `poster` image when a 3D model is provided. - Replaced hardcoded image URL with a constant `imageLink` for clarity in tests. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Fixed an issue where the poster image was not displayed when rendering 3D models in the MediaRenderer component. Now, if a poster image is available, it will be shown as a fallback for unsupported 3D models. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
b6d2ab7
to
70e024f
Compare
PR-Codex overview
This PR focuses on fixing the issue where the
poster
image was not displayed in theMediaRenderer
component for 3D models. It also updates the tests to reflect this new functionality.Detailed summary
poster
image for 3D models in theMediaRenderer
component.MediaRenderer
to include a test case for rendering a poster image when a 3D model is provided.Summary by CodeRabbit