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

feat(toast): Add limit prop to ToastProvider #123

Merged
merged 11 commits into from
Sep 16, 2021
Merged

Conversation

mfarukkoc
Copy link
Contributor

Description

  • Added optional limit prop to limit the maximum number of toasts.

Closes #112

* Add optional limit prop to limit the maximum number of toasts.
@mfarukkoc mfarukkoc requested a review from mucahit July 7, 2021 09:35
@mfarukkoc mfarukkoc self-assigned this Jul 7, 2021
@mfarukkoc mfarukkoc requested a review from edizcelik July 7, 2021 12:59
* Move toast limit to context state from toast display action props.
@mfarukkoc mfarukkoc requested a review from edizcelik July 12, 2021 08:38
* Add effect that listens the changes on limit and autoCloseToasts prop
* Add story section under Toast for showing dynamic changes.
@mfarukkoc mfarukkoc requested a review from edizcelik July 12, 2021 13:03
Copy link
Contributor

@mucahit mucahit left a comment

Choose a reason for hiding this comment

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

A minor request 👇

* Change SET_LIMIT action pruning target to 'firstly added toasts' from 'lastly added toasts'.
* Update shift method usage with slice method.
@mfarukkoc mfarukkoc requested a review from mucahit July 13, 2021 11:25
* Refactor logic in the "SET_DISPLAY" action with the approach in the "DISPLAY" action.
* Change line-breaks between code lines to increase readability.
* Remove destructuring operation in "SET_AUTO_CLOSE" action, use the action prop directly.
Copy link
Contributor

@yasincaliskan yasincaliskan left a comment

Choose a reason for hiding this comment

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

Looks good, thank you!

@edizcelik edizcelik requested a review from bilgeyucel August 10, 2021 13:19
* Update the logic of checking if the limit is defined.
@mucahit mucahit added Ready for new release PR is reviewed and ready to be merged and removed ready for review labels Aug 19, 2021
@edizcelik edizcelik removed the Ready for new release PR is reviewed and ready to be merged label Aug 26, 2021
@mucahit mucahit assigned edizcelik and unassigned mfarukkoc Aug 26, 2021
@edizcelik edizcelik requested a review from jamcry September 3, 2021 07:48
@mucahit mucahit added the Ready for new release PR is reviewed and ready to be merged label Sep 16, 2021
@mucahit mucahit merged commit dcd9acf into next-release Sep 16, 2021
@mucahit mucahit deleted the feat/toast-limit branch September 16, 2021 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready for new release PR is reviewed and ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants