Skip to content

extract package details header to its own directory#5662

Merged
abbiesims merged 1 commit intomainfrom
WD-24035/extract-package-header
Apr 9, 2026
Merged

extract package details header to its own directory#5662
abbiesims merged 1 commit intomainfrom
WD-24035/extract-package-header

Conversation

@abbiesims
Copy link
Copy Markdown
Contributor

@abbiesims abbiesims commented Apr 9, 2026

Done

  • Extracts package details header into its own directory
  • Groups all logic together to make this easier to move over to charmhub to align package headers
  • No logic changes

How to QA

  • Go to a few snaps in the demo and make sure the header looks the same as on prod

Testing

  • This PR has tests
  • No testing required (explain why): no change in logic

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): no change in logic

Issue / Card

Fixes WD-24035

UX Approval

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

Copilot AI review requested due to automatic review settings April 9, 2026 10:31
@webteam-app
Copy link
Copy Markdown

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

This PR refactors the Snap “package details” header templates by moving the header-related macros into a dedicated templates/store/package_header/ directory to keep the logic co-located and easier to reuse elsewhere (e.g. Charmhub), without intended behavior changes.

Changes:

  • Updated store templates to import package_header from the new store/package_header/ location.
  • Introduced a new templates/store/package_header/ directory containing the extracted header macros.
  • Adjusted internal macro imports within the header components to use the new paths.

Reviewed changes

Copilot reviewed 4 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
templates/store/snap-distro-install.html Updates the package_header macro import path to the new directory.
templates/store/snap-details.html Updates the package_header macro import path to the new directory.
templates/store/package_header/_package_header.html New home for the package_header macro, now importing header helpers from the new directory.
templates/store/package_header/_package_header_data.html Updates internal imports to reference the new package_header sub-macros.
templates/store/package_header/_developer_info.html New extracted macro for rendering developer info with tooltip styling.
templates/store/package_header/_publisher_info.html New extracted macro for rendering publisher info and validation badges.

Copy link
Copy Markdown
Member

@bartaz bartaz left a comment

Choose a reason for hiding this comment

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

LGTM thanks

@abbiesims abbiesims merged commit 80b21a5 into main Apr 9, 2026
18 checks passed
@abbiesims abbiesims deleted the WD-24035/extract-package-header branch April 9, 2026 11:07
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