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/custom legend components #3539

Merged
merged 40 commits into from
Aug 8, 2018
Merged

Conversation

edbrett
Copy link
Contributor

@edbrett edbrett commented Aug 7, 2018

"They say you are what you eat, but I don't remember eating a flipping legend" - new GFW legend (probably)

The time has come to customise the WRI API legend with both styles and some fancy custom components to control our every complicated layers. Here is what we have:

  • Timeline: a range slider timeline component that allows you to trim, filter and play canvas players on the map
  • LayerListMenu: displays a list of togglable layers when the layer is type isMultiLayer, with additional info component nested inside.
  • LayerSelectorMenu: displays a selector menu for when the layer is type isSelectorLayer
  • LossStatement: a disclaimer for loss type layers
  • Threshold Selector: a dropdown selector for layers with thres or threshold in their params_config

Other new components for a better life and a better you:

  • Toggle: reimplemented the LayerToggle component with a new custom toggle for dynamic styling.
  • Dropdown: this is now allows a native params to use the native browser selector

Additional needed tasks:

  • Refactor datasets parsing and layer config building throughout app
  • General styles for legend and menu
  • Lots of bug fixes for layers and layersConfig
  • Remove moment from any date parsing inside loops

Copy link
Contributor

@01painadam 01painadam left a comment

Choose a reason for hiding this comment

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

Works well! Two small things:

  • I'm not sure about the timeline looping
  • When you pause the timeline the bar looks like this:

screen shot 2018-08-07 at 16 24 42

You have to manually drag the bar to then end to see the full loss. Maybe it can default/reset to full when the start/end sliders are dragged?

In any case, awesome work! Looking pretty blazing 🔥

@edbrett edbrett added the map label Aug 7, 2018
@benlaken
Copy link
Contributor

benlaken commented Aug 8, 2018

Seems like GLAD has some strange behaviour still: when you toggle on the geographic coverage the GLADS layer timeline disappears
screen shot 2018-08-08 at 10 43 04
screen shot 2018-08-08 at 10 43 09

:

Copy link
Contributor

@benlaken benlaken left a comment

Choose a reason for hiding this comment

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

Progress!

@edbrett
Copy link
Contributor Author

edbrett commented Aug 8, 2018

I cant reproduce the error with GLADs losing the timeline but that might have been a deps issue. Regarding timeline, as this is an interaction design problem I am going to merge and we can work with Fausto on the use cases later on. Thanks for the good feedback 💯 .

@edbrett edbrett merged commit c92d447 into feature/map-v2 Aug 8, 2018
@edbrett edbrett deleted the feature/custom-legend branch August 17, 2018 10:46
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.

None yet

3 participants