Skip to content

fix: 视频渲染兜底图失效 - #3344

Merged
Alexzjt merged 1 commit into
nextfrom
fix/video-fallback
May 7, 2026
Merged

Alexzjt merged 1 commit into
nextfrom
fix/video-fallback

Conversation

@xxxxZ-zhang

Copy link
Copy Markdown
Contributor

👀 PR includes

✨ Feature

  • New feature

🎨 Enhance

  • Code style optimization
  • Refactoring
  • Change the UI
  • Improve the performance
  • Type optimization

🐛 Bugfix

  • Solve the issue and close

🔧 Chore

  • Test case
  • Docs / demos update
  • CI / workflow
  • Release version
  • Other ()

📝 Description

🖼️ Screenshot

Before After
image image

⚠️ Breaking Changes

  • Yes
  • No

🔗 Related issue link

🔍 Self-Check before the merge

  • Add or update relevant docs.
  • Add or update relevant demos.
  • Add or update test case.
  • Add or update relevant TypeScript definitions.

@github-actions

github-actions Bot commented May 7, 2026

Copy link
Copy Markdown
Contributor

你好 @xxxxZ-zhang,非常感谢你的贡献.
为了让代码更健壮, 请根据 贡献指南 补充相应单元测试 (文档改动或其他特殊场景除外), 如果有 API 改动, 请修改 相应的文档.
同时请检查 lint 和 test 相关 CI 是否通过, 如果失败, 请点击 [Details] 按钮查看, 并根据日志修复.

Hello, @xxxxZ-zhang, Thanks for your contribution. In order to make the code more robust, please add the corresponding unit tests, and update the docs if there are API changes.
At the same time, please check whether the CI related to lint and test passes. If the CI fails, please click [Details] button to check and repair according to the log.

@github-actions github-actions Bot added the next 2.0-next 版本的问题 label May 7, 2026
@github-actions github-actions Bot added the pr(fix) bug fix label May 7, 2026
@github-actions
github-actions Bot requested a review from Alexzjt May 7, 2026 07:53

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a fallback mechanism for video rendering, allowing a placeholder image to be displayed if a video fails to load or times out. It also prevents the preview interaction and play button from appearing when a fallback image is active. However, a critical issue was identified where the use of a class-level property isFallback in the VideoRenderer singleton will cause race conditions during concurrent cell rendering. Additionally, it is recommended to replace the hardcoded timeout for fallback images with a named constant to improve maintainability.

@codecov-commenter

codecov-commenter commented May 7, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 77.77778% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.57%. Comparing base (ecdc9c8) to head (8fad659).
⚠️ Report is 803 commits behind head on next.

Files with missing lines Patch % Lines
packages/s2-core/src/renderer/VideoRenderer.ts 77.27% 7 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             next    #3344      +/-   ##
==========================================
+ Coverage   75.77%   78.57%   +2.80%     
==========================================
  Files         257      224      -33     
  Lines       11994    12535     +541     
  Branches     2464     2848     +384     
==========================================
+ Hits         9088     9850     +762     
+ Misses       1398      972     -426     
- Partials     1508     1713     +205     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented May 7, 2026 •

Copy link
Copy Markdown
Contributor

Size Change: +476 B (+0.06%)

Total Size: 745 kB

📦 View Changed
Filename Size Change
packages/s2-core/dist/s2-extends.min.js 209 kB +250 B (+0.12%)
packages/s2-core/dist/s2.min.js 312 kB +226 B (+0.07%)
ℹ️ View Unchanged
Filename Size
packages/s2-core/dist/s2.min.css 583 B
packages/s2-react-components/dist/s2-react-components.min.css 2.55 kB
packages/s2-react-components/dist/s2-react-components.min.js 123 kB
packages/s2-react/dist/s2-react.min.css 1.3 kB
packages/s2-react/dist/s2-react.min.js 38.5 kB
packages/s2-vue/dist/s2-vue.min.css 3.8 kB
packages/s2-vue/dist/s2-vue.min.js 54.2 kB

compressed-size-action

@xxxxZ-zhang
xxxxZ-zhang force-pushed the fix/video-fallback branch from 136daf3 to 8fad659 Compare May 7, 2026 08:20
@Alexzjt
Alexzjt merged commit 81a6533 into next May 7, 2026
8 checks passed
@Alexzjt
Alexzjt deleted the fix/video-fallback branch May 7, 2026 08:37
@Alexzjt

Alexzjt commented May 7, 2026

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version @antv/s2-v2.7.1-alpha.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@Alexzjt

Alexzjt commented May 18, 2026

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version @antv/s2-v2.7.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants