Skip to content
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

Merged
merged 3 commits into from
Nov 2, 2018
Merged

Conversation

mdboom
Copy link
Contributor

@mdboom mdboom commented Nov 1, 2018

Fixes #1015 and #1090

image

@mdboom mdboom requested a review from hamilton November 1, 2018 19:19
@mdboom
Copy link
Contributor Author

mdboom commented Nov 1, 2018

There's a z-order issue with tooltips in the eval frame (which I think maybe we've never had before...?)

image

Any thoughts?

@hamilton
Copy link
Contributor

hamilton commented Nov 1, 2018

@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 bottom-end might solve the issue.

Copy link
Contributor

@hamilton hamilton left a 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 on the right track, but I'm noticing that there's some strange overflowing issues if I run a lot of cells. I tried a few less hacky versions of the below and they all seem to scoot the toolbar off the pane slowly.

Let me know if you need any help getting to the bottom of this!

disappearing-toolbar

@mdboom
Copy link
Contributor Author

mdboom commented Nov 2, 2018

Oh, CSS is such a joy! I'll poke at it and let you know if I get stuck.

@mdboom
Copy link
Contributor Author

mdboom commented Nov 2, 2018

I think I've fixed the tooltip and shrinking height issues.

@hamilton
Copy link
Contributor

hamilton commented Nov 2, 2018

LGTM - thanks @mdboom!

@hamilton hamilton merged commit 8d8aa2b into iodide-project:master Nov 2, 2018
}
}

export function mapStateToProps() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return { }
}

function mapDispatchToProps(dispatch) {
Copy link
Contributor

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)
Copy link
Contributor

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?

@hamilton
Copy link
Contributor

hamilton commented Nov 6, 2018

Thanks for the more thorough review @bcolloran. I think I dropped the ball on this PR review + testing more thoroughly on Chrome.

@mdboom
Copy link
Contributor Author

mdboom commented Nov 6, 2018

Sorry about this, all. I still feel like a monkey on a typewriter with React. Is there a good reference / book?

@bcolloran
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants