-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
fix: Notifications fade out erratically when executing a script on large number of rows #2822
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
fix: Notifications fade out erratically when executing a script on large number of rows #2822
Conversation
🚀 Thanks for opening this pull request! We appreciate your effort in improving the project. Please let us know once your pull request is ready for review. |
📝 WalkthroughWalkthroughThe change refactors the timeout management logic in the notification component. It consolidates multiple Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant NotificationComponent
User->>NotificationComponent: Receives new note props
NotificationComponent->>NotificationComponent: Check if note differs from last note
NotificationComponent->>NotificationComponent: Update state if needed
NotificationComponent->>NotificationComponent: clearTimeout(existing timeout)
NotificationComponent->>NotificationComponent: setTimeout(hide notification after 3s)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
npm warn config production Use Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
🎉 Snyk checks have passed. No issues have been found so far.✅ security/snyk check is complete. No issues have been found. (View Details) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/dashboard/Data/Browser/Notification.react.js (1)
48-48
: LGTM! Good fix for the timeout race condition.Consolidating the
clearTimeout
call to a single point right before setting the new timeout effectively prevents race conditions that could cause erratic notification behavior when multiple notifications arrive rapidly during script execution.This should resolve the issue where notifications were fading out unpredictably when processing large datasets.
Consider migrating from the deprecated
componentWillReceiveProps
tocomponentDidUpdate
or React hooks in a future refactor:- componentWillReceiveProps(nextProps) { + componentDidUpdate(prevProps) { + const nextProps = this.props; if (this.state.lastNote !== nextProps.note) {
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/dashboard/Data/Browser/Notification.react.js
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Docker linux/amd64
# [7.2.0-alpha.8](7.2.0-alpha.7...7.2.0-alpha.8) (2025-05-25) ### Bug Fixes * Notifications fade out erratically when executing a script on large number of rows ([#2822](#2822)) ([3891381](3891381))
🎉 This change has been released in version 7.2.0-alpha.8 |
New Pull Request Checklist
Issue Description
Notifications fade out erratically when executing a script on large number of rows
Approach
Remove delayed fade-out timeout on multiple notifications.
Summary by CodeRabbit