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

Feature/show routes based off checkboxes #24

Merged
merged 5 commits into from
Jan 17, 2018

Conversation

heather-lee
Copy link
Collaborator

@heather-lee heather-lee commented Dec 7, 2017

Front end piece which includes:

  • Resizing map based on resize of browser window
  • Sidebar which includes checkboxes
  • Checkboxes which filter out the routes displayed

It needs a lot of CSS TLC but the structure is here.

rev: @EddyIonescu

Copy link
Member

@EddyIonescu EddyIonescu left a comment

Choose a reason for hiding this comment

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

This looks great, it's pretty clean. Just address the comments I left before merging.

@import url('https://fonts.googleapis.com/css?family=Poppins');

body {
font-family: 'Poppins', sans-serif;
Copy link
Member

Choose a reason for hiding this comment

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

+1

padding: 0;
}

Copy link
Member

Choose a reason for hiding this comment

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

really nice CSS styles

};
}

componentWillMount() {
Copy link
Member

Choose a reason for hiding this comment

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

If possible, let's use componentDidMount as then it'll only run once - and it's better practice to initialize things (lines 43 and 45) in the constructor. See facebook/react#7671

zoom: 15,
pitch: 0,
bearing: 0,
},
Copy link
Member

Choose a reason for hiding this comment

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

this makes the zoom in/out disappear - make sure this works before merging

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ahh! Sorry for the lag. Will fix this ASAP!

@@ -11,6 +11,7 @@
"babel-loader": "7.1.1",
"babel-preset-react-app": "^3.0.3",
"babel-runtime": "6.26.0",
"bootstrap": "4.0.0-beta",
Copy link
Member

Choose a reason for hiding this comment

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

Could you describe in the PR how adding bootstrap/reactstrap is useful? (is it to make the sidebar prettier?)

EddyIonescu added a commit that referenced this pull request Jan 17, 2018
Thanks to trynmaps/tryn-api#14 the client
now has to change its Relay schema as to correspond to the new
format.

The reason such a change is needed is because it's necessary to
do the things we want, like only get data corresponding to open
routes or better handle the drawing of each route.

Now that the states are inside a route,
we can choose to request the vehicles ONLY for the routes that
are selected - which is a big performance gain. At the same
time, only a handful of routes will be open at a time, and there's
another PR that will let the user choose which ones
(#24).

However, while the client works - it only displays the state
for the first route. The next step is to have a layer for each
route, that contains all of its states - which is a TODO
described here: #27

Tests:
- manually opened web app and dragged around. Worked as expected.
@EddyIonescu EddyIonescu force-pushed the feature/Show_Routes_Based_Off_Checkboxes branch from b46caf5 to 64425ef Compare January 17, 2018 07:24
@EddyIonescu EddyIonescu merged commit 46d76c1 into master Jan 17, 2018
@EddyIonescu EddyIonescu deleted the feature/Show_Routes_Based_Off_Checkboxes branch January 17, 2018 07:40
EddyIonescu added a commit that referenced this pull request Jan 17, 2018
Thanks to trynmaps/tryn-api#14 the client
now has to change its Relay schema as to correspond to the new
format.

The reason such a change is needed is because it's necessary to
do the things we want, like only get data corresponding to open
routes or better handle the drawing of each route.

Now that the states are inside a route,
we can choose to request the vehicles ONLY for the routes that
are selected - which is a big performance gain. At the same
time, only a handful of routes will be open at a time, and there's
another PR that will let the user choose which ones
(#24).

However, while the client works - it only displays the state
for the first route. The next step is to have a layer for each
route, that contains all of its states - which is a TODO
described here: #27

Tests:
- manually opened web app and dragged around. Worked as expected.
EddyIonescu added a commit that referenced this pull request Jan 20, 2018
Thanks to trynmaps/tryn-api#14 the client
now has to change its Relay schema as to correspond to the new
format.

The reason such a change is needed is because it's necessary to
do the things we want, like only get data corresponding to open
routes or better handle the drawing of each route.

Now that the states are inside a route,
we can choose to request the vehicles ONLY for the routes that
are selected - which is a big performance gain. At the same
time, only a handful of routes will be open at a time, and there's
another PR that will let the user choose which ones
(#24).

However, while the client works - it only displays the state
for the first route. The next step is to have a layer for each
route, that contains all of its states - which is a TODO
described here: #27

Tests:
- manually opened web app and dragged around. Worked as expected.
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.

2 participants