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

fix(components): update post-list component #4137

Merged
merged 4 commits into from
Dec 10, 2024
Merged

Conversation

alizedebray
Copy link
Contributor

  • Reflected the horizontal property on the host to allow updating the orientation with document.querySelector('post-list).horizontal = true;
  • Reduced the selectors specificity to allow flexible styling
  • Gave a default value to all CSS custom properties

@alizedebray alizedebray requested a review from a team as a code owner December 3, 2024 18:12
Copy link

changeset-bot bot commented Dec 3, 2024

🦋 Changeset detected

Latest commit: 2854432

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

This PR includes changesets to release 16 packages
Name Type
@swisspost/design-system-components Patch
@swisspost/design-system-components-angular-workspace Patch
@swisspost/design-system-components-react Patch
@swisspost/design-system-documentation Patch
@swisspost/design-system-components-angular Patch
@swisspost/design-system-nextjs-integration Patch
@swisspost/design-system-styles Patch
@swisspost/design-system-tokens Patch
@swisspost/design-system-intranet-header Patch
@swisspost/design-system-icons Patch
@swisspost/design-system-migrations Patch
@swisspost/design-system-styles-primeng Patch
@swisspost/internet-header Patch
@swisspost/design-system-intranet-header-workspace Patch
@swisspost/design-system-styles-primeng-workspace Patch
@swisspost/design-system-intranet-header-showcase 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

@alizedebray alizedebray requested a review from myrta2302 December 3, 2024 18:12
@swisspost-bot
Copy link
Contributor

swisspost-bot commented Dec 3, 2024

Related Previews

Copy link
Contributor

@oliverschuerch oliverschuerch left a comment

Choose a reason for hiding this comment

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

This PR needs a changeset imo. At least, because of the specificity change.

Copy link

sonarqubecloud bot commented Dec 6, 2024

@alizedebray alizedebray merged commit 041d6fe into main Dec 10, 2024
10 checks passed
@alizedebray alizedebray deleted the fix-post-list-component branch December 10, 2024 09:50
gfellerph pushed a commit that referenced this pull request Dec 16, 2024
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.

⚠️⚠️⚠️⚠️⚠️⚠️

`main` is currently in **pre mode** so this branch has prereleases
rather than normal releases. If you want to exit prereleases, run
`changeset pre exit` on `main`.

⚠️⚠️⚠️⚠️⚠️⚠️

# Releases
## @swisspost/design-system-components@9.0.0-next.9

### Major Changes

- Updated the `post-togglebutton` component to offer greater
flexibility. You can now control the visibility of elements within the
`post-togglebutton` using the `data-showwhen="toggled"` and
`data-showwhen="untoggled"` attributes. Any content without a
`data-showwhen` attribute will always be visible, regardless of the
toggle state. (by [@alizedebray](https://github.com/alizedebray) with
[#4223](#4223))

### Minor Changes

- Added composable footer component. (by
[@oliverschuerch](https://github.com/oliverschuerch) with
[#4190](#4190))

- Added the `post-megadropdown` component. (by
[@leagrdv](https://github.com/leagrdv) with
[#4177](#4177))

- Added the parts `button` and `body` in the `post-accordion-item`
component, so one can override styles from the outside. (by
[@oliverschuerch](https://github.com/oliverschuerch) with
[#4190](#4190))

- Added the `post-breadcrumb` component to provide a standalone
breadcrumb navigation solution. (by
[@alionazherdetska](https://github.com/alionazherdetska) with
[#4065](#4065))

- Added the css parts `button` and `body` in the `post-accorddion-item`
component. (by [@oliverschuerch](https://github.com/oliverschuerch) with
[#4190](#4190))

- Added the `post-language-switch` component that enables users to
change the language of a page. (by
[@leagrdv](https://github.com/leagrdv) with
[#4044](#4044))

### Patch Changes

- Switched mega dropdown content to one column on mobile. (by
[@leagrdv](https://github.com/leagrdv) with
[#4300](#4300))

- Fixed opening state of megadropdown trigger and expanded detection.
(by [@leagrdv](https://github.com/leagrdv) with
[#4299](#4299))

- Fix tab isolation in nested `post-tabs` components by scoping tab
queries and interactions to the current instance. (by
[@alionazherdetska](https://github.com/alionazherdetska) with
[#4211](#4211))

- Added a fixed slot `post-list-item` on the `post-list-item` host
element, so it is no longer necessary to add it manually. (by
[@oliverschuerch](https://github.com/oliverschuerch) with
[#4190](#4190))

- Fixed the used `headingLevel` in the `post-accorddion-item` component.
The component now uses the value from its closest `post-accorddion`
parent component, if this is specified and falls back to `h2` if not
specified. (by [@oliverschuerch](https://github.com/oliverschuerch) with
[#4190](#4190))

- Updated the `post-togglebutton` to function like a real button,
including support for keyboard navigation and proper focus styles. (by
[@alizedebray](https://github.com/alizedebray) with
[#4242](#4242))

- Fixed an issue with the post-list component where the `horizontal`
property could not be set programmatically. Also, reduced the
specificity of the component's styles to make customization easier. (by
[@alizedebray](https://github.com/alizedebray) with
[#4137](#4137))

-   Updated dependencies:
    -   @swisspost/design-system-styles@9.0.0-next.9
    -   @swisspost/design-system-icons@9.0.0-next.9

## @swisspost/design-system-styles@9.0.0-next.9

### Minor Changes

- Added composable footer component. (by
[@oliverschuerch](https://github.com/oliverschuerch) with
[#4190](#4190))

- Removed outdated portal-specific styles, including
subnavigation-related rules. (by
[@alionazherdetska](https://github.com/alionazherdetska) with
[#4186](#4186))

- Added the possibility to define a `$child-selector` parameter with our
list mixins, so they can be used also with custom elements. (by
[@oliverschuerch](https://github.com/oliverschuerch) with
[#4190](#4190))

- Updated the utility classes for sizing. (by
[@myrta2302](https://github.com/myrta2302) with
[#4012](#4012))

- Updated `.btn-link` to look like a regular link and old `.btn-link` is
now `.btn-tertiary .px-0`. (by [@leagrdv](https://github.com/leagrdv)
with [#4200](#4200))

- Implemented new pixel based sizes. (by
[@myrta2302](https://github.com/myrta2302) with
[#4012](#4012))

### Patch Changes

- Fixed the `btn-icon` styles, so icons within can no longer be rendered
too small, because of the inline-padding on the button. (by
[@oliverschuerch](https://github.com/oliverschuerch) with
[#4190](#4190))

- Fixed the appstore-badge styles to get rid of the inline gap below.
(by [@oliverschuerch](https://github.com/oliverschuerch) with
[#4190](#4190))

## @swisspost/design-system-components-angular@9.0.0-next.9

### Patch Changes

-   Updated dependencies:
    -   @swisspost/design-system-components@9.0.0-next.9

## @swisspost/design-system-components-react@9.0.0-next.9

### Patch Changes

-   Updated dependencies:
    -   @swisspost/design-system-components@9.0.0-next.9

## @swisspost/design-system-intranet-header@9.0.0-next.9

### Patch Changes

-   Updated dependencies:
    -   @swisspost/design-system-styles@9.0.0-next.9

## @swisspost/design-system-styles-primeng@9.0.0-next.9

### Patch Changes

-   Updated dependencies:
    -   @swisspost/design-system-styles@9.0.0-next.9

## @swisspost/design-system-icons@9.0.0-next.9



## @swisspost/design-system-migrations@9.0.0-next.9



## @swisspost/design-system-tokens@9.0.0-next.9



## @swisspost/design-system-documentation@6.0.0-next.10

### Minor Changes

- Added the `post-breadcrumb` component to provide a standalone
breadcrumb navigation solution. (by
[@alionazherdetska](https://github.com/alionazherdetska) with
[#4065](#4065))

- Updated the utility classes for sizing. (by
[@myrta2302](https://github.com/myrta2302) with
[#4012](#4012))

- Added the css parts `button` and `body` in the `post-accorddion-item`
component. (by [@oliverschuerch](https://github.com/oliverschuerch) with
[#4190](#4190))

- Updated `.btn-link` to look like a regular link and old `.btn-link` is
now `.btn-tertiary .px-0`. (by [@leagrdv](https://github.com/leagrdv)
with [#4200](#4200))

- Implemented new pixel based sizes. (by
[@myrta2302](https://github.com/myrta2302) with
[#4012](#4012))

- Added the `post-language-switch` component that enables users to
change the language of a page. (by
[@leagrdv](https://github.com/leagrdv) with
[#4044](#4044))

### Patch Changes

- Updated the `post-togglebutton` component to offer greater
flexibility. You can now control the visibility of elements within the
`post-togglebutton` using the `data-showwhen="toggled"` and
`data-showwhen="untoggled"` attributes. Any content without a
`data-showwhen` attribute will always be visible, regardless of the
toggle state. (by [@alizedebray](https://github.com/alizedebray) with
[#4223](#4223))
-   Updated dependencies:
    -   @swisspost/design-system-components@9.0.0-next.9
    -   @swisspost/design-system-styles@9.0.0-next.9
    -   @swisspost/design-system-components-react@9.0.0-next.9
    -   @swisspost/internet-header@2.0.0-next.9
    -   @swisspost/design-system-tokens@9.0.0-next.9
    -   @swisspost/design-system-icons@9.0.0-next.9

## @swisspost/design-system-components-angular-workspace@1.1.10-next.9

### Patch Changes

-   Updated dependencies:
    -   @swisspost/design-system-components@9.0.0-next.9
    -   @swisspost/design-system-styles@9.0.0-next.9

## @swisspost/internet-header@2.0.0-next.9

### Patch Changes

-   Updated dependencies:
    -   @swisspost/design-system-styles@9.0.0-next.9

## @swisspost/design-system-intranet-header-workspace@3.0.22-next.9

### Patch Changes

-   Updated dependencies:
    -   @swisspost/design-system-styles@9.0.0-next.9

## @swisspost/design-system-intranet-header-showcase@1.0.10-next.9

### Patch Changes

-   Updated dependencies:
    -   @swisspost/design-system-intranet-header@9.0.0-next.9

## @swisspost/design-system-nextjs-integration@0.1.14-next.9

### Patch Changes

-   Updated dependencies:
    -   @swisspost/design-system-styles@9.0.0-next.9
    -   @swisspost/design-system-components-react@9.0.0-next.9
    -   @swisspost/internet-header@2.0.0-next.9

## @swisspost/design-system-styles-primeng-workspace@1.0.6-next.9

### Patch Changes

-   Updated dependencies:
    -   @swisspost/design-system-styles@9.0.0-next.9

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants