Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(documentation-v7): migrate the internet header component stories #1822

Merged
merged 16 commits into from Aug 17, 2023

Conversation

alizedebray
Copy link
Contributor

No description provided.

@changeset-bot
Copy link

changeset-bot bot commented Aug 17, 2023

⚠️ No Changeset found

Latest commit: 54edf58

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@swisspost-bot
Copy link
Contributor

swisspost-bot commented Aug 17, 2023

Preview environment ready: https://preview-1822--swisspost-design-system-next-v7.netlify.app
Preview environment ready: https://preview-1822--swisspost-design-system-next.netlify.app

@swisspost-bot
Copy link
Contributor

swisspost-bot commented Aug 17, 2023

Preview environment ready: https://preview-1822--swisspost-design-system-next-v7.netlify.app

<Canvas of={InternetHeaderStories.Default} />

<div className="hide-col-default">
<ArgTypes of={InternetHeaderStories.Default} />
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I used ArgTypes instead of Controls here because currently controls don't work on iframe demos, but an iframe is needed for the logo animation to work properly.

@gfellerph gfellerph added the 📦 migrations Related to the @swisspost/design-system-migrations package label Aug 17, 2023
Comment on lines +224 to +241
// TODO: move to utils
const getAttributes = (args: Args, condition?: (arg: any) => boolean): Args => {
const attrs: { [key: string]: any } = {};

for (const key in args) {
if (args.hasOwnProperty(key) && condition && condition(args[key])) {
const attrKey = key.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();

// Cast boolean false to string so it's displayed in the docs code block. False values are otherwise omitted
attrs[attrKey] = args[key] === false ? 'false' : args[key];
if (typeof args[key] === 'object') {
attrs[attrKey] = JSON.stringify(args[key]);
}
}
}

return attrs;
};
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the move can be part of this PR

@@ -55,7 +46,6 @@ const preview: Preview = {
},
components: resetComponents,
extractArgTypes,
extractComponentDescription,
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure if this line is correct or not or if you need to remove the import

gfellerph and others added 5 commits August 17, 2023 16:14
…n-guide.docs.mdx

Co-authored-by: Loïc Fürhoff <12294151+imagoiq@users.noreply.github.com>
…n-guide.docs.mdx

Co-authored-by: Loïc Fürhoff <12294151+imagoiq@users.noreply.github.com>
…n-guide.docs.mdx

Co-authored-by: Loïc Fürhoff <12294151+imagoiq@users.noreply.github.com>
…n-guide.docs.mdx

Co-authored-by: Loïc Fürhoff <12294151+imagoiq@users.noreply.github.com>
…n-guide.docs.mdx

Co-authored-by: Loïc Fürhoff <12294151+imagoiq@users.noreply.github.com>
@sonarcloud
Copy link

sonarcloud bot commented Aug 17, 2023

Please retry analysis of this Pull-Request directly on SonarCloud.

@gfellerph
Copy link
Member

Created tickets for all open points

@gfellerph gfellerph merged commit 4422186 into main Aug 17, 2023
10 checks passed
@gfellerph gfellerph deleted the 1700-migrate-the-internet-header-component-stories branch August 17, 2023 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 migrations Related to the @swisspost/design-system-migrations package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate the Internet-Header component stories
4 participants