-
Notifications
You must be signed in to change notification settings - Fork 6
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
Added buttons below map #40
Conversation
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 for putting this up. There's a big styling note below with an example. We want to ensure the buttons always appear on screen without having to scroll down.
CHANGELOG.md
Outdated
@@ -13,6 +13,7 @@ and this project adheres to release number versioning. | |||
- Added Docker containers with docker-compose [#10](https://github.com/CodeForPhilly/third-places/pull/10) | |||
- Set up Leaflet React component and boiletplate homepage[#7](https://github.com/CodeForPhilly/third-places/issues/7) | |||
- Added initial Django models & migration [#21](https://github.com/CodeForPhilly/third-places/pull/21) | |||
- Added buttons at bottom of Map [#28](https://github.com/CodeForPhilly/third-places/issues/28) |
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 will actually be for #40, the link should point to the PR rather than the issue
src/app/src/Map/Map.css
Outdated
} | ||
|
||
.button-container { | ||
padding-left: 1rem; | ||
padding-right: 1rem; | ||
margin-top: 2rem; |
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 played around with the styles locally and to get a style that didn't push the buttons down to a place the user couldn't scroll to since the map would just move, I got this to render like the wireframes:
.leaflet-container-wrapper {
display: flex;
flex-flow: column nowrap;
height: 100vh;
}
.leaflet-container {
width: 100vw;
height: 100%;
flex-grow: 1;
}
.button-container {
display: flex;
flex-flow: row nowrap;
justify-content: center;
z-index: 1000;
width: 100vw;
padding: 1rem 0;
background-color: white;
}
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.
God bless you flexbox
src/app/src/Map/Map.tsx
Outdated
</div> | ||
<div className="button-container"> | ||
<Button style={{backgroundColor:"#ADD8E6", marginLeft: '1rem', marginRight: '1rem'}} variant="primary">Near Me</Button> |
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.
The objects in the style section are all the same and could be refactored out to a const
variable and used in each of the style props.
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 for making that change so quickly!
Overview
Give a brief description of the changes
Closes ###
Issue #28
Demo
Testing instructions
Checklist before merge