-
Notifications
You must be signed in to change notification settings - Fork 227
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
Refactor toolbar #396
Refactor toolbar #396
Conversation
There are some CSS issues still |
d980aa9
to
4c7ec7b
Compare
toolbar.mp4 |
@tacaswell @SylvainCorlay @ianhi if you have any thoughts :) Feedback would be super welcome |
The plot is now centered in the cell output |
0d1dd88
to
a86897c
Compare
Will look tonight or this weekend |
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.
Sorry for the delay @martinRenou
general refactor
I am 👍 on the code simplification
fade in/out
👍
I think the fade in and out is nice and my one suggestion is that it should be toggleable by a user.
plot centering
Currently 👎 but open to being convinced or improving this.
Was this necessary to get the fading to work?
The two main issues that the centering brought for me are:
-
Weird gap to the toolbar when the plot is small. This makes it inconvenient to use the toolbar because you have to move your mouse so far
-
The centering has a big impact on the dynamics of resizing the plot. It doubles the rate of resizing horizontally while leaving vertical resizing the same speed which feels very un-intuitive:
I think what happened is that this breaks the assumption that when were resizing a window the opposite edges (top and left) will stay in their positions. Maybe this could be reconfigured so that those edges stay fixed while resizing? Otherwise I think this ends up being more detrimental than beneficial (users can already center the plot using ipywidgets although that isn't super smooth).
Thanks for the review @ianhi :) I can revert the centering of the plot. This was not the initial purpose of the PR anyway. |
0e8d54d
to
376d61f
Compare
This pull request introduces 1 alert when merging 376d61f into 480a236 - view on LGTM.com new alerts:
|
3b431cd
to
fa6cec5
Compare
@ianhi Thanks again for your review. I took your comments into account:
|
f0d16f0
to
4629fe3
Compare
1fe95a9
to
afdebbf
Compare
height: auto; | ||
overflow: hidden; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; |
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.
@martinRenou i thought the centering was reverted?
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.
It was.. This looks like a leftover. But this does not seem to affect the plot? It is not centered when I try latest.
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.
huh i was just seeing this behavior. let me try in a fresh env
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 see this on the binder link - maybe this is browser based. I'm on Firefox 93
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.
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 wish the visual regression tests caught that. We might be able to use playwright with Firefox as well. #422
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.
Thanks a lot for catching this!
Fix #299
toolbar.mp4