-
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 a heading-level property to the post-accordion #3067
feat(components): add a heading-level property to the post-accordion #3067
Conversation
🦋 Changeset detectedLatest commit: 38267c2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 14 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 |
Related Previews |
/** | ||
* Defines the hierarchical level of the `post-accordion-item` headers within the headings structure. | ||
*/ | ||
@Prop() readonly headingLevel?: HeadingLevel; |
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.
I did not make it required to avoid a breaking change.
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.
Should we add a default value here? I mean, there was a default value (2), when we had the prop on the post-accordion-item.
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.
The post-accordion-item still has a default value that will be used if the property is not defined on the post-accordion.
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.
Does this make sence, our would it be better to get the default value allways from the post-accordion component?
post-accordion headingLevel (default value of 2, not required)
post-accordion-item headingLevel (no default value, required)
Would this make more sence? Would it be a breaking change? What do you think?
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.
Removing the default title level from the post-accordion element would be a drastic change in my opinion.
We can always add a default to the post-accordion too, but that would be difficult to maintain because the two defaults need to be in sync. Also, it wouldn't fit this idea.
packages/documentation/src/stories/components/accordion/accordion.stories.ts
Outdated
Show resolved
Hide resolved
packages/documentation/src/stories/components/accordion/accordion.stories.ts
Outdated
Show resolved
Hide resolved
packages/documentation/src/stories/components/accordion/accordion.stories.ts
Outdated
Show resolved
Hide resolved
packages/documentation/src/stories/components/accordion/accordion.stories.ts
Outdated
Show resolved
Hide resolved
packages/documentation/src/stories/components/accordion/accordion.stories.ts
Outdated
Show resolved
Hide resolved
packages/documentation/src/stories/components/accordion/accordion.stories.ts
Outdated
Show resolved
Hide resolved
/** | ||
* Defines the hierarchical level of the `post-accordion-item` headers within the headings structure. | ||
*/ | ||
@Prop() readonly headingLevel?: HeadingLevel; |
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.
Should we add a default value here? I mean, there was a default value (2), when we had the prop on the post-accordion-item.
packages/documentation/src/stories/components/accordion/accordion-item.stories.ts
Outdated
Show resolved
Hide resolved
4712175
to
0831bc8
Compare
'Defines the hierarchical level of the accordion item header within the headings structure.' + | ||
'<span className="mb-mini alert alert-warning alert-sm">' + | ||
'<code>heading-level</code> on <code>post-accordion-item</code> is deprecated. ' + | ||
'Set it directly on the parent <code>post-accordion</code>.' + | ||
'</span>', |
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 we move this description into the component file (as jsdoc block) or is there a problem with the alert?
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.
Good idea! I had to add some custom logic but the deprecation message is now linked to the jsDocs
Quality Gate passedIssues Measures |
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @swisspost/[email protected] ### Minor Changes - Added a `heading-level` property on the `post-accordion` component to set the heading level of all `post-accordion-item` children at once. (by [@alizedebray](https://github.com/alizedebray) with [#3067](#3067)) ### Patch Changes - Merged the card-control, checkbox-card and radio button card docs pages and updated the choice-card-control styles. (by [@oliverschuerch](https://github.com/oliverschuerch) with [#2847](#2847)) - Fixed high-contrast-mode for card-control component. (by [@oliverschuerch](https://github.com/oliverschuerch) with [#2995](#2995)) - Fixed the `post-accordion-item` chevron no longer rotating. (by [@alizedebray](https://github.com/alizedebray) with [#3081](#3081)) - Updated dependencies: - @swisspost/[email protected] ## @swisspost/[email protected] ### Minor Changes - Added a `heading-level` property on the `post-accordion` component to set the heading level of all `post-accordion-item` children at once. (by [@alizedebray](https://github.com/alizedebray) with [#3067](#3067)) ## @swisspost/[email protected] ### Minor Changes - Added icon number 2585. (by [@swisspost-bot](https://github.com/swisspost-bot) with [#3018](#3018)) - Added icons number 2586, 2587 and 2588. (by [@swisspost-bot](https://github.com/swisspost-bot) with [#3077](#3077)) ## @swisspost/[email protected] ### Minor Changes - Added the option for a Button animation to the left. (by [@davidritter-dotcom](https://github.com/davidritter-dotcom) with [#2865](#2865)) ### Patch Changes - Fixed missing chevron in valid and invalid select entries. (by [@alizedebray](https://github.com/alizedebray) with [#3075](#3075)) - Updated popover styles. - Removed popover `min-width` and updated `max-width`. - Simplyfied popover arrow size definition. - Removed `:focus` selector fom `.text-auto` utility class (by [@imagoiq](https://github.com/imagoiq) with [#2926](#2926)) - Merged the card-control, checkbox-card and radio button card docs pages and updated the choice-card-control styles. (by [@oliverschuerch](https://github.com/oliverschuerch) with [#2847](#2847)) - Fixed high-contrast-mode for card-control component. (by [@oliverschuerch](https://github.com/oliverschuerch) with [#2995](#2995)) - Added missing focus ring on checkbox and radio button groups. (by [@alizedebray](https://github.com/alizedebray) with [#3063](#3063)) ## @swisspost/[email protected] ### Patch Changes - Fixed display issue with long user/company names being cut off in the user dropdown. (by [@alizedebray](https://github.com/alizedebray) with [#3071](#3071)) - Updated dependencies: - @swisspost/[email protected] ## @swisspost/[email protected] ### Patch Changes - Updated dependencies: - @swisspost/[email protected] ## @swisspost/[email protected] ## @swisspost/[email protected] ### Minor Changes - Added a `heading-level` property on the `post-accordion` component to set the heading level of all `post-accordion-item` children at once. (by [@alizedebray](https://github.com/alizedebray) with [#3067](#3067)) ### Patch Changes - Updated dependencies: - @swisspost/[email protected] ## @swisspost/[email protected] ### Minor Changes - Added the option for a Button animation to the left. (by [@davidritter-dotcom](https://github.com/davidritter-dotcom) with [#2865](#2865)) ### Patch Changes - Updated storybook version to 8 (by [@renovate](https://github.com/apps/renovate) with [#2797](#2797)) - Updated the post-accordion documentation: explicitly set the `collapsed` property to `true`, simplified `collapsed` property usage examples, and corrected misnamed `close-others` property to `multiple`. (by [@alizedebray](https://github.com/alizedebray) with [#3066](#3066)) - Merged the card-control, checkbox-card and radio button card docs pages and updated the choice-card-control styles. (by [@oliverschuerch](https://github.com/oliverschuerch) with [#2847](#2847)) - Fixed high-contrast-mode for card-control component. (by [@oliverschuerch](https://github.com/oliverschuerch) with [#2995](#2995)) - Fixed the product card border missing in the documentation page. (by [@alizedebray](https://github.com/alizedebray) with [#3057](#3057)) - Updated dependencies: - @swisspost/[email protected] - @swisspost/[email protected] - @swisspost/[email protected] - @swisspost/[email protected] - @swisspost/[email protected] ## @swisspost/[email protected] ### Patch Changes - Merged the card-control, checkbox-card and radio button card docs pages and updated the choice-card-control styles. (by [@oliverschuerch](https://github.com/oliverschuerch) with [#2847](#2847)) - Fixed high-contrast-mode for card-control component. (by [@oliverschuerch](https://github.com/oliverschuerch) with [#2995](#2995)) - Updated dependencies: - @swisspost/[email protected] - @swisspost/[email protected] ## @swisspost/[email protected] ### Patch Changes - Updated dependencies: - @swisspost/[email protected] - @swisspost/[email protected] - @swisspost/[email protected] ## @swisspost/[email protected] ### Patch Changes - Updated dependencies: - @swisspost/[email protected] ## @swisspost/[email protected] ### Patch Changes - Updated dependencies: - @swisspost/[email protected] ## @swisspost/[email protected] ### Patch Changes - Updated dependencies: - @swisspost/[email protected] - @swisspost/[email protected] - @swisspost/[email protected] --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Alizé Debray <[email protected]> Co-authored-by: Alizé Debray <[email protected]>
No description provided.