Feature: The editor's Variant select and the warning on blocks whose variant is gone As an owner or admin writing an article I want to choose a variant when I insert an image from the library, and be warned when a variant used by an image in my article was deleted or disabled So that the article asks the right size and I notice before readers get an error Background: Given the spec of record is docs/design/screens/image-variants.md section 6 and its states 6a to 6e, docs/design/screens/media-picker.md, the board docs/design/source/RenewCMS Screens Image variants.dc.html drawn by VariantsFrame.dc.html And this slice is SPA only: it uses GET /v1/image-variants (owner/admin, features/image-variants.feature) and the media library API unchanged, and builds on features/editor_media_picker.feature, which stays as it is except where this file says so And the Settings screens and the media page are not in this slice And the Variant select is a USelectMenu in the Library tab's selection panel, under the thumbnail row, before the "Alt text (optional)" field And the list of variants is requested with GET /v1/image-variants once per opening of the dialog, when the Library tab first shows an image selection, and only enabled variants are offered And a variant option reads " · · " where the name is capitalised, the dimensions read "400×300", "800 × auto" or "auto × 2400" as in the Settings list, and the format reads WebP, JPEG, PNG or Original; the first option reads "Original · × · " from the selected image And the options are Original first, then the enabled variants in the order the API returns them (name ascending) And the url line under the select shows what will be inserted, in mono 12 px muted: "/static/uploadedImages/" for Original and "/static/uploadedImages/?v=" for a variant (the design's "/media/" is replaced per the design's own implementation notes) And the select label reads "Variant" (medium weight), the control is 40 px high on desktop and 44 px high with 16 px text on mobile, and its open list has 36 px options on desktop and 44 px on mobile with a check on the selected one And the fixture is the library of features/editor_media_picker.feature (north-wall.jpg id 1 stored "1.jpg", 4032 x 3024 JPEG, 3.9 MB) and the variants thumb (cover 400 x 300 webp), card (inside 800 x auto webp), hero (cover 1200 x 630 webp), og (cover 1200 x 630 jpeg), square (cover 600 x 600 jpeg), all enabled, in name order card, hero, og, square, thumb, and "print" disabled And every new English string has a French entry in web/src/i18n/messages.ts, and no comment is added to any file Rule: The Variant select Scenario: Selecting an image shows the select with Original chosen Given the Library tab shows the fixture When the user selects "north-wall.jpg" Then GET /v1/image-variants is sent once And the panel shows the thumbnail row, then the label "Variant" over a select reading "Original · 4032×3024 · JPEG", then the url line "/static/uploadedImages/1.jpg", then the alt text field And "Insert image" is enabled Scenario: The open list offers Original and the enabled variants When the user opens the select Then the options read, in order: | Original · 4032×3024 · JPEG | | Card · 800 × auto · WebP | | Hero · 1200×630 · WebP | | Og · 1200×630 · JPEG | | Square · 600×600 · JPEG | | Thumb · 400×300 · WebP | And "Print" is not offered And the select border is primary with a 1 px primary ring while it is open Scenario: Choosing a variant changes the url line When the user chooses "Hero · 1200×630 · WebP" Then the select reads that option and the url line reads "/static/uploadedImages/1.jpg?v=hero" Scenario: The choice is reset when another image is selected Given "north-wall.jpg" is selected with the variant "Hero" When the user selects "kitchen-after.webp" Then the select reads "Original · 2400×1600 · WEBP" and the url line has no "?v=" Scenario: The variants list is not requested again within one opening Given the user selected one image and then another Then GET /v1/image-variants was sent once Scenario: No variants defined Given GET /v1/image-variants resolves {"items": []} When the user selects "north-wall.jpg" Then the select offers only "Original · 4032×3024 · JPEG" And the help line reads "No variants defined. Add one in Settings → Media → Variants." with an info icon, and "Settings → Media → Variants" links to /settings/media/variants And the url line is not shown Scenario: Only disabled variants count as none Given every variant is disabled Then the select offers only Original and the "No variants defined" help shows Scenario: An SVG offers only Original When the user selects "logo-renew.svg" Then the select offers only "Original · Vector · SVG" and no help line shows Scenario Outline: The variants list fails to load Given GET /v1/image-variants When the user selects "north-wall.jpg" Then the select offers only Original, no error alert shows, and "Insert image" is enabled Examples: | failure | | resolves with a 500 response | | resolves with a 403 response | | never reaches the server | Scenario: Keyboard Given the select has focus Then Enter or Space opens it, the arrow keys move between options, Enter chooses, Escape closes it and returns focus to the select Rule: Inserting a variant Scenario Outline: The inserted url carries the variant Given "north-wall.jpg" is selected with the variant "