-
Notifications
You must be signed in to change notification settings - Fork 14
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
feat(components): add post-tabs component #1181
Conversation
This reverts commit 64d6f5c.
🦋 Changeset detectedLatest commit: f024746 The changes in this PR will be included in the next version bump. This PR includes changesets to release 9 packages
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 |
…//github.com/swisspost/design-system into chore/refactor-utils-from-components-package
Preview environment ready: https://preview-1181--swisspost-web-frontend.netlify.app |
81d9349
to
7c7b236
Compare
7c7b236
to
ab7d140
Compare
packages/components/src/components/post-tab-header/post-tab-header.tsx
Outdated
Show resolved
Hide resolved
packages/components/src/components/post-tab-header/post-tab-header.tsx
Outdated
Show resolved
Hide resolved
packages/components/src/components/post-tab-header/post-tab-header.tsx
Outdated
Show resolved
Hide resolved
packages/components/src/components/post-tab-panel/post-tab-panel.tsx
Outdated
Show resolved
Hide resolved
packages/components/src/components/post-tab-panel/post-tab-panel.tsx
Outdated
Show resolved
Hide resolved
packages/components/src/utils/property-checkers/check-exists.ts
Outdated
Show resolved
Hide resolved
# Conflicts: # packages/components/src/utils/index.ts # packages/components/src/utils/property-checkers/index.ts # pnpm-lock.yaml
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
A lot of slot checks are happening. Can this be simplified? Some thoughts on the API designInstead of checking if things are assigned to the correct slot, we could also auto-assign to the correct slot (by adding slot="heading" to The slot design could be simplified by defining a default slot for panels, additional content will just always be shown in the context of the tabs (maybe authors even want that, e.g. inserting static content between headers and panels). In my opinion, it would be easier if authors only had to deal with the At the moment, tabs get their index themselves based on the order in markup. This might lead to complex to fix issues if there are dynamic tabs that change during runtime and get created in async order. How about we require a prop to link header to panel, e.g. I don't think it's necessary to watch the We could define the interfaces like so: post-tabs post-tab-header post-tab-panel If we move methods to the controller, it's easier to sync the active state. |
Good point, I prevented tab switch when clicking an active tab. |
Co-authored-by: Loïc Fürhoff <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can also open tickets for fixes that we want to deliver later.
packages/components/src/components/post-tab-header/post-tab-header.tsx
Outdated
Show resolved
Hide resolved
packages/components/src/components/post-tab-panel/post-tab-panel.tsx
Outdated
Show resolved
Hide resolved
packages/components/src/components/post-tab-panel/post-tab-panel.tsx
Outdated
Show resolved
Hide resolved
…ader.tsx Co-authored-by: Philipp Gfeller <[email protected]>
Co-authored-by: Philipp Gfeller <[email protected]>
Co-authored-by: Philipp Gfeller <[email protected]>
…el.tsx Co-authored-by: Philipp Gfeller <[email protected]>
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't believe it, but it finally happens.
No description provided.