-
-
Notifications
You must be signed in to change notification settings - Fork 253
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
Tweak update button position and visibility in component editor #673
Conversation
Your Render PR Server URL is https://toolpad-pr-673.onrender.com. Follow its progress at https://dashboard.render.com/web/srv-cbc0m9cgqg48232brfgg. |
8d12879
to
223fffd
Compare
223fffd
to
dd0a79a
Compare
@Janpot when you get a chance please re-review, I've changed approach and addressed overscroll issue |
@@ -38,6 +38,9 @@ const WrappedSplitPane = React.forwardRef< | |||
// Some sensible defaults | |||
minSize={20} | |||
maxSize={-20} | |||
style={{ | |||
position: 'relative', |
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.
Yep, makes sense. Perhaps it could make a bit more sense on the paneStyle
instead, since that's the exact rectangle we want that editor to size to? (Not 100% sure that will work, didn't test)
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.
That was my initial though too, I tried it but it seems that paneStyle
is responsible for other components so I had to use style
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.
Ok, so it's the whole splitpane sizing badly. I'm a bit concerned that this will mess up existing splitpane usage. Perhaps it's safer to keep it absolute and have it size against its parent?
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've checked and we have 5 places where we use it:
- Component editor - all seems to look ok ✅
- Page editor - it's rendered also without an issue ✅
- Three places in QueryEditor - all seem to look still ok ✅
Should I still change it to absolute
? I'm worried that having it as absolute will bite us back in future usecases the same way and we will either have to sprinkle relative
position on parent everywhere we use SplitPane
or we will still end up doing it globally 🤔
Your Render PR Server URL is https://toolpad-pr-673.onrender.com. Follow its progress at https://dashboard.render.com/web/srv-cbf56pk6fj30id4aa6b0. |
packages/toolpad-app/src/components/SplitPane.tsx
as to me it seems more intuitive to work like that everywhere. I've also checked other places whereSplitPane
is used and it seems the rest is still working as expectedCloses #613