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 pauseTimeoutOnHover functionality to notifications #2661

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

HarshPatel5940
Copy link

@HarshPatel5940 HarshPatel5940 commented Nov 16, 2024

πŸ”— Linked issue

Not linked to an issue.

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

This pull request includes changes to the Notification component to add a new feature and improve user interaction. The most important changes include adding a new prop to control the pause behavior on hover and updating the mouse event handlers to respect this new prop.

Enhancements to Notification component:

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@HarshPatel5940
Copy link
Author

More context, this PR will allow users to perform toasts which don't stop the timeout when we hover.

My field name might be improvised, please suggest me better if you have. I really needed this flexibility inside the toast so i have made a PR.

@HarshPatel5940 HarshPatel5940 changed the title [WIP] feat(toast): add pauseOnHover functionality to notifications [WIP] feat(toast): add pauseTimeoutOnHover functionality to notifications Nov 16, 2024
@sandros94
Copy link
Collaborator

I was unsure which part in the documentation you would like to be updated?

You can add that information here, with the related boolean prop:

### Timeout
Use the `timeout` prop to configure how long the Notification will remain. The default value is `5000`, set it to `0` to disable the timeout.
You will see a progress bar at the bottom of the Notification which will indicate the remaining time. When hovering the Notification, the progress bar will be paused.
::component-card
---
baseProps:
id: 5
title: 'Notification'
description: 'This is a notification.'
props:
timeout: 60000
---
::

@sandros94 sandros94 added the enhancement New feature or request label Nov 16, 2024
@HarshPatel5940 HarshPatel5940 marked this pull request as ready for review November 16, 2024 15:30
@HarshPatel5940 HarshPatel5940 changed the title [WIP] feat(toast): add pauseTimeoutOnHover functionality to notifications feat(toast): add pauseTimeoutOnHover functionality to notifications Nov 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants