Skip to content

Fix Video SEO Data Logic Edge Cases and Performance Issues#980

Merged
KMchaudhary merged 2 commits into
developfrom
fix/video-seo-optimization
Sep 29, 2025
Merged

Fix Video SEO Data Logic Edge Cases and Performance Issues#980
KMchaudhary merged 2 commits into
developfrom
fix/video-seo-optimization

Conversation

@Juzar10
Copy link
Copy Markdown
Collaborator

@Juzar10 Juzar10 commented Aug 26, 2025

✨ Overview

ISSUE: #975

  • Fixed Video SEO modal not showing existing data for older videos
  • Resolved multiple API calls during video replacement
  • Improved backward compatibility for blocks created before SEO feature
  • Enhanced user experience when replacing videos

🐞 Bug Fixes

  • Empty Data Detection: Improved detection of empty SEO data objects vs undefined values
  • Multiple API Calls: Reduced 3-4 API requests to single request during video replacement
  • State Interference: Prevented backward compatibility logic from running during video selection process

🚀 Enhancements

  • Batched Updates: Combined multiple calls into single operations for better performance
  • User Customization: SEO data is properly cleared and refreshed when videos are replaced
  • Error Handling: Added fallback logic for API failures during SEO data fetching
  • State Management: flag to prevent unwanted useEffect triggers

📝 Notes

  • I simulated the backward incompatibility by manually removing the SEO data from the block.
  • The user would need to save the post once before they can see the SEO data autofilled.
  • This also means that now user can not diable the SEO feature, if we need to provide this customization we have to add another attribute for that.

Copilot AI review requested due to automatic review settings August 26, 2025 11:12
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR addresses video SEO data logic edge cases and performance issues in the Godam player block. It focuses on fixing issues where existing video SEO data wasn't displaying properly and multiple API calls were being made during video replacement operations.

  • Fixed backward compatibility for blocks created before the SEO feature was implemented
  • Optimized video replacement workflow by batching API calls and attribute updates
  • Improved state management to prevent unwanted side effects during video selection

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
assets/src/blocks/godam-player/utils/index.js Added isSEODataEmpty utility function to properly detect empty SEO data objects
assets/src/blocks/godam-player/edit.js Implemented backward compatibility logic, optimized video selection with batched updates, and added state management to prevent interference
assets/src/blocks/godam-player/components/VideoSEOModal.js Updated modal to use new utility function and improved data initialization logic

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread assets/src/blocks/godam-player/utils/index.js
Comment thread assets/src/blocks/godam-player/edit.js
Comment thread assets/src/blocks/godam-player/edit.js
Comment thread assets/src/blocks/godam-player/edit.js
@KMchaudhary KMchaudhary merged commit bc17426 into develop Sep 29, 2025
2 checks passed
@KMchaudhary KMchaudhary deleted the fix/video-seo-optimization branch September 29, 2025 11:42
Shekhar0109 pushed a commit to Shekhar0109/godam that referenced this pull request Oct 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants