timolins / react-hot-toast

Smoking Hot React Notifications 🔥
https://react-hot-toast.com
MIT License
9.66k stars 319 forks source link

Add dynamic height state (+ add test setup) #207

Closed timolins closed 2 years ago

timolins commented 2 years ago
vercel[bot] commented 2 years ago

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

Name Status Preview Updated
react-hot-toast ✅ Ready (Inspect) Visit Preview Jul 17, 2022 at 1:58PM (UTC)
github-actions[bot] commented 2 years ago

size-limit report 📦

Path Size
dist/index.js 4.92 KB (+1.91% 🔺)
dist/index.mjs 4.62 KB (+2.25% 🔺)
headless/index.js 1.79 KB (+1.56% 🔺)
headless/index.mjs 1.5 KB (+1.86% 🔺)
themagickoala commented 2 years ago

Am I right in thinking the only thing blocking this is the size-limit check? Anything we can do to help this along?

timolins commented 2 years ago

@themagickoala Indeed, and it feels weird to block it because of it. Wanted to stay true to the "less than 5kb including styles" claim.

There is #217 which would decrease bundle size below 5kb again.

Maybe even won't even hit 5kb as the check returns only 4944 bytes (but still fails?).

That said, I think we'll just merge before blocking it any longer.

themagickoala commented 2 years ago

Thanks @timolins! Will there be a release going out with this soon? My current solution is to mock the library and test the toast method was called, and I'd love to get back to real userland testing.

timolins commented 2 years ago

Hi @themagickoala – sorry for the delay! I just released 2.4.0-beta.0, which includes those changes. Let me know how it works for you.

themagickoala commented 2 years ago

Hi @themagickoala – sorry for the delay! I just released 2.4.0-beta.0, which includes those changes. Let me know how it works for you.

Hi @timolins just picked this up today and it looks like this does fix our tests. Thanks so much!

themagickoala commented 2 years ago

And thanks @silvenon for implementing this!

silvenon commented 2 years ago

Yay! 🎉