Loading
feat: #3631526 Put each AI media type right after the type it stands in for: Image, then SVG Image
Issue: #3631526
Each AI media type now sits right after the media type it stands in for, in the Media Library tabs and in core's Add media list:
- Generate image with AI right after Image.
- Generate SVG with AI right after SVG Image (it followed Image before, since both types use core's Image source).
How
- The match is the first type whose source the AI source extends and whose field takes the same files (svg for SVG), then any type with that source, then the first image type, as before.
- One helper orders both the Media Library menu and core's Add media list (
/media/add); the?ai=1list is unchanged.
Tested
- On a fresh Varbase 11 (Varbase Starter) site with AI Media 1.0.0-alpha1 and this change, Full HTML Insert Media allowing SVG Image: Image, Generate image with AI, Audio, Remote video, SVG Image, Generate SVG with AI, Video. Featured image: Image, Generate image with AI.
/media/add: Audio, Document, Image, Generated image with AI, Remote audio, Remote video, SVG Image, Generated SVG with AI, Video.- New Kernel test
MediaTypeOrderTest: the SVG match, the fall back to Image, and no image type.
AI-Generated: Yes. Drafted and tested with Claude Code, reviewed by the maintainer.
Checkpoints:
- File an issue
- Addition/Change/Update/Fix
- Testing to ensure no regression
- Automated unit testing coverage
- Automated functional testing coverage
- UX/UI designer responsibilities
- Readability
- Accessibility
- Performance
- Security
- Developer Documentation
- User Guide Documentation
- Reviewed by human
- Code review by maintainers
- Full testing and approval
- Credit contributors
- Review with the product owner
- Release notes snippet
- Release
Edited by Rajab Natshah