Sync Main to Develop after 1.4.0#1062
Conversation
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>
Fix: QA Media library UI
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
Tweak/minor changes
* 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>
There was a problem hiding this comment.
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 ) }%` ); |
There was a problem hiding this comment.
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.
| .text( total === 0 ? '0%' : `${ percent?.toFixed( 1 ) }%` ); | |
| .text( total === 0 ? '0%' : `${ percent.toFixed( 1 ) }%` ); |
| const watchTimeEl = document.getElementById( 'watch-time' ); | ||
| if ( watchTimeEl ) { | ||
| watchTimeEl.innerText = `${ formatWatchTime( playTime.toFixed( 2 ) ) }`; | ||
| watchTimeEl.innerText = `${ formatWatchTime( playTime?.toFixed( 2 ) ) }`; |
There was a problem hiding this comment.
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.
| watchTimeEl.innerText = `${ formatWatchTime( playTime?.toFixed( 2 ) ) }`; | |
| watchTimeEl.innerText = `${ formatWatchTime( (playTime ?? 0).toFixed( 2 ) ) }`; |
| $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 ) ) { |
There was a problem hiding this comment.
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.
| 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 ) ) | |
| ) | |
| ) { |
| like_status: likeStatus, | ||
| }; | ||
| apiFetch.use( apiFetch.createNonceMiddleware( nonceData.nonce ) ); | ||
| apiFetch.use( apiFetch.createNonceMiddleware( nonceData?.nonce ) ); |
There was a problem hiding this comment.
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.
| 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 ) ); |
| <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' ) } |
There was a problem hiding this comment.
[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?).
| { __( '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' ) } |
| @@ -30,7 +30,7 @@ const slice = createSlice( { | |||
| backward: 10, | |||
| }, | |||
| //custom controls | |||
There was a problem hiding this comment.
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.
| //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. | |
| */ |
Since 1.4.0 has been released, this PR merges hotfixes from Main to Develop.
(Not to be squashed and merged)