almond-bongbong / react-simple-toasts

🍞 Instant, lightweight toast notifications for React. No providers or containers needed.
https://almond-bongbong.github.io/react-simple-toasts/
35 stars 9 forks source link

feat: refactor css modules to global BEM class #98

Closed hemengke1997 closed 2 weeks ago

hemengke1997 commented 3 weeks ago

This pr add two feature

  1. break change: refactor css modules to global class that using BEM convention. Currently, developers must import 'react-simple-toasts/dist/style.css' manually. This gives developers the ability to fully customize css styles
  2. add loadingText option to customize the loading content
  3. replace fixed 300ms exit timeout with onTransitonEnd
hemengke1997 commented 3 weeks ago

related to #97

hemengke1997 commented 3 weeks ago

I need some help to fix test cases @almond-bongbong 🤗

almond-bongbong commented 3 weeks ago

I have made some changes to the 'feat/global-css' branch in my fork of the react-simple-toasts repository. These changes include fixing indentation and addressing test issues.

I would like to request that you review and consider merging these changes into the repository. You can view the comparison of the changes here:

https://github.com/hemengke1997/react-simple-toasts/compare/feat/global-css...almond-bongbong%3Areact-simple-toasts%3Afeat/global-css

The main changes include:

  1. 🎨 Fix indent
  2. ✅ Fix tests

In particular, I kindly request your careful review of this specific line. There have been significant changes in this section that could potentially affect the behavior of the code.

hemengke1997 commented 3 weeks ago

Thank you for your time and effort on this PR. I completely understand how hard it is to do open source, because I am also busy with work and can only find time to work on open source projects outside of work.

I removed terser because developers will minify code when building. Keeping the source code readable makes it easier for developers to patch the code and deal with bugs

hemengke1997 commented 3 weeks ago

I found some bug then fix them in this PR, well, maybe I should make new pr, but it's a bit cumbersome to synchronous code from new branch.

almond-bongbong commented 2 weeks ago

Thank you very much. This code looks pretty solid.