Problem/Motivation
AI Media generates images, SVGs and videos from the Media Library. It moved from a private GitHub repository to drupal.org, and needs what a first public release needs: a canonical repository, CI, a project page and README, styling that follows the admin theme, core HTMX, a settings page, and the docs and tests every Vardot-maintained module ships.
Steps to reproduce
N/A
Proposed resolution
Done (merged into 1.0.x):
- git.drupalcode.org is the canonical repository, on 1.0.x with the existing history. The 1.0.x-dev release is out.
- !1 GitLab CI on the
drupal/gitlab_templates, and the README. - !2 Require
enshrined/svg-sanitize^1.0, since every 0.x release has advisories. - !3 Follow the active admin theme: Claro, Gin and Default Admin.
- !5 Ship less custom CSS and JS (
ai-media.admin.css,ai-media.admin.js), and generate with core HTMX instead of Form API AJAX. - !6 A settings page at
/admin/config/ai/ai-media: Media Library tabs, generators, description, name and alternative text, files and providers. - !7 Follow the Vardot module standard: GitLab templates, docs on GitLab Pages, README outline and a Varbase E2E suite.
In progress, in one merge request:
- !20 Safety, AI Prompts, AI Context, Add media and editorial UX: guardrail stops and AI tags on every call, plain error messages, generating on core's Add media page, a Safety tab that picks one of the site's guardrail sets, AI Prompts for the generator prompts, AI Media as an AI Context consumer type (no submodule), a static or animated SVG generator, and the experimental video generator in AI Media itself, off by default, and a per-generator Media Library tab setting.
- Documents are not part of AI Media: the document generator was taken out, so AI Media no longer needs
dompdf/dompdforleague/commonmark. A generator from another module still plugs in the same way.
!4 is superseded: its changes reached 1.0.x with !5. !8 to !19 are closed in favour of !20.
Remaining tasks
- ✅ File an issue
- ✅ Addition/Change/Update/Fix
- ✅ Push the existing history to a 1.0.x branch on git.drupalcode.org
- ✅ Make 1.0.x the default branch
- ✅ Create the 1.0.x-dev release
- ✅ Replace the placeholder project page
- ✅ Add GitLab CI using the drupal/gitlab_templates
- ✅ Write the README for the first public release
- ✅ Follow the active admin theme (Claro, Gin, Default Admin)
- ✅ Ship less custom CSS and JS
- ✅ Generate with core HTMX
- ✅ Settings page
- ✅ Follow the Vardot module standard (templates, docs, E2E suite)
- ❌ Safety, AI Prompts, AI Context, Add media and editorial UX (!20)
- ❌ Take documents out of AI Media (!20)
- ❌ Make github.com/Vardot/ai_media a mirror
- ✅ Testing to ensure no regression
- ❌ Automated unit/functional testing coverage
- ❌ Developer Documentation support
- ❌ User Guide Documentation support
- ➖ UX/UI designer responsibilities
- ✅ Accessibility and Readability
- ❌ Reviewed by a human
- ❌ Code review by maintainers
- ❌ Full testing and approval
- ❌ Credit contributors
- ❌ Review with the product owner
- ❌ Update Release Notes
- ❌ Release
User interface changes
- The "Generate … with AI" tabs follow the active admin theme, with the theme's own "New" flag where it has one.
- Generate and Generate again update the form in place with core HTMX. Enter in the Name field no longer starts a new generation.
Screenshots, on Varbase 11 with Gin, real OpenAI and Anthropic results (MR !20):
Review a generated image: name and alternative text prefilled from the description, a preview and a full size link, then save
Review a generated SVG, sanitized, made with Anthropic
Generate on core's Add media page, with examples, the provider disclosure and the cost line
Settings: the Safety tab picks one of the site's own guardrail sets
API changes
- Requires Drupal core
^11.3(core HTMX),drupal/ai^1.5andenshrined/svg-sanitize^1.0. - No longer requires
dompdf/dompdforleague/commonmark: there is no document generator. - Assets renamed to
css/ai-media.admin.cssandjs/ai-media.admin.js.
Data model changes
- The settings page adds keys to
ai_media.settings. No update hooks: missing keys fall back to defaults at runtime. - No document media source or document media type.
Release notes snippet
- First public release of AI Media: generate images, SVGs and videos with AI from the Media Library.
AI-Generated: Yes
| Comment | File | Size | Author |
|---|---|---|---|
| #37 | ai-media-issue-settings-safety.png | 165.53 KB | rajab natshah |
| #37 | ai-media-issue-add-media.png | 116.73 KB | rajab natshah |
| #37 | ai-media-issue-svg-review.png | 77.48 KB | rajab natshah |
| #37 | ai-media-issue-image-review.png | 145.59 KB | rajab natshah |
| #19 | issue-03-review-crop.png | 167.75 KB | rajab natshah |
Issue fork ai_media-3631526
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3631526-generate-in-own-types
changes, plain diff MR !22
- 3631526-tab-after-matching-format
changes, plain diff MR !21
- 3631526-safety-and-editorial-ux
changes, plain diff MR !20
- 3631526-settings
changes, plain diff MR !6
- 3631526-vardot-standard
changes, plain diff MR !7
- 3631526-core-htmx
changes, plain diff MR !5
- 3631526-admin-theme-support
changes, plain diff MR !3
- 3631526-gitlab-ci-readme
changes, plain diff MR !1
- 3631526-svg-sanitize-1x
changes, plain diff MR !2
- 3631526-ai-tab-single-type
changes, plain diff MR !23
- 3631526-docs-screenshots
changes, plain diff MR !19
- 3631526-video-submodule
changes, plain diff MR !18
- 3631526-generate-action
changes, plain diff MR !17
- 3631526-settings-order
changes, plain diff MR !16
- 3631526-form-polish
changes, plain diff MR !15
- 3631526-safety-tab
changes, plain diff MR !14
- 3631526-context-consumer
changes, plain diff MR !13
- 3631526-ai-prompts
changes, plain diff MR !12
- 3631526-single-preview
changes, plain diff MR !11
- 3631526-media-add
changes, plain diff MR !10
- 3631526-moderation-errors
changes, plain diff MR !9
- 3631526-guardrail-stops
changes, plain diff MR !8
- 3631526-less-css-js
changes, plain diff MR !4
Comments
Comment #2
rajab natshahComment #3
rajab natshahPushed the existing history to
1.0.xon git.drupalcode.org as-is: 4 commits, HEAD8a53edf(Short media names, and a readable line length on wide screens). GitLab set1.0.xas the default branch.CI and README follow in an MR on this issue fork.
AI-Generated: Yes
Comment #5
rajab natshahComment #8
rajab natshahComment #9
rajab natshahTested on a fresh Drupal 11.4.10 with PHP 8.4 and AI 1.5.1, with AI Media installed from the merge request branch.
onload,<script>and remotehref, and keeps the drawing^0.22 || ^1.0still lets in svg-sanitize 0.22.0, which has three advisoriesOpened MR !2 to require
^1.0only. Pipeline green.Real image, video and document generation not tested here, as there is no provider key on the test site.
Moving to Needs review for MR !2.
Comment #11
rajab natshahComment #18
rajab natshahComment #19
rajab natshahComment #36
rajab natshahUpdated the issue summary: documents are not part of AI Media anymore, !6 and !7 merged, and the remaining work is in !20.
Comment #37
rajab natshahReplaced the screenshots in the issue summary with the current ones from MR !20.
Comment #38
rajab natshahUpdated the issue summary: the Figma submodule is out of AI Media for now (!20).
Comment #39
rajab natshahUpdated the issue summary: AI Context needs no submodule any more (!20).
Comment #40
rajab natshahUpdated the issue summary: video is part of AI Media again, off by default, and each generator can drop its Media Library tab (!20).
Comment #47
rajab natshah✅ Released ai_media-1.0.0-alpha1