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
Migrate ZoneList component to React #2145
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.
Superb!
I didn't look in the smallest details, so therefore, I would ask you to test thoroughly that the interaction still works.
It's important as well to test on mobile (I think it's enough if you test it from your phone, or from a browser in responsive mode).
I'll let you merge once you've tested.
I just ran through all the interactions tests I could think of and it seems to work fine: Web
Mobile
The only bit of code I wanted to be careful about is the map centering event observer I added in this PR, but the map interactions seem to work fine as well! observe(state => state.application.selectedZoneName, (selectedZoneName, state) => {
if (selectedZoneName) {
centerOnZoneName(state, selectedZoneName, 4);
}
}); Note: For mobile testing, I actually used Chrome in responsive mode as I couldn't get |
That's perfect! |
* Started writing ZoneList React component; DOM rendering works * Keyboard navigation through the zones list * Mouse click action for the zones * Make zones search bar work * Remove old ZoneList component * Rename zonelistreact -> zonelist * Extract common getCo2Scale helper function * Fix linting errors
Part of #1681 (comment).
Notes
production
, the zone list will become empty as there is no production data is generated for the local runs. This should actually be a correct behavior as the zone list should presumably only display zones for which some data exists. In the oldZoneList
component, the list wouldn't really get updated when switching the toggle which is probably a bug.