Skip to content

Implement Manage Versions feature in media library#1815

Draft
shreyasikhar wants to merge 12 commits into
developfrom
feat/media-versions
Draft

Implement Manage Versions feature in media library#1815
shreyasikhar wants to merge 12 commits into
developfrom
feat/media-versions

Conversation

@shreyasikhar
Copy link
Copy Markdown
Member

@shreyasikhar shreyasikhar commented Apr 23, 2026

This pull request introduces a new "Manage Versions" modal for media attachments, along with associated UI and style improvements. The modal allows users to view, add, activate, and delete different versions of a media file in the admin interface. Key changes include the addition of the modal template, extensive new SCSS for modal styling, and enhancements to UI component organization.

Screen.Recording.2026-05-21.at.3.49.38.PM.mov

New "Manage Versions" Modal Functionality:

  • Added the print_manage_versions_media_template method to class-assets.php, which injects a WordPress media modal template for managing media versions in the admin footer. The modal supports listing versions, activating a version, adding new versions, and deleting versions, with dynamic UI updates and accessibility features.

Styling and UI Enhancements:

  • Introduced comprehensive SCSS for .rtgodam-manage-versions-modal, defining layout, overlay, card, header, toolbar, version list, and action buttons for a polished modal experience.
  • Updated .attachment-video-actions styles to also apply to .manage-versions-container, ensuring consistent flex layout for version management controls.

Snackbar Improvements:

  • Refactored snackbar background color logic: removed the default background from #godam-snackbar and added new classes .godam-snackbar-error and .godam-snackbar-success for contextual feedback. [1] [2]

- Introduced a new modal for managing media versions, including actions to set a version as active and delete versions.
- Implemented AJAX handlers for fetching media versions, switching active versions, and deleting versions.
- Enhanced the snackbar notification system to provide feedback on actions related to media versions.
- Updated the media library JavaScript to integrate the new Manage Versions feature and handle user interactions.
- Added a template for the Manage Versions modal in the admin footer.
@shreyasikhar shreyasikhar self-assigned this Apr 23, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 15, 2026

🔍 WordPress Plugin Check Report

❌ Status: Failed

📊 Report

🎯 Total Issues ❌ Errors ⚠️ Warnings
15 1 14

❌ Errors (1)

📁 readme.txt (1 error)
📍 Line 🔖 Check 💬 Message
0 outdated_tested_upto_header Tested up to: 6.9 < 7.0. 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 (14)

📁 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/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/05/21/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/05/21/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

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.

1 participant