design-system icon indicating copy to clipboard operation
design-system copied to clipboard

chore(components): improved URL handling for `post-icon` component

Open schaertim opened this issue 8 months ago โ€ข 5 comments

๐Ÿ“„ Description

Improved URL handling in post-icon component:

I changed the order of which "sources" are used to determine the origin and the slug. Now the order is the following: base property > base tag > data-post-icon-base meta attribute. This means that if we have both a base tag and a meta attribute present the url built using the information in the base tag first and only if either the origin/slug part are missing it takes them from the meta attribute. I also changed how a root path ("/") is interpreted. Before it would not count as a slug and would therefore be ignored.

๐Ÿš€ Demo

If applicable, please add a screenshot or video to illustrate the changes.


๐Ÿ“ Checklist

  • โœ… My code follows the style guidelines of this project
  • ๐Ÿ› ๏ธ I have performed a self-review of my own code
  • ๐Ÿ“„ I have made corresponding changes to the documentation
  • โš ๏ธ My changes generate no new warnings or errors
  • ๐Ÿงช I have added tests that prove my fix is effective or that my feature works
  • โœ”๏ธ New and existing unit tests pass locally with my changes

schaertim avatar Mar 27 '25 12:03 schaertim

๐Ÿฆ‹ Changeset detected

Latest commit: a967ed3790148b7b2456e19ed0a5f0d0a5ed3d32

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 12 packages
Name Type
@swisspost/design-system-components Minor
@swisspost/design-system-components-angular-workspace Patch
@swisspost/design-system-components-react Minor
@swisspost/design-system-documentation Patch
@swisspost/design-system-components-angular Minor
@swisspost/design-system-nextjs-integration Patch
@swisspost/design-system-styles Minor
@swisspost/design-system-tokens Minor
@swisspost/design-system-icons Minor
@swisspost/design-system-styles-primeng Minor
@swisspost/internet-header Patch
@swisspost/design-system-styles-primeng-workspace Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

changeset-bot[bot] avatar Mar 27 '25 12:03 changeset-bot[bot]

Related Previews

  • https://preview-5109--swisspost-design-system-next.netlify.app

swisspost-bot avatar Mar 27 '25 12:03 swisspost-bot

Approved

leagrdv avatar Apr 29 '25 08:04 leagrdv

You must have Developer access to commit code to Swiss Post on Vercel. If you contact an administrator and receive Developer access, commit again to see your changes.

Learn more: https://vercel.com/docs/accounts/team-members-and-roles/access-roles#team-level-roles

vercel[bot] avatar May 06 '25 11:05 vercel[bot]