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

[E & A] Add range slider for rescaling the min & max range of the color maps #1102

Closed
3 tasks done
dzole0311 opened this issue Aug 13, 2024 · 2 comments
Closed
3 tasks done
Assignees

Comments

@dzole0311
Copy link
Collaborator

dzole0311 commented Aug 13, 2024

Context

This is the second part of the configurable color map options: #994

The goal is to provide users with more control over how data is visualized by allowing them to adjust the range of values that the color map uses

Screenshot 2024-08-13 at 15 32 47

Acceptance Criteria

  • Add a range slider in the color map options
  • The slider should allow users to adjust the minimum and maximum values that define the range of the colormap.
  • Somehow document functionality of colormap configurability for future reference

Related Tickets

#994

@dzole0311 dzole0311 self-assigned this Aug 13, 2024
@j08lue
Copy link
Contributor

j08lue commented Aug 15, 2024

Btw, this feature will only work for certain endpoints / services (e.g. TiTiler-based).

I guess we currently distinguish between three layer types: raster|vector|zarr.

https://github.com/NASA-IMPACT/veda-ui/blob/main/docs/content/frontmatter/layer.md

Will we need some more fine-grained distinction between server capabilities?

https://github.com/NASA-IMPACT/veda-config/blob/1250da71d5c09227938bcd614875ae85e54a1c58/datasets/cmip6-tas.data.mdx?plain=1#L30

@aboydnw
Copy link
Contributor

aboydnw commented Sep 23, 2024

I added an AC for documenting functionality. In particular, I am thinking it would be good to document how we achieve the list of options, as @dzole0311 defined in #1117

The precedence of the color maps are as follows:

  • Start with what is configured in the sourceParams of the dataset
  • If it's not defined, check for the dashboard render configuration coming from STAC endpoint
  • If still undefined, check for asset-specific renders using the sourceParams' assets. This is a special edge case for some datasets that have multiple assets (multiple assets under one collection item)
  • If all else fails, default to viridis

@snmln snmln self-assigned this Oct 2, 2024
snmln added a commit that referenced this issue Oct 18, 2024
**Related Ticket:**
#1102

### Description of Changes
Creation and implementation of new range slider component. 

### Notes & Questions About Changes
-There is a identified bug that while dragging the slider thumbs you can
drag the entire panel up and down influencing the parent component
position.
-Additional functionality: If input field is left empty and clicked
outside of the default _min_ or _max_ should auto populate the field.

### Validation / Testing
Navigate to a data exploration and add a layer to the timeline. 
- **Layers:**
- Confirm that **min** and **max** are accurate to value in the layer
legend view.
- Switch to another layer with different value confirm that the min and
max in the range slider are accurate.
- Select a layer with a min value less than 0 (net ecosystem exchange)
you should see a middle marker that represents the center of the current
gradient values.
- **Slider:**
- You should not be able to drag the min slider past the max slider, or
the max slider past the min slider.
- **Text Inputs:**
- You should be able to type in a value greater or lower than the min
max of the layer but then be shown with the error message _Please enter
a value between {min} and {max}_ no change to the slider range or the
map.
- After selecting a different max that is less than the layers absolute
maximum with either slider or input, if you enter in a value in the min
text input that is greater than the newly selected max you should be
presented with an error message _Please enter a value less than {max}_
- After selecting a different min that is larger than the layers
absolute minimum with either slider or input, if you enter in a value in
the max text input that is greater than the newly selected max you
should be presented with an error message _Please enter a value larger
than {min}_
@snmln snmln closed this as completed Oct 18, 2024
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

No branches or pull requests

4 participants