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

feat(components): post-language-switch web component #4044

Merged
merged 31 commits into from
Dec 11, 2024

Conversation

leagrdv
Copy link
Contributor

@leagrdv leagrdv commented Nov 21, 2024

No description provided.

@leagrdv leagrdv linked an issue Nov 21, 2024 that may be closed by this pull request
Copy link

changeset-bot bot commented Nov 21, 2024

🦋 Changeset detected

Latest commit: c15960d

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-documentation Minor
@swisspost/design-system-components Minor
@swisspost/design-system-components-angular-workspace Patch
@swisspost/design-system-components-react Minor
@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-intranet-header Minor
@swisspost/design-system-icons Minor
@swisspost/design-system-migrations Minor
@swisspost/design-system-styles-primeng Minor
@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

@swisspost-bot
Copy link
Contributor

swisspost-bot commented Nov 21, 2024

Related Previews

@leagrdv leagrdv marked this pull request as ready for review November 21, 2024 12:23
@leagrdv leagrdv requested review from a team as code owners November 21, 2024 12:23
@leagrdv leagrdv requested a review from gfellerph November 21, 2024 12:23
Copy link
Member

@gfellerph gfellerph left a comment

Choose a reason for hiding this comment

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

Initial review, just re-request when ready.

@leagrdv leagrdv requested a review from gfellerph December 6, 2024 15:20
@gfellerph gfellerph changed the title feat(components): post-language-option-switch web component feat(components): post-language-switch web component Dec 9, 2024
Comment on lines 27 to 31
/**
* Used on parent component (post-language-switch) to detect elements that are manually added
*/
@Prop() generated: boolean;

Copy link
Member

Choose a reason for hiding this comment

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

This should not be necessary any more.

Comment on lines 28 to 40
/**
* The name of the language switch, which will be used on the dropdown as an ID
*/
@Prop() name: string;

@Watch('name')
validateName(value = this.name) {
checkType(
value,
'string',
'The "name" property of the post-language-switch component must be a string.',
);
}
Copy link
Member

Choose a reason for hiding this comment

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

Can we auto-generate this with UUID? I don't think anyone cares what internal id is being used.

Copy link

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@changesets/[email protected] environment, filesystem, shell +27 2.23 MB changesets-release-bot
npm/@changesets/[email protected] environment, network +1 94.8 kB changesets-release-bot
npm/@cypress/[email protected] None 0 114 kB cypress-npm-publisher
npm/@floating-ui/[email protected] None +2 424 kB atomiks
npm/@kurbar/[email protected] None +2 29.8 kB kurbar
npm/@lit/[email protected] Transitive: environment +2 979 kB lit-robot
npm/@ng-bootstrap/[email protected] None 0 3.32 MB maxokorokov
npm/@ng-bootstrap/[email protected] Transitive: environment, filesystem +12 17.6 MB maxokorokov
npm/@oddbird/[email protected] None 0 262 kB jgerigmeyer
npm/@open-wc/[email protected] None 0 33.6 kB modern-web
npm/@percy/[email protected] environment, filesystem, unsafe Transitive: eval, network, shell +19 1.97 MB percy-admin
npm/@percy/[email protected] eval Transitive: environment, network +1 44.1 kB percy-admin
npm/@popperjs/[email protected] None 0 1.46 MB fezvrasta
npm/@stencil-community/[email protected] None 0 77.3 kB raphaelpor
npm/@stencil/[email protected] None 0 104 kB ionicjs
npm/@stencil/[email protected] None 0 19.8 MB ionicjs
npm/@stencil/[email protected] filesystem 0 72.9 kB ionicjs
npm/@stencil/[email protected] None 0 5.13 MB rwaskiewicz-ionic
npm/@stencil/[email protected] None 0 24.8 kB rwaskiewicz-ionic
npm/@storybook/[email protected] Transitive: filesystem +4 2.22 MB shilman
npm/@storybook/[email protected] None +11 474 kB shilman
npm/@storybook/[email protected] None +2 71 kB shilman
npm/@storybook/[email protected] eval +7 2.54 MB shilman
npm/@storybook/[email protected] None 0 1.24 kB domyen, ghengeveld, jreinhold, ...8 more
npm/@storybook/[email protected] None 0 3.82 kB shilman
npm/@storybook/[email protected] None 0 1.22 kB domyen, ghengeveld, jreinhold, ...8 more
npm/@storybook/[email protected] None 0 1.24 kB domyen, ghengeveld, jreinhold, ...8 more
npm/@storybook/[email protected] None 0 1.53 kB domyen, ghengeveld, jreinhold, ...8 more
npm/@storybook/[email protected] None 0 1.19 kB domyen, ghengeveld, jreinhold, ...8 more
npm/@storybook/[email protected] Transitive: environment, eval, filesystem, network, shell, unsafe +5 3.57 MB shilman
npm/@storybook/[email protected] None +1 66.6 kB shilman
npm/@tokens-studio/[email protected] None +5 2.27 MB jorenbroekema
npm/@tsconfig/[email protected] None 0 2.36 kB typescript-deploys
npm/@types/[email protected] None 0 4.64 kB types
npm/@types/[email protected] None 0 13.9 kB types
npm/@types/[email protected] None 0 57.8 kB types
npm/@types/[email protected] None 0 78.7 kB types
npm/@types/[email protected] None +1 1.12 MB types
npm/@types/[email protected] None 0 9.79 kB types
npm/@types/[email protected] None 0 14.1 kB types
npm/@types/[email protected] None 0 11.9 kB types
npm/@types/[email protected] None 0 2.09 MB types
npm/@types/[email protected] None 0 6.48 kB types
npm/@typescript-eslint/[email protected] None +8 5.41 MB jameshenry
npm/@typescript-eslint/[email protected] Transitive: environment +5 1.44 MB jameshenry
npm/@web-types/[email protected] None 0 6.7 kB piotr.tomiak
npm/[email protected] None +1 2.58 MB rodneyrehm
npm/[email protected] environment Transitive: filesystem +2 2.36 MB ai
npm/[email protected] None 0 46.3 kB willmcpo
npm/[email protected] None 0 9.67 MB xhmikosr
npm/[email protected] None +4 912 kB feedic
npm/[email protected] filesystem 0 22.9 kB cwmma
npm/[email protected] None +1 2.2 MB sapegin
npm/[email protected] None 0 24.4 kB bahmutov
npm/[email protected] None 0 18.7 kB nicholasboll
npm/[email protected] environment, filesystem, shell, unsafe Transitive: eval, network +27 9.69 MB atofstryker

🚮 Removed packages: npm/[email protected]

View full report↗︎

Copy link

🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎

To accept the risk, merge this PR and you will not be notified again.

Alert Package NoteCI
Possible typosquat attack npm/[email protected] ⚠︎
Possible typosquat attack npm/[email protected] ⚠︎

View full report↗︎

Next steps

What is a typosquat?

Package name is similar to other popular packages and may not be the package you want.

Use care when consuming similarly named packages and ensure that you did not intend to consume a different package. Malicious packages often publish using similar names as existing popular packages.

Take a deeper look at the dependency

Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.

Remove the package

If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.

Mark a package as acceptable risk

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of ecosystem/package-name@version specifiers. e.g. @SocketSecurity ignore npm/[email protected] or ignore all packages with @SocketSecurity ignore-all

Copy link

sonarcloud bot commented Dec 11, 2024

@gfellerph gfellerph merged commit 6c79d1c into main Dec 11, 2024
10 checks passed
@gfellerph gfellerph deleted the 3633-component-language-switch branch December 11, 2024 22:12
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/[email protected]

### 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/[email protected]
    -   @swisspost/[email protected]

## @swisspost/[email protected]

### 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/[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]

### Patch Changes

-   Updated dependencies:
    -   @swisspost/[email protected]

## @swisspost/[email protected]



## @swisspost/[email protected]



## @swisspost/[email protected]



## @swisspost/[email protected]

### 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/[email protected]
    -   @swisspost/[email protected]
    -   @swisspost/[email protected]
    -   @swisspost/[email protected]
    -   @swisspost/[email protected]
    -   @swisspost/[email protected]

## @swisspost/[email protected]

### Patch Changes

-   Updated dependencies:
    -   @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]

### Patch Changes

-   Updated dependencies:
    -   @swisspost/[email protected]
    -   @swisspost/[email protected]
    -   @swisspost/[email protected]

## @swisspost/[email protected]

### Patch Changes

-   Updated dependencies:
    -   @swisspost/[email protected]

---------

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.

[component]: Language switch
3 participants