Added scrolling to the bottom of the page when adding blocks from the files sidebar#148
Added scrolling to the bottom of the page when adding blocks from the files sidebar#148joezein-oss wants to merge 1 commit into
Conversation
|
Closes #14 |
lucasfcosta
left a comment
There was a problem hiding this comment.
Thanks for the work here @joezein-oss!
I had a quick test at this and unfortunately it's not always working as expected.
The issue here is that sometimes it seems that the calculated scroll is different from what it should be. So sometimes the view scrolls past the block, and at other times it doesn't show the entire block in the viewport.
You can reproduce this if you add a bunch of blocks simultaneously or if you have a very long document and try adding more blocks.
I have previously tried an approach that was almost identical to your PR here but it didn't work for the same reason so I didn't go forward because it wasn't trivial - maybe the same issue happened here.
Do you think you could have another look at this?
When adding a python or sql file from the sidbar in the notebook, it will scroll down to the bottom of the page where it's added.