-
Notifications
You must be signed in to change notification settings - Fork 142
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
Add clear history button #1119
Add clear history button #1119
Conversation
@mdboom I think the position of that tooltip could be place so that it appears in the lower right side of the icon. At the moment, the editor pane is overlapping a tooltip that is actually appearing in the eval frame. I'm not sure how we address this with this current setup, but it does seem like one solution is to just prevent the tooltip from being in the overlapping area to the best of our abilities. Setting the tooltip placement (outlined here) to |
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.
Oh, CSS is such a joy! I'll poke at it and let you know if I get stuck. |
I think I've fixed the tooltip and shrinking height issues. |
LGTM - thanks @mdboom! |
} | ||
} | ||
|
||
export function mapStateToProps() { |
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.
this mapStateToProps is not needed
https://stackoverflow.com/questions/47657365/can-i-mapdispatchtoprops-without-mapstatetoprops-in-redux
return { } | ||
} | ||
|
||
function mapDispatchToProps(dispatch) { |
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.
preferred method is to just select out the actions you need, as in:
function mapDispatchToProps(dispatch) { |
we have this pattern still floating around, but it is legacy
return { } | ||
} | ||
|
||
const MiniToolbar = connect(mapStateToProps)(MiniToolbarUnconnected) |
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.
this does not appear to need to be connected to the redux store at all, right? it's just a simple presentational component?
Thanks for the more thorough review @bcolloran. I think I dropped the ball on this PR review + testing more thoroughly on Chrome. |
Sorry about this, all. I still feel like a monkey on a typewriter with React. Is there a good reference / book? |
No worries @mdboom!! :-) We're here to help you through it. Unfortunately we have a bunch a legacy code from when we were first learning that demonstrates bad patterns, and in many places it's not a great foundation to learn from... so really it's me and hamilton who must apologize to you! I don't know of any particular books, but i think the official react and redux docs are excellent. I've also found quite a number of great hackernoon and medium articles that have helped a lot when googling around specific topics. |
Fixes #1015 and #1090