fix: SEO SPA editor last fixes (3/4)

This commit is contained in:
Florian Sylvain committed 2026-10-16 16:31:17 +02:00
1 parent 470584400f
commit cb737b7ae3
19 files changed
+316 -147

No files matched your search

+18 -12
View File
@@ -14,7 +14,7 @@ Feature: Editor: search and sharing, suggestions and "What the frontend gets"
And the SPA never re-implements a suggestion rule. It renders the suggestions, the order and the status the check returns. The copy of each code lives in the SPA and has a French entry
And the suggestion codes are title_long, title_empty, desc_short, desc_long, cover_alt, cover_none, slug_long, no_au, no_h, body_alt and short
And a suggestion's field maps to a link label: seo_title "meta title", seo_description "meta description", cover_image_alt and cover_image_id "cover image", slug "URL slug", author_ids "authors", body "body"
And the soft ranges of the counters are meta title 30 to 60 and description 70 to 160 (docs/design). They colour a counter and never block
And the soft ranges of the counters are meta title 30 to 60 and description 70 to 160 (docs/design), and the social title has no counter. They colour a counter and never block
And suggestions never disable Save, "Save and publish" or Publish
And the sample article is 12, "How we price a bathroom renovation", online on the site Renew (renew.example, id 1), slug "how-we-price-a-bathroom-renovation", with no SEO field set, and the author "Inès Duarte"
And the sample cover media is "north-wall.jpg" (the site social image) and the sample panel values are those of the board frames "Panel: filled in" and "Panel: outside the soft ranges"
@@ -103,20 +103,19 @@ Feature: Editor: search and sharing, suggestions and "What the frontend gets"
| body | body | focus moves to the article body in the editor |
| author_ids | authors | the "Site and authors" section opens and focus moves to its list |
@not-in-design
Scenario Outline: Copy of the codes the design does not draw
Scenario Outline: Copy of the other codes, as the board draws it
Given the check answers the code "<code>" with params <params>
Then the message reads "<message>" and has a French entry
Examples:
| code | params | message |
| title_empty | {} | The meta title is empty. |
| desc_long | {"length": 170, "max": 160} | The description is 170 characters. About 70 to 160 reads best in results. |
| cover_none | {} | This article has no cover image. |
| slug_long | {"length": 80, "max": 75} | The URL slug is 80 characters. Shorter addresses are easier to share. |
| no_au | {} | This article has no author. |
| body_alt | {"count": 2} | 2 images in the body have no alt text. |
| short | {"length": 40, "min": 300} | The body is 40 characters. Longer articles tend to do better in search. |
| code | params | message |
| title_empty | {} | No meta title yet. The article title is used instead. |
| desc_long | {"length": 170, "max": 160} | The description is 170 characters. Search engines may cut it off after about 160. |
| cover_none | {} | No cover image. The site's social image is used. |
| slug_long | {"length": 80, "max": 75} | The slug is 80 characters. Shorter addresses are easier to share. |
| no_au | {} | This article has no authors, so the structured data has no author. |
| body_alt | {"count": 2} | 2 images in the body have no alt text. |
| short | {"length": 40, "min": 300} | The article is under 300 words. That is fine for a short note. |
Scenario Outline: The messages the design does draw use the params of the response
Given the check answers the code "<code>" with params <params>
@@ -316,6 +315,7 @@ Feature: Editor: search and sharing, suggestions and "What the frontend gets"
| renew.example/costs | the field shows "Enter a full address starting with https://" and the field is invalid |
| http://renew.example/a | the field shows "Enter a full address starting with https://" |
| https://renew.example/a | no error is shown |
| " https://renew.example/a" | the field shows "Enter a full address starting with https://" (the value is never trimmed) |
| | no error is shown and "Canonical URL: automatic" is shown when collapsed |
Scenario: Canonical refused by the API
@@ -380,7 +380,7 @@ Feature: Editor: search and sharing, suggestions and "What the frontend gets"
Scenario: Saving state
Given "Save changes" was activated
Then while the request runs every field of the panel is disabled at 40%, the status reads "Saving…" and the page behind stays as it was
Then while the request runs every field of the panel is disabled with its text colour unchanged, the status reads "Saving…" and the page behind stays as it was
Scenario: Saved
When the PATCH answers 200
@@ -408,6 +408,12 @@ Feature: Editor: search and sharing, suggestions and "What the frontend gets"
When the user activates Save, presses Ctrl or Cmd S, or activates "Save and publish"
Then the PATCH holds seo_title and the publish request follows for "Save and publish"
Scenario: Save and publish saves a dirty draft first
Given the draft is dirty
When the user activates "Save and publish"
Then the PATCH is sent first and the publish request follows only if it succeeded
And with a clean draft only the publish request is sent
Scenario: Leaving with unsaved SEO edits
Given the draft holds an unsaved SEO value
When the user navigates away
+1 -1
View File
@@ -50,7 +50,7 @@ Setups go in `web/visual/states.ts`, one setup per state, with mocked /v1 and th
Each has a French entry in `web/src/i18n/messages.ts`.
1. The copy of the codes the design does not draw: title_empty, desc_long, cover_none, slug_long, no_au, body_alt, short.
1. The codes now use the board copy: title_empty, desc_long, cover_none, slug_long, no_au, body_alt, short.
2. The other fallback chips (excerpt, site default description, no image) and the chips of the dialog.
3. The check failure text "Couldn't check this article." with "Try again" (no state in the design).
4. The "Go to authors" and "Go to URL slug" labels, and where "Go to body" and "Go to authors" move focus.