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

[bug]: Toast does not close/vanish on click on closing-x #4280

Open
aedu-hostettler opened this issue Dec 14, 2024 · 1 comment
Open

[bug]: Toast does not close/vanish on click on closing-x #4280

aedu-hostettler opened this issue Dec 14, 2024 · 1 comment
Labels
🐞 bug Something isn't working 📦 styles Related to the @swisspost/design-system-styles package

Comments

@aedu-hostettler
Copy link

aedu-hostettler commented Dec 14, 2024

Describe the bug
A toast that is dismissible (with an closing-X on top-right of the shown toast) does not close/vanish if clicked or if Enter is pressed with keyboard while focusing the closing-x.

To Reproduce
Steps to reproduce the behavior:

Let any dismissible toast show up, and try to close it manually.

Expected behavior
The toast should vanish.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser -> all browsers (chrome, edge, firefox, opera)
  • Version (current versions at 14.12.2024)

Additional context
Should we implement a close functionality on click/keyboard-enter by ourselves for each occurence of a toast, or would you do that once centraly in your component for all occurences?
Used Versions:
"@swisspost/design-system-components": "8.6.2",
"@swisspost/design-system-icons": "8.6.2",
"@swisspost/design-system-styles": "8.6.2",

@aedu-hostettler aedu-hostettler added the 🐞 bug Something isn't working label Dec 14, 2024
@gfellerph gfellerph added the 📦 styles Related to the @swisspost/design-system-styles package label Dec 16, 2024
@gfellerph gfellerph added this to the Long Term Support milestone Dec 16, 2024
@gfellerph
Copy link
Member

@aedu-hostettler the toast component currently is an HTML/CSS component only. This means, that the show/hide logic has to be implemented on project side. I totally agree that this is not really convenient. We're planning to implement this as a web component with a better API that will help to create toasts. For reference, you can follow this issue #3928.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working 📦 styles Related to the @swisspost/design-system-styles package
Projects
Status: 👀 Triage
Development

No branches or pull requests

2 participants