codefordenver / Circular

Denver Re:Imagine recycling app
https://re-imagine-dev.firebaseapp.com/
15 stars 19 forks source link

MapWithAMarker and MapCard components should be separated or modified #464

Open Aaron-Lathrop opened 5 years ago

Aaron-Lathrop commented 5 years ago

Items to consider refactoring:

  1. MapWithAMarker should be made a separate component so it can be easily inserted into different contexts. For example, adding the component to the RenderNewCampaign component for issue #419 requires no title and a different size
  2. MapWithAMaker should have a defaultCenter of the provided latLng or the center of Denver (39.7392, -104.9903). This ensures that the map marker will always be in the center of the map so users can see exactly where the searched address is.
  3. MapWithAMarker should be zoomed in more so users can see the area searched and not just a broad view of the Denver Metro area. Suggested zoom value is 15.
  4. Alternatively, MapCard should have additional options for styling so that it can be used in more than a single context. Additional parameters to include could be: displayTitle(Boolean), containerElement(JSX). The optional containerElement parameter could have a default of the current value found in the MapCard component and allow developers to specify their own if they wish.

The above suggestions should help make the MapCard component more reusable to developers and more useful to users.