-
-
Notifications
You must be signed in to change notification settings - Fork 365
fix(Table): toast popup delay parameter should be use global setting #5340
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
Conversation
Reviewer's Guide by SourceryThis PR updates the toast popup implementation to use a global delay setting. Instead of manually constructing a ToastOption in multiple methods, a helper method (GetToastOption) is introduced to centralize the initialization, thereby ensuring consistency and easier maintenance of the toast behavior. Updated class diagram for Toast Usage in Table ToolbarclassDiagram
class TableToolbar {
+ShowToastAsync(title, content, category)
+ShowDeleteToastAsync(title, content, category)
+SaveModelAsync(context, changeType)
+DeleteAsync()
+ExecuteExportAsync(callback)
+GetToastOption(title) : ToastOption
}
class ToastOption {
+string Title
+string Content
+ToastCategory Category
+double Delay
}
class Options {
<<singleton>>
+CurrentValue : OptionSettings
}
class OptionSettings {
+ToastDelay : double
}
TableToolbar --> ToastOption : returns
TableToolbar --> Options : uses
Options --> OptionSettings : contains
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey @ArgoZhang - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider extracting the toast content formatting logic into a separate method for better readability.
- The
GetToastOptionmethod could be a static method since it doesn't rely on instance state.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5340 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 644 644
Lines 28938 28925 -13
Branches 4122 4122
=========================================
- Hits 28938 28925 -13 ☔ View full report in Codecov by Sentry. |
toast popup delay parameter should be use global setting
Summary of the changes (Less than 80 chars)
简单描述你更改了什么, 不超过80个字符;如果有关联 Issue 请在下方填写相关编号
Description
fixes #5339
Regression?
[If yes, specify the version the behavior has regressed from]
[是否影响老版本]
Risk
[Justify the selection above]
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Bug Fixes: