Skip to content

fix: Update link to docs about snap metadata#5618

Merged
steverydz merged 1 commit intomainfrom
WD-34693-metadata-docs-page-links-to-404
Mar 11, 2026
Merged

fix: Update link to docs about snap metadata#5618
steverydz merged 1 commit intomainfrom
WD-34693-metadata-docs-page-links-to-404

Conversation

@steverydz
Copy link
Copy Markdown
Contributor

@steverydz steverydz commented Mar 11, 2026

Done

  • Updates a link which leads to a 404 page
  • Adds a redirect so the legacy link redirects to the new page

How to QA

Testing

  • This PR has tests
  • No testing required (explain why): Link change only

Security

  • Security considerations for review (list them):
    • Examples:
    • Access control: users can only access their own data
    • Input: user input is validated and sanitised
    • Sensitive data: secret or private data is not exposed in any way
    • ...
  • This PR has no security considerations (explain why): Link change only

Issue / Card

Fixes https://warthogs.atlassian.net/browse/WD-34693

Screenshots

n/a

UX Approval

  • This PR does not require UX approval
  • This PR does require UX approval (add context):

@webteam-app
Copy link
Copy Markdown

@steverydz steverydz marked this pull request as ready for review March 11, 2026 09:53
Copilot AI review requested due to automatic review settings March 11, 2026 09:53
Copy link
Copy Markdown
Contributor

@abbiesims abbiesims left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@steverydz steverydz merged commit 298262d into main Mar 11, 2026
18 checks passed
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +407 to +408
</a>
.
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Suggested change
</a>
.
</a>.

Copilot uses AI. Check for mistakes.
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">
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
<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"
>

Copilot uses AI. Check for mistakes.
Comment thread redirects.yaml
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/
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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

Copilot uses AI. Check for mistakes.
@steverydz steverydz deleted the WD-34693-metadata-docs-page-links-to-404 branch March 11, 2026 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants