fix: Update link to docs about snap metadata#5618
Conversation
There was a problem hiding this comment.
Pull request overview
Updates publisher UI “Learn more” links for snap metadata to point at the new Snapcraft documentation location, and adds a redirect for the legacy /docs/snapcraft-top-level-metadata path.
Changes:
- Update the “Learn more” link in the Publisher Settings form help text to the new docs URL.
- Update the “Learn more” link in the Listing form notification to the new docs URL.
- Add a redirects.yaml entry to redirect the legacy docs path to the new docs page.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| static/js/publisher/pages/PublisherSettings/PublisherSettingsForm.tsx | Points the settings help-text “Learn more” link to the new Snapcraft docs URL. |
| static/js/publisher/pages/Listing/ListingForm/ListingForm.tsx | Points the listing notification “Learn more” link to the new Snapcraft docs URL. |
| redirects.yaml | Redirects legacy /docs/snapcraft-top-level-metadata to the new docs page. |
| </a> | ||
| . |
There was a problem hiding this comment.
The period after the “Learn more” link is now rendered as a separate text node after the closing . In JSX this introduces whitespace/newline between the link and the period, which can display as “Learn more .”. Consider moving the period immediately adjacent to the closing tag or rendering it without leading whitespace (e.g., as its own JSX string).
| </a> | |
| . | |
| </a>. |
| manually edit the Listing page, the automatic updates will | ||
| be turned off.{" "} | ||
| <a href="/docs/snapcraft-top-level-metadata">Learn more</a>. | ||
| <a href="https://documentation.ubuntu.com/snapcraft/stable/reference/project-file/snapcraft-yaml"> |
There was a problem hiding this comment.
This link now points to an external documentation site, but it doesn’t use the external-link styling that’s used for the same destination in the ListingForm notification ("p-link--external"). Consider applying the same class here so users get consistent affordance when leaving snapcraft.io.
| <a href="https://documentation.ubuntu.com/snapcraft/stable/reference/project-file/snapcraft-yaml"> | |
| <a | |
| href="https://documentation.ubuntu.com/snapcraft/stable/reference/project-file/snapcraft-yaml" | |
| className="p-link--external" | |
| > |
| docs/snapcraft-docker-images/?: https://documentation.ubuntu.com/snapcraft/stable/how-to/crafting/specify-a-base/#containers | ||
| docs/snapcraft-tutorials/?: https://documentation.ubuntu.com/snapcraft/stable/tutorials/ | ||
| docs/snapcraft-reference/?: https://documentation.ubuntu.com/snapcraft/stable/reference/ | ||
| docs/snapcraft-top-level-metadata/?: https://documentation.ubuntu.com/snapcraft/stable/reference/project-file/snapcraft-yaml/ |
There was a problem hiding this comment.
The frontend links use the URL without a trailing slash, but this redirect target includes one. If the docs site canonicalizes differently, this can add an extra redirect hop and may not match the QA expectation exactly. Consider aligning the redirect target with the URL used in the UI (or vice versa) for consistency.
| docs/snapcraft-top-level-metadata/?: https://documentation.ubuntu.com/snapcraft/stable/reference/project-file/snapcraft-yaml/ | |
| docs/snapcraft-top-level-metadata/?: https://documentation.ubuntu.com/snapcraft/stable/reference/project-file/snapcraft-yaml |
Done
How to QA
snapcraft.yamlnotification underneath the tabbed navigation links to https://documentation.ubuntu.com/snapcraft/stable/reference/project-file/snapcraft-yamlTesting
Security
Issue / Card
Fixes https://warthogs.atlassian.net/browse/WD-34693
Screenshots
n/a
UX Approval