Skip to content

Conversation

@myrta2302
Copy link
Contributor

@myrta2302 myrta2302 commented Dec 9, 2025

📄 Description

This PR updates <post-tooltip> so that it now correctly uses the open animation provided by <post-popovercontainer>, which was previously not visible.

Additionally, but not directly connected to the scope of the current ticket it:

  • Removes the animation cancellation logic from the popovercontainer, that seems to not work as expected.
  • Includes a small improvement on the <post-popover> component. (Popover animation has already been enabled in the [bug] fix post-menu animation  #6538 )

🔮 Design review

  • Design review done
  • No design review needed

📝 Checklist

  • ✅ My code follows the style guidelines of this project
  • 🛠️ I have performed a self-review of my own code
  • 📄 I have made corresponding changes to the documentation
  • ⚠️ My changes generate no new warnings or errors
  • 🧪 I have added tests that prove my fix is effective or that my feature works
  • ✔️ New and existing unit tests pass locally with my changes

@myrta2302 myrta2302 linked an issue Dec 9, 2025 that may be closed by this pull request
3 tasks
@changeset-bot
Copy link

changeset-bot bot commented Dec 9, 2025

🦋 Changeset detected

Latest commit: de27e1d

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

This PR includes changesets to release 14 packages
Name Type
@swisspost/design-system-components Minor
@swisspost/design-system-components-angular-workspace Minor
@swisspost/design-system-components-react Minor
@swisspost/design-system-documentation Patch
@swisspost/design-system-nextjs-integration Minor
@swisspost/design-system-components-angular Minor
@swisspost/design-system-changelog-github Minor
@swisspost/design-system-eslint Minor
@swisspost/design-system-icons Minor
@swisspost/internet-header Minor
@swisspost/design-system-styles Minor
@swisspost/design-system-styles-primeng-workspace Minor
@swisspost/design-system-styles-primeng Minor
@swisspost/design-system-tokens Minor

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

@myrta2302 myrta2302 changed the base branch from main to 6538-bug-fix-post-menu-animation December 9, 2025 13:11
…ot-actually-applied-to-post-tooltip-and-popover
@swisspost-bot
Copy link
Contributor

swisspost-bot commented Dec 9, 2025

Related Previews

@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 9, 2025

@myrta2302 myrta2302 marked this pull request as ready for review December 9, 2025 13:30
@myrta2302 myrta2302 requested a review from a team as a code owner December 9, 2025 13:30
@myrta2302 myrta2302 requested review from leagrdv and removed request for a team and leagrdv December 9, 2025 13:30
@leagrdv leagrdv requested review from oliverschuerch and removed request for leagrdv December 12, 2025 10:38
@Method()
async toggle(target: HTMLElement, force?: boolean) {
await this.popoverRef.toggle(target, force);
this.focusFirstEl();
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we avoid calling this function when we toggle to false?

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 'm not sure. I had already thought about it, but currently post-menu toggle() calls it like this - without the force: this.popoverRef.toggle(target). Would you prefer updating the post-menu?

Copy link
Contributor

Choose a reason for hiding this comment

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

No, that was not my intention, but it would be good if it does the exact same thing.

I just had a look into your PR and I think we can do the following to optimize this functionality:

async toggle(target: HTMLElement, force?: boolean) {
  // you can expect the popoverRef.toggle function to return the current state (after toggling), no matter if we call it with a `force` parameter or not ;) 
  const isOpen = await this.popoverRef.toggle(target, force);
  if (isOpen) this.focusFirstEl();
}

This is only a micro improvement reguarding performance, but it could save us from unwanted side-effects.

@Method()
async toggle(target: HTMLElement, force?: boolean) {
await this.popoverRef.toggle(target, force);
this.focusFirstEl();
Copy link
Contributor

Choose a reason for hiding this comment

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

No, that was not my intention, but it would be good if it does the exact same thing.

I just had a look into your PR and I think we can do the following to optimize this functionality:

async toggle(target: HTMLElement, force?: boolean) {
  // you can expect the popoverRef.toggle function to return the current state (after toggling), no matter if we call it with a `force` parameter or not ;) 
  const isOpen = await this.popoverRef.toggle(target, force);
  if (isOpen) this.focusFirstEl();
}

This is only a micro improvement reguarding performance, but it could save us from unwanted side-effects.

@myrta2302 myrta2302 changed the title feat(components): enables open animation on <post tooltip> feat(components): enable open animation on <post tooltip> Dec 19, 2025
@myrta2302 myrta2302 changed the base branch from 6538-bug-fix-post-menu-animation to main December 22, 2025 13:55
@myrta2302 myrta2302 requested a review from a team as a code owner December 22, 2025 13:55
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.

Animation not actually applied to <post-tooltip> and <post-popover>

4 participants