-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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: annotation layer modal err handling #12341
fix: annotation layer modal err handling #12341
Conversation
Codecov Report
@@ Coverage Diff @@
## master #12341 +/- ##
==========================================
+ Coverage 72.13% 72.88% +0.75%
==========================================
Files 898 597 -301
Lines 45681 21286 -24395
Branches 5495 5501 +6
==========================================
- Hits 32952 15515 -17437
+ Misses 12517 5644 -6873
+ Partials 212 127 -85
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
superset-frontend/src/views/CRUD/annotationlayers/AnnotationLayerModal.tsx
Show resolved
Hide resolved
!currentAnnotation.id || | ||
(annotation && annotation.id !== currentAnnotation.id) || | ||
(isHidden && show)) | ||
) { |
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.
Maybe we can split these if
conditions into multiple early returns. Currently it's kind of hard to reason with.
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.
you can also use optional chaining to help if you want.
e9c4c18
to
542f7fb
Compare
542f7fb
to
dec3e6c
Compare
* annotation layer modal err handling * address comments
SUMMARY
useEffect
hook for initialization to reduce API requestsBEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TEST PLAN
Manual Test:
ADDITIONAL INFORMATION