-
Notifications
You must be signed in to change notification settings - Fork 18
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
[ENG-1354, 1415] Fixes bottom sidesheet and ReactFlow alignment issues #267
Conversation
useEffect(() => { | ||
fitView(); | ||
}, []); | ||
}, [dagPositionState]); | ||
|
||
useEffect(() => { | ||
// NOTE(vikram): There's a timeout here because there seems to be a |
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.
timeout still needed?
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.
I think this is still necessary. This has to do with a race condition between the CSS transition for the div
and when the fitView
call is made.
@@ -151,9 +151,8 @@ export const AqueductSidebar: React.FC<Props> = ({ | |||
// open bottom to top | |||
bottomAligned: { | |||
position: 'absolute', | |||
right: bottomSideSheetOffset, | |||
left: MenuSidebarOffset, |
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.
Not super urgent, but we'll need to add this to the EnterpriseMenuSidebar as well. we use different components on enterprise and OSS
Describe your changes and why you are making these changes
This PR fixes two bugs around the layout of the ReactFlow canvas and the bottom sidesheet:
fitView
at the right time. Because we were previously callingfitView
oncomponentDidMount
, it didn't actually work on the first load because the nodes and edges were loaded in after the component was mounted. This PR changes thefitView
effect so that it also is called when the node/edge positions are changed, which causes the view to be fit correctly (after a small lag) on first load.(Ignore the miscolored artifacts; that's because my local backend isn't updated.)
Related issue number (if any)
Checklist before requesting a review
python3 scripts/run_linters.py -h
for usage).run_integration_test
: Runs integration testsskip_integration_test
: Skips integration tests (Should be used when changes are ONLY documentation/UI)