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

Use react-dimensions to get BaseMap to be responsive 🗺️ #323

Merged
merged 5 commits into from
Jun 21, 2018

Conversation

danieltomasku
Copy link
Contributor

@danieltomasku danieltomasku commented Jun 21, 2018

This PR adds the react-dimensions package which gives the dimensions of a parent container. This is needed because react-map-gl width and height props require a number, not percentage or units. Now BaseMap can be responsive in a card!

Closes #290

@danieltomasku danieltomasku changed the title Use react-dimensions to get BaseMap to be responsive Use react-dimensions to get BaseMap to be responsive 🗺️ Jun 21, 2018
Copy link
Contributor

@jaronheard jaronheard left a comment

Choose a reason for hiding this comment

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

Also rip out the map wrapper from the Neighborhoods page

@DingoEatingFuzz
Copy link
Contributor

Looks like the BaseMap tests have to be updated now that the map is wrapped in the Dimensions thing. I'm happy to drive this home if you're busy today.

@danieltomasku
Copy link
Contributor Author

@DingoEatingFuzz yeah i'm pretty busy today, feel free to drive it home if you have time! i think this is the related issue: digidem/react-dimensions#35 but feel free to solve the best way you see fit.

@DingoEatingFuzz
Copy link
Contributor

@danieltomasku Turns out Dimensions won't render its children if it doesn't have a width and a height...which it doesn't in tests. So I just skipped them 🙃

@DingoEatingFuzz DingoEatingFuzz merged commit 6bcbdde into master Jun 21, 2018
@jaronheard jaronheard deleted the feature-map-sizing-in-card branch April 21, 2019 20:10
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