-
Notifications
You must be signed in to change notification settings - Fork 15.7k
fix(PropertiesModal): do not show validation errors while loading #35215
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
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.
Review by Korbit AI
Korbit automatically attempts to detect when you fix issues in new commits.
Category | Issue | Status |
---|---|---|
Stale form value in error calculation ▹ view | ✅ Fix detected |
Files scanned
File Path | Reviewed |
---|---|
superset-frontend/src/dashboard/components/PropertiesModal/sections/BasicInfoSection.tsx | ✅ |
superset-frontend/src/dashboard/components/PropertiesModal/index.tsx | ✅ |
Explore our documentation to understand the languages and file types we support and the files we ignore.
Check out our docs on how you can make Korbit work best for you and your team.
const titleValue = form.getFieldValue('title'); | ||
const hasError = | ||
!isLoading && | ||
validationStatus.basic?.hasErrors && | ||
(!titleValue || titleValue.trim().length === 0); |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
Oh thanks for fixing this. Wondering if it would make more sense to add a loading state for the reusable modal instead. I think I shifted things so all properties modal use the same component, so maybe we could handle there instead of handling in the first section/form elements. Modal would need the context though as to whether it's loading, but should be doable no? Thinking further, wondering if we pop-fast with a spinner in-modal, or whether we spinner the trigger (trigger becomes a spinner, wait until it's loaded to pop the modal). Fine with either approach, spinner-in-modal is probably easier/best (?) |
I think 'time to be interactive' is too low to warrant a loading spinner in modals, i will play with this some more and try to get rid of the loading state alltogether, if not yes could probably add loading to the underlying component. |
My main thing would be to handle this through a common solution/UX for all properties modal, so it's DRY and consistent across modals. About loading time, you never really know what could be happening, backend hiccup, super slow connection, ... I hate loading-related flickering, let's find a solution that that minimizes it. The loading-state-in-trigger might be decent (antd has loading states for buttons). Otherwise was thinking a spinner inside the full-size modal might be ok. |
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.
LGTM
SUMMARY
Dashboard properties modal was showing validation errors when in a loading state. This pr fixes that.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before:
dashboard-properties-before.mp4
After:
dashboard-properties-after.mp4
TESTING INSTRUCTIONS
Visual testing
ADDITIONAL INFORMATION