Skip to content

chore: Hide the close button when toastType is loading#516

Merged
emilkowalski merged 3 commits intoemilkowalski:canaryfrom
ynng3:main
Feb 16, 2025
Merged

chore: Hide the close button when toastType is loading#516
emilkowalski merged 3 commits intoemilkowalski:canaryfrom
ynng3:main

Conversation

@ynng3
Copy link
Contributor

@ynng3 ynng3 commented Nov 11, 2024

Background

If the toast is closed while toastType is loading, the user will not be able to see the completed result.

Therefore, it seems that toastType is prevented from closing when it is loading.

However, since there are two issues related to this, to avoid any misunderstanding, it might be better not to render the close button when the toastType is loading.

Therefore, I am submitting a pull request to ensure that the close button is not rendered when toastType is loading.

Reference

#514 #476

@vercel
Copy link

vercel bot commented Nov 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sonner ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 2, 2025 7:57am

@ynng3 ynng3 changed the title Hide the close button when toastType is loading chore:Hide the close button when toastType is loading Dec 18, 2024
@ynng3 ynng3 changed the title chore:Hide the close button when toastType is loading chore: Hide the close button when toastType is loading Dec 18, 2024
@adroste
Copy link

adroste commented Jan 29, 2025

@emilkowalski can we have this?

@emilkowalski emilkowalski changed the base branch from main to canary February 16, 2025 10:58
@emilkowalski emilkowalski merged commit cec5a85 into emilkowalski:canary Feb 16, 2025
1 check passed
emilkowalski added a commit that referenced this pull request Feb 18, 2025
* refactor: remove unstyled prop (#557)

* fix: allow toats to grow properly (#559)

* chore: rename data-theme to data-sonner-theme (#560)

* fix: toast removal in strict mode (#563)

* refactor: maintain default styles when custom (#564)

* fix: check for promise properly (#565)

* chore: horizontal swiping improvements (#566)

* medium font weight

* chore: improve rich colors (#567)

* chore: improve base colors (#568)

* improve colors

* improve base colors

* chore: remove lift interaction, decrease default gap (#569)

* v2.0.0-beta.1

* chore: update toast lifetime (#570)

* build: use bunchee (#561)

* fix: failing tests (#572)

* Fix tests

* fix tests

* fix: unstyled prop not being applied to all elements (#573)

* Improve unstyled prop

* Cleanup

* fix: inability to remove a toast that has just been created (#574)

* Prevent batching

* Cleanup

* hero cleanup

* fix: close button background is transparent (#575)

* chore: bring back lift on hover (#576)

* v2.0.0-beta.2

* chore: remove deprecated props (#577)

* feat: drag damping (#578)

* dampen darg

* Adjust swipe threshold

* typo

* Enhance Promise to support ExternalToast propertiesfeat: Promise enhancement to allow ExternalToast props (#547)

* fix: make promises work with new Error (#579)

* wip

* Add test for error classin promises

* chore: Hide the close button when toastType is loading (#516)

#514 #476

* fix close button aria labels (#490)

Co-authored-by: Emil Kowalski <36730035+emilkowalski@users.noreply.github.com>

* fix: error promise test (#580)

* v2.0.0-beta.3

---------

Co-authored-by: Jiachi Liu <inbox@huozhi.im>
Co-authored-by: Diego Traid <35971053+diegotraid@users.noreply.github.com>
Co-authored-by: 알노리 <67145096+ynng3@users.noreply.github.com>
Co-authored-by: Miro Rauhala <4082806+mirorauhala@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

Comments