Skip to content
This repository has been archived by the owner on Aug 28, 2023. It is now read-only.

Add year slider to map page #1317

Merged
merged 4 commits into from
Oct 25, 2019
Merged

Add year slider to map page #1317

merged 4 commits into from
Oct 25, 2019

Conversation

flibbertigibbet
Copy link
Contributor

Overview

Let user modify the map layer year via a slider at the bottom of the map page. (The precipitation layer is the only layer with a date range currently).

Demo

image

Notes

@azavea/temperate-design this is an unstyled nouislider component; documentation on styling for nouislider is here and the default component styles are here.

Testing Instructions

  • Go to the map page and select precipitation layer
  • Date range slider should show with years for layer
  • Scrubbing slider should update map layer
  • Slider should not show for any other layer or no selected layer
  • Is the CHANGELOG.md updated with any relevant additions, changes, fixes or removals following the format of keepachangelog?

Closes #1292.

Let user set year via a slider at the bottom of the map page
for the precipitation layer (only layer with a date range currently).

Closes #1292.
@flibbertigibbet
Copy link
Contributor Author

Created #1318 for the 'play' button.

@maurizi
Copy link
Contributor

maurizi commented Oct 24, 2019

@azavea/temperate-design this is an unstyled nouislider component; documentation on styling for nouislider is here and the default component styles are here.

@alexelash is off for a few weeks, so I don't think we should block anything waiting for design, but I think this is pretty close to the wireframes, albeit keeping most of the default noUiSlider styling:

diff --git a/src/angular/planit/src/assets/sass/pages/_map.scss b/src/angular/planit/src/assets/sass/pages/_map.scss
index 0ff73b8a..57222cfa 100644
--- a/src/angular/planit/src/assets/sass/pages/_map.scss
+++ b/src/angular/planit/src/assets/sass/pages/_map.scss
@@ -49,4 +49,22 @@ app-map {
       }
     }
   }
+
+  .slider {
+    position: absolute;
+    bottom: 5rem;
+    left: 5rem;
+    right: 5rem;
+    background: $dark-grey-background;
+    padding: 10px 30px 40px 20px;
+    border-radius: 15px;
+    width: auto;
+
+    .noUi-pips {
+      color: $white;
+    }
+    .noUi-marker, .noUi-marker-large {
+      background: $neutral-2;
+    }
+  }
 }

image

Copy link
Contributor

@maurizi maurizi 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 good, nice and simple.

I left a few minor comments, and some interim CSS you can apply until @alexelash is available.

src/angular/planit/src/app/map/map.component.html Outdated Show resolved Hide resolved
src/angular/planit/src/app/map/map.component.ts Outdated Show resolved Hide resolved
flibbertigibbet and others added 2 commits October 25, 2019 10:32
Update as user drags instead of on release.

Co-Authored-By: Michael Maurizi <mmaurizi@azavea.com>
Co-Authored-By: Michael Maurizi <mmaurizi@azavea.com>
@flibbertigibbet
Copy link
Contributor Author

Thanks for the styling. I thought it looked too large at full width, so I set the width to 40% instead.

image

This should be ready for another look.

@flibbertigibbet flibbertigibbet merged commit 69036e9 into azavea:develop Oct 25, 2019
@flibbertigibbet flibbertigibbet deleted the feature/kak/map-date-range-slider#1292 branch October 25, 2019 15:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add date range slider to map page
2 participants