Skip to content

Sync Main to Develop after 1.4.0#1062

Closed
subodhr258 wants to merge 29 commits into
developfrom
main
Closed

Sync Main to Develop after 1.4.0#1062
subodhr258 wants to merge 29 commits into
developfrom
main

Conversation

@subodhr258
Copy link
Copy Markdown
Collaborator

@subodhr258 subodhr258 commented Sep 9, 2025

Since 1.4.0 has been released, this PR merges hotfixes from Main to Develop.

(Not to be squashed and merged)

subodhr258 and others added 29 commits September 2, 2025 12:09
Sync develop to main for 1.4.0
Co-authored-by: KMchaudhary <kuldipkumar.chaudhary@rtcamp.com>
* Provide thumbnail support for vimeo video migration (#1023)

Co-authored-by: KMchaudhary <kuldipkumar.chaudhary@rtcamp.com>

* Fix: CEnable likes for transcoded videos only checked by rtgodam_transcoding_status

---------

Co-authored-by: Kuldip Chaudhary <64731232+KMchaudhary@users.noreply.github.com>
Co-authored-by: KMchaudhary <kuldipkumar.chaudhary@rtcamp.com>
Co-authored-by: opurockey <opu.rockey@gmail.com>
* Provide thumbnail support for vimeo video migration (#1023)

Co-authored-by: KMchaudhary <kuldipkumar.chaudhary@rtcamp.com>

* Fix: Enable likes for transcoded videos only checked by rtgodam_transcoding_status (#1029)

* feat: add support for virtual media thumbnails

* fix: save fetched thumbnail to post meta

* fix: add proper null checks

---------

Co-authored-by: Kuldip Chaudhary <64731232+KMchaudhary@users.noreply.github.com>
Co-authored-by: KMchaudhary <kuldipkumar.chaudhary@rtcamp.com>
Co-authored-by: Rockey Opu <opu.rockey@gmail.com>
Co-authored-by: Subodh Rajpopat <subodh.rajpopat@rtcamp.com>
Co-authored-by: KMchaudhary <kuldipkumar.chaudhary@rtcamp.com>
* resolve error on dashboard page without license

* fix: the Back to video Editor button extends beyond the content width

* fix: captions hiding under control bar

* disable microphone button
Co-authored-by: KMchaudhary <kuldipkumar.chaudhary@rtcamp.com>
Co-authored-by: KMchaudhary <kuldipkumar.chaudhary@rtcamp.com>
Co-authored-by: KMchaudhary <kuldipkumar.chaudhary@rtcamp.com>
* Provide thumbnail support for vimeo video migration (#1023)

Co-authored-by: KMchaudhary <kuldipkumar.chaudhary@rtcamp.com>

* Update the retrasncoding request and add related changes

* Remove unused ajax call

* Reset the transcoding status and meta before retranscode it

* Add retranscoded = 1 in transcode job put request

---------

Co-authored-by: KMchaudhary <kuldipkumar.chaudhary@rtcamp.com>
Co-authored-by: Subodh Rajpopat <subodh.rajpopat@rtcamp.com>
* fix: Virtual Media Logo and Duplicate Vimeo imports

* fix: Fatal error when Vimeo Migration is in progress on Central

* fix: Set share option disabled
It will take the brand image from global setting if added
* fix: gallery block sidebar styles

* fix: folder tree height for gallery block

* fix: edit gallery and add to gallery button styles
* display thumbnail change on selection

* fix thumbnail change effect not being displayed for media library videos
* docs: Update links and content in README files for 1.4.0

* Update readme.txt

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update README.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* docs: Apply feedback changes to README files

* docs: Add missing space

* fix: Format Correction

* docs: Update engagement setting naming

* docs: Update keywords and add Likes, Comments feature screenshot

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 9, 2025 08:47
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 updates the GoDAM plugin version from 1.3.5 to 1.4.0, implementing major new features and improvements including LifterLMS integration, video engagement features, migration tools, and various UI enhancements.

  • Added comprehensive video engagement system with likes and comments functionality
  • Implemented video migration tools for core video blocks and Vimeo videos to GoDAM
  • Added new form integrations for Ninja Forms and MetForm with recorder fields

Reviewed Changes

Copilot reviewed 52 out of 54 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
readme.txt Updated version, features list, changelog, and screenshot references
godam.php Updated plugin version constant from 1.3.5 to 1.4.0
package.json Updated package version to match plugin version
inc/classes/rest-api/class-transcoding.php Enhanced retranscoding to handle virtual media and migrated Vimeo videos
inc/classes/rest-api/class-video-migration.php New comprehensive video migration system for core and Vimeo videos
inc/classes/lifter-lms/ New LifterLMS integration classes and functionality
inc/classes/ninja-forms/ New Ninja Forms integration with GoDAM recorder field
inc/classes/metform/ New MetForm integration for video layer rendering
assets/src/js/lifterlms/ LifterLMS video completion tracking and lesson progression
assets/src/js/godam-player/ Video player enhancements and engagement features
assets/src/css/ UI improvements for media library and video player

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

.style( 'font-size', '14px' )
.style( 'font-weight', 'bold' )
.text( total === 0 ? '0%' : `${ percent.toFixed( 1 ) }%` );
.text( total === 0 ? '0%' : `${ percent?.toFixed( 1 ) }%` );
Copy link

Copilot AI Sep 9, 2025

Choose a reason for hiding this comment

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

The optional chaining operator ?. is being used inconsistently. Line 180 uses playRate?.toFixed( 2 ) and line 190 uses playTime?.toFixed( 2 ), but the original code on these lines didn't have optional chaining. Consider applying optional chaining consistently throughout the function or provide fallback values for undefined cases.

Suggested change
.text( total === 0 ? '0%' : `${ percent?.toFixed( 1 ) }%` );
.text( total === 0 ? '0%' : `${ percent.toFixed( 1 ) }%` );

Copilot uses AI. Check for mistakes.
const watchTimeEl = document.getElementById( 'watch-time' );
if ( watchTimeEl ) {
watchTimeEl.innerText = `${ formatWatchTime( playTime.toFixed( 2 ) ) }`;
watchTimeEl.innerText = `${ formatWatchTime( playTime?.toFixed( 2 ) ) }`;
Copy link

Copilot AI Sep 9, 2025

Choose a reason for hiding this comment

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

Using optional chaining with toFixed() can cause issues. If playTime is undefined, playTime?.toFixed(2) returns undefined, and formatWatchTime(undefined) will likely cause unexpected behavior since the function expects a number. Consider using playTime ?? 0 instead to provide a default value.

Suggested change
watchTimeEl.innerText = `${ formatWatchTime( playTime?.toFixed( 2 ) ) }`;
watchTimeEl.innerText = `${ formatWatchTime( (playTime ?? 0).toFixed( 2 ) ) }`;

Copilot uses AI. Check for mistakes.
$attachment_id = ! empty( $attributes['id'] ) && is_numeric( $attributes['id'] ) ? intval( $attributes['id'] ) : '';

if ( ! empty( $attachment_id ) && empty( get_post_meta( $attachment_id, 'rtgodam_transcoding_job_id', true ) ) ) {
if ( ! empty( $attachment_id ) && 'Transcoded' !== get_post_meta( $attachment_id, 'rtgodam_transcoding_status', true ) ) {
Copy link

Copilot AI Sep 9, 2025

Choose a reason for hiding this comment

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

The condition has been changed from checking for empty rtgodam_transcoding_job_id to checking transcoding status. This is a significant logic change that could affect when engagement features are displayed. Consider adding a comment explaining why this change was made or if both conditions should be checked.

Suggested change
if ( ! empty( $attachment_id ) && 'Transcoded' !== get_post_meta( $attachment_id, 'rtgodam_transcoding_status', true ) ) {
// Engagement features should only be displayed for videos that have completed transcoding
// and have a valid transcoding job ID. Previously, only the job ID was checked, but now
// both conditions are enforced for correctness and clarity.
if (
! empty( $attachment_id ) &&
(
'Transcoded' !== get_post_meta( $attachment_id, 'rtgodam_transcoding_status', true ) ||
empty( get_post_meta( $attachment_id, 'rtgodam_transcoding_job_id', true ) )
)
) {

Copilot uses AI. Check for mistakes.
like_status: likeStatus,
};
apiFetch.use( apiFetch.createNonceMiddleware( nonceData.nonce ) );
apiFetch.use( apiFetch.createNonceMiddleware( nonceData?.nonce ) );
Copy link

Copilot AI Sep 9, 2025

Choose a reason for hiding this comment

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

If nonceData is undefined, nonceData?.nonce will be undefined, which could cause the nonce middleware to malfunction. Consider providing a fallback or early return if nonceData is not available to prevent API calls from failing silently.

Suggested change
apiFetch.use( apiFetch.createNonceMiddleware( nonceData?.nonce ) );
if ( !nonceData || !nonceData.nonce ) {
return Promise.reject(new Error('Nonce data is missing. Cannot send like data.'));
}
apiFetch.use( apiFetch.createNonceMiddleware( nonceData.nonce ) );

Copilot uses AI. Check for mistakes.
<PanelBody title={ __( 'Vimeo video Migration', 'godam' ) } initialOpen={ false }>
<p>
{ __( 'This tool is used to replace WordPress Vimeo Embed blocks with GoDAM Video block.', 'godam' ) }
{ __( 'This tool replaces WordPress Vimeo Embed blocks with GoDAM Video blocks. It does not replace Vimeo videos added in the WordPress Classic Editor.', 'godam' ) }
Copy link

Copilot AI Sep 9, 2025

Choose a reason for hiding this comment

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

[nitpick] This descriptive text provides better clarity about the tool's limitations compared to the previous version. However, consider also mentioning what happens to the original Vimeo embeds after migration (are they preserved, removed, or converted?).

Suggested change
{ __( 'This tool replaces WordPress Vimeo Embed blocks with GoDAM Video blocks. It does not replace Vimeo videos added in the WordPress Classic Editor.', 'godam' ) }
{ __( 'This tool replaces WordPress Vimeo Embed blocks with GoDAM Video blocks, converting the original Vimeo embeds into GoDAM Video blocks. The original Vimeo Embed blocks are not preserved or removed without replacement—they are converted. It does not replace Vimeo videos added in the WordPress Classic Editor.', 'godam' ) }

Copilot uses AI. Check for mistakes.
@@ -30,7 +30,7 @@ const slice = createSlice( {
backward: 10,
},
//custom controls
Copy link

Copilot AI Sep 9, 2025

Choose a reason for hiding this comment

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

The default value for brandingIcon has been changed from false to true. This changes the default UI behavior and should be documented. Consider adding a comment explaining why the branding icon should be shown by default.

Suggested change
//custom controls
//custom controls
/**
* Show branding icon by default to promote brand visibility and provide a consistent user experience.
* This was changed from false to true to align with new design guidelines.
*/

Copilot uses AI. Check for mistakes.
@subodhr258 subodhr258 closed this Sep 9, 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.

5 participants