Skip to content

Fix the minor bugs GoDAM plugin detected by Videojet team - #2085

Merged
KMchaudhary merged 4 commits into
developfrom
hotfix/video-jet
Aug 20, 2026
Merged

KMchaudhary merged 4 commits into
developfrom
hotfix/video-jet

Conversation

@KMchaudhary

@KMchaudhary KMchaudhary commented Aug 19, 2026 •

Copy link
Copy Markdown
Collaborator

This pull request makes several improvements to the "Show in lightbox" feature for GoDAM video blocks and Elementor controls, focusing on accessibility, UI consistency, and user experience. The main changes ensure that when a video is set to open in a lightbox, its inline poster state is visually and functionally correct, and that related controls are properly locked or restored as needed. The update also refines the modal's layout and improves the logic for disabling incompatible controls both in the block editor and Elementor.

Lightbox & Modal Behavior Improvements:

  • The modal layout (godam-gallery-v2-modal) now reserves vertical space above the iframe for the close button, ensuring the button is always visible and the modal remains centered regardless of viewport size. This includes support for dvh units for better mobile compatibility.
  • The close button is repositioned to sit outside the iframe, mirroring the video lightbox behavior and preventing overlap with video player controls. Fullscreen modals remove this reserved space and adjust button placement accordingly. [1] [2]

Player Poster and Control Handling:

  • When "Show in lightbox" is enabled, the inline player poster hides all controls except the play icon, ensuring a clear click-to-open experience. When the player is moved into the modal, controls are restored; upon closing, the poster state is reset, including clearing the vjs-has-started flag for correct UI restoration. [1] [2] [3] [4] [5]

Editor and Elementor Control Locking:

  • The block editor now disables hover options not only when autoplay is enabled but also when "Show in lightbox" is on, with clear user feedback. The logic for disabling these options is consolidated and clarified. [1] [2] [3] [4] [5]
  • Elementor controls now support dual locking: Muted and Hover Option controls are disabled when autoplay is on, and Hover Option is also disabled when "Show in lightbox" is on. This is managed with new CSS classes and improved logic in the editor JS. [1] [2] [3] [4]

Testing and Maintainability:

  • The modal manager test utilities are updated to support both lightbox and non-lightbox player setups, improving test coverage and clarity. [1] [2] [3]

These changes collectively enhance the reliability, accessibility, and user experience of the lightbox video feature across both the block editor and Elementor environments.

Demos

Gallery block
Screenshot 2026-08-19 at 3 05 59 PM
Screenshot 2026-08-19 at 3 06 53 PM

Hide the Lightbox player controls on lightbox get closed

Screen.Recording.2026-08-19.at.6.22.17.PM.mp4

Copilot AI balanced review requested due to automatic review settings August 19, 2026 13:10

Copilot AI 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.

Pull request overview

Moves the gallery modal close button outside the desktop video area while retaining an overlaid mobile layout.

Changes:

  • Reserves vertical space above desktop videos for the close button.
  • Adds responsive viewport sizing and iframe corner rounding.
  • Repositions the mobile close button to the top-left.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@github-actions

github-actions Bot commented Aug 19, 2026 •

Copy link
Copy Markdown

🔍 WordPress Plugin Check Report

❌ Status: Failed

📊 Report

🎯 Total Issues ❌ Errors ⚠️ Warnings
17 1 16

❌ Errors (1)

📁 readme.txt (1 error)
📍 Line 🔖 Check 💬 Message
0 outdated_tested_upto_header Tested up to: 7.0 < 7.1. The "Tested up to" value in your plugin is not set to the current version of WordPress. This means your plugin will not show up in searches, as we require plugins to be compatible and documented as tested up to the most recent version of WordPress.

⚠️ Warnings (16)

📁 readme.txt (2 warnings)
📍 Line 🔖 Check 💬 Message
0 mismatched_plugin_name Plugin name "GoDAM - Organize WordPress Media Library & File Manager with Unlimited Folders for Images, Videos & more" is different from the name declared in plugin header "GoDAM".
0 trademarked_term The plugin name includes a restricted term. Your chosen plugin name - "GoDAM - Organize WordPress Media Library & File Manager with Unlimited Folders for Images, Videos & more" - contains the restricted term "wordpress" which cannot be used at all in your plugin name.
📁 composer.json (1 warning)
📍 Line 🔖 Check 💬 Message
0 missing_composer_json_file The "/vendor" directory using composer exists, but "composer.json" file is missing.
📁 assets/build/blocks/godam-gallery-v2/render.php (2 warnings)
📍 Line 🔖 Check 💬 Message
15 WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$inner_block_video_ids".
23 WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$inner_block_video_ids".
📁 assets/build/css/main.css (1 warning)
📍 Line 🔖 Check 💬 Message
0 EnqueuedStylesScope This style is being loaded in all contexts.
📁 assets/src/libs/analytics.min.js (5 warnings)
📍 Line 🔖 Check 💬 Message
0 EnqueuedScriptsScope This script is being loaded in all frontend contexts.
0 NonBlockingScripts.NoStrategy This script on http://localhost:8880 (with handle analytics-library) is loaded in the footer. Consider a defer or async script loading strategy instead.
0 NonBlockingScripts.NoStrategy This script on http://localhost:8880/2026/08/20/hello-world/ (with handle analytics-library) is loaded in the footer. Consider a defer or async script loading strategy instead.
0 NonBlockingScripts.NoStrategy This script on http://localhost:8880/sample-page/ (with handle analytics-library) is loaded in the footer. Consider a defer or async script loading strategy instead.
0 NonBlockingScripts.NoStrategy This script on http://localhost:8880/demo-attachment-post/ (with handle analytics-library) is loaded in the footer. Consider a defer or async script loading strategy instead.
📁 assets/build/js/main.min.js (5 warnings)
📍 Line 🔖 Check 💬 Message
0 EnqueuedScriptsScope This script is being loaded in all frontend contexts.
0 NonBlockingScripts.NoStrategy This script on http://localhost:8880 (with handle rtgodam-script) is loaded in the footer. Consider a defer or async script loading strategy instead.
0 NonBlockingScripts.NoStrategy This script on http://localhost:8880/2026/08/20/hello-world/ (with handle rtgodam-script) is loaded in the footer. Consider a defer or async script loading strategy instead.
0 NonBlockingScripts.NoStrategy This script on http://localhost:8880/sample-page/ (with handle rtgodam-script) is loaded in the footer. Consider a defer or async script loading strategy instead.
0 NonBlockingScripts.NoStrategy This script on http://localhost:8880/demo-attachment-post/ (with handle rtgodam-script) is loaded in the footer. Consider a defer or async script loading strategy instead.

🤖 Generated by WordPress Plugin Check Action • Learn more about Plugin Check

@KMchaudhary KMchaudhary changed the title fix(gallery): move modal close button outside the video area Fix the minor bugs GoDAM plugin detected by Videojet team Aug 20, 2026
@subodhr258

Copy link
Copy Markdown
Collaborator

Reviewed the full diff. No blocking issues from me, this looks good.

Checked the substantive logic:

  • Lightbox poster controls (modalManager.js + godam-player.scss): the godam-lightbox-open flag on the wrapper correctly gates the closed-poster CSS (play icon only) against the in-modal state, and clearing hasStarted( false ) on close only for actual lightbox players (not for an ordinary inline player opened by a trigger or deep link) is right. The new tests cover both paths, plus the "no wrapper for an inline player" case.
  • Editor + Elementor control locking: the dual-lock logic is correct. Hover Option carries both godam-elementor-autoplay-locked and godam-elementor-lightbox-locked, so it locks when autoplay OR Show-in-lightbox is on, while Muted stays autoplay-only. The block's hoverOptionsLockedReason, the Elementor applyControlLocks, and the frontend reset in godam-player.php all agree, so a stored hoverSelect can never reach the player.
  • Transcript precedence (the "custom transcript not reflecting" fix): resolving data-transcript-url (the attachment's rtgodam_transcript_path, which is stored as a URL) ahead of the SaaS lookup, with data-transcript-deleted preventing resurrection, is sound and mirrors the audio block. Reading the meta raw rather than godam_get_transcript_path() avoids the blocking SaaS call on public page loads, and bumping RTGODAM_WORK_CACHE_VERSION to v2 correctly invalidates cached payloads that predate the new keys.

The two Copilot points on godam-gallery-v2/style.scss are both valid and worth a quick fix, since they affect the close button (the modal's only exit control) on real devices:

  1. The base @supports (height: 86dvh) override is shadowed on phones by the later @media (max-width: 782px) height: 100vh, so the mobile full-screen modal still uses vh and can sit behind the browser chrome. Add a 100dvh override inside the mobile query.
  2. The close button's right: 0 drops the safe-area clearance above 782px, so on a notched landscape device it can land under the cutout. Offset it inward by env(safe-area-inset-right) when the modal's own margin does not already clear it.

Both are minor. Once those two are in, LGTM.

@subodhr258 subodhr258 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approving. Re-reviewed at 2242bf0b: both CSS points are correctly addressed — the close button is offset by max(0px, env(safe-area-inset-right) - 4vw) for notched landscape, and @supports (height: 100dvh) is added inside the mobile query so the full-screen modal clears browser chrome. Lightbox poster controls, the editor/Elementor dual-lock, and the transcript-precedence fix all check out, with good test coverage.

JS unit tests, PHP unit tests and PHPCS pass. The red POT and Plugin Check are the known pre-existing/expected ones, not caused by this PR.

@KMchaudhary
KMchaudhary merged commit daee7db into develop Aug 20, 2026
3 of 5 checks passed
@KMchaudhary
KMchaudhary deleted the hotfix/video-jet branch August 20, 2026 07:12
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.

3 participants