fix(UI): schema upload dialog should not open if file upload dialog is open BED-8656#2903
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthrough
ChangesDrag condition gating in SchemaUploadDialog
Estimated code review effort🎯 2 (Simple) | ⏱️ ~5 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@packages/javascript/bh-shared-ui/src/components/SchemaUploadDialog/SchemaUploadDialog.test.tsx`:
- Around line 140-143: The test creates a bare Event object for the dragenter
event which lacks the required dataTransfer property, preventing proper
isolation of the condition logic in the useExecuteOnFileDrag hook. Replace the
new Event('dragenter') with a proper DragEvent that includes a dataTransfer
property with types set to ['Files']. This will ensure the dataTransfer
validation passes and the test can properly verify that the condition check
(checking if showFileIngestDialog is true) is what actually prevents the dialog
from opening, making the test fail if this condition logic is accidentally
removed.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro
Run ID: 42f2f691-cefb-41d2-a96a-f0a34fec923c
📒 Files selected for processing (2)
packages/javascript/bh-shared-ui/src/components/SchemaUploadDialog/SchemaUploadDialog.test.tsxpackages/javascript/bh-shared-ui/src/components/SchemaUploadDialog/SchemaUploadDialog.tsx
Description
There was a bug on the OpenGraph Management page where if you were on the OpenGraph Management page and then clicked "Quick Upload", the Quick Upload dialog opens; but then if you attempt to drag a file into the dialog, the Schema Upload Dialog would also open behind it, and the UI sort of breaks. The file is attached to the Schema Upload dialog but is not visible which is a confusing experience. This change updates the Schema Upload dialog to not open if the Quick Upload dialog is already open.
Motivation and Context
Resolves BED-8656
Solves the bug where both dialogs would open at the same time.
How Has This Been Tested?
Tested locally following the instructions in the ticket. Also added a new test for this case.
Screenshots (optional):
Screen.Recording.2026-06-17.at.15.19.40.mov
Types of changes
Checklist:
Summary by CodeRabbit
Tests
Bug Fixes