Repository navigation
feat(admin): show meta robots above the canonical link, and update the screenshot - #77
Merged
Merged
Conversation
The robots setting is changed far more often than the canonical link or the Open Graph type, so it now comes right after the snippet preview: title, description, (keywords), snippet preview, meta robots, canonical link, Open Graph type. Only the order of the fields in the edit form changes. The field ids, the names and the stored JSON stay the same.
The old screenshot came from the Bolt 5 admin: a French group label, 70-character limits on both fields, the removed Shortlink field and outdated help texts. The new one shows the SEO tab in the Bolt 6.1.10 admin with the default config, in English, with the meta robots field above the canonical link. It is taken at 2x for high-DPI screens.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR has two commits:
feat(admin): moves the Meta Robots Tag field above the Canonical Link field in the SEO field's edit form.docs(readme): replacesscreenshots/screenshot.png, the image in the README's "Setup" section, with an up-to-date Bolt 6 screenshot that shows the new order.It replaces #75, which only updated the screenshot.
1. Field order
The robots setting is changed far more often than the canonical link or the Open Graph type, so it now comes right after the snippet preview:
Only the order of the fields in the form changes. In
templates/seo.html.twig, two{{ block() }}lines swap places. The field ids, the input names, the stored JSON and the front-end output stay the same.seo.jsfinds the fields by id, so it does not depend on their order.A new test,
SeoFieldTemplateTest::testFieldsAreRenderedInTheAdminOrder, renders the whole field and checks the order. It fails onmain.2. Screenshot
The old screenshot came from the Bolt 5 admin:
The new screenshot:
keywords_lengthis0by default;seofield added topagesas the README describes. English example values were typed into the form, so the snippet preview shows the live title, the postfix and the description. Nothing was saved;Tests
vendor/bin/phpunit: OK (144 tests).npm test: 22 pass, 1 fail. The failing test, "typing in the SEO shortlink input persists it", also fails onmain. test: drop the removed shortlink field from the seo.js tests #74 fixes it.