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

Create new raster paint layer module and factor out BaseTimeseriesPropos #1105

Merged
merged 2 commits into from
Aug 16, 2024

Conversation

abarciauskas-bgse
Copy link
Contributor

@abarciauskas-bgse abarciauskas-bgse commented Aug 13, 2024

Related Ticket: #1055

Description of Changes

Simply put, this PR is a small refactoring to create a basic RasterPaintLayer available, which both ZarrTimeseries and CmrTimeseries use.

  • Both CmrTimeseires and ZarrTimeseries were using ZarrPaintLayer. It seems appropriate then to rename ZarrPaintLayer to RasterPaintLayer and put it in a separate file.
  • Merged common attributes of Raster, Zarr, and CmrTimeseriesPropos into `BaseTimeseriesProps

Notes & Questions About Changes

  1. Should I create a new issue to remove the Zarr and Cmr layers from the app/scripts/common/components/mapbox/layers?
  2. I noticed that a request is made for tiles even when the selected date falls outside of the datasets temporal range. Is this the expected behavior? I raised an issue in titiler-xarray (Tile API should not return tiles if time_slice is outside dataset bounds developmentseed/titiler-xarray#62) that the API should not respond with tiles in this case, but also wondering if a request should be made at all 🤔
    • This is probably something we need to fix in useZarr and useCmr, so the question is, should we do that in this PR or a new PR? I would propose a new PR to keep changes as minimal as possible.

Validation / Testing

I loaded the layers in the deploy preview, used the show/hide and time slider to make sure all that functionality was working as expected. I came across the issue described in (2) under Notes & Questions About Changes

Copy link

netlify bot commented Aug 13, 2024

Deploy Preview for veda-ui ready!

Name Link
🔨 Latest commit 1568002
🔍 Latest deploy log https://app.netlify.com/sites/veda-ui/deploys/66bb83109ea8120008c9c4ac
😎 Deploy Preview https://deploy-preview-1105--veda-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@hanbyul-here
Copy link
Collaborator

hanbyul-here commented Aug 15, 2024

Thanks for doing incredible work and reporting some issues @abarciauskas-bgse 🙇

To address your points,

  1. Should I create a new issue to remove the Zarr and Cmr layers from the app/scripts/common/components/mapbox/layers

Let's not worry about it now. We will likely remove /mapbox/layers folder soon.

  1. I noticed that a request is made for tiles even when the selected date falls outside of the datasets temporal range.

I had to think about this one. You are totally right that this should not happen. The intended experience is that the date picker should not allow you to select the date ranges outside of the temporal extent of the dataset. (ex. CMIP6 dataset has temporal extent of [ "1950-01-01T12:00:00+00:00", "2014-12-31T12:00:00+00:00" ] and we disable any dates from the picker outside of this bound.

Screenshot 2024-08-15 at 3 24 25 PM

(The content below was edited because I realized my first response was not accurate! )

I wonder why you were able to select the date at all from the beginning. - Can you share the stac response and check the temporal extent is accurate? We're making a request to the STAC endpoint at the very beginning to retrieve the temporal extent of the dataset even before rendering each layer. And it seems like something went wrong/ something is missing there. If this is the case (that this error is not coming from the layer-related hooks) I think it would be better to address this issue separately, as long as it’s acceptable to have a suboptimal experience for these datasets for the moment 🙇

Copy link
Collaborator

@hanbyul-here hanbyul-here left a comment

Choose a reason for hiding this comment

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

LGTM 👍!
I would like to know more about the issues mentioned in the PR, that the request being made for tiles even when the selected date falls outside of the dataset temporal range. But if we are handling that issue separately anyway, that should not be a blocker.

@abarciauskas-bgse
Copy link
Contributor Author

abarciauskas-bgse commented Aug 16, 2024

@hanbyul-here I am going to merge this for now so as not to fall behind main but will be writing up an issue soon on the temporal extent bug. I raised the issue in developmentseed/titiler-xarray#62. As an FYI I think this is only an issue for titiler-xarray, not titiler-cmr. Since titiler-cmr forwards the datetime parameter to the CMR query, I believe its the case that if nothing returns for that datetime query, then the response is a 204.

@abarciauskas-bgse abarciauskas-bgse merged commit 41b77fb into main Aug 16, 2024
8 checks passed
@abarciauskas-bgse abarciauskas-bgse deleted the create-raster-paint-layer branch August 16, 2024 18:47
sandrahoang686 added a commit that referenced this pull request Aug 27, 2024
## 🎉 Features
- 🦗 
## 🚀 Improvements
- Adding styles & Configurations for R3
#1104
- Create new raster paint layer module and factor out
BaseTimeseriesProps #1105
- Remove PurgeCSS, configure USWDS to use only tablet breakpoints
#1112
- Open an external link in a new tab
#1116
- Expose USWDS card style
#1119

## 🐛 Fixes
- Do not render exploration component unless urlAtom is on the right
page #1106
sandrahoang686 added a commit that referenced this pull request Sep 25, 2024
## 🎉 Features
- [E&A] Implement colormap configurability
#1117
- [E&A] Feature flag colormap configurability
#1147
- Add font md size as 20px for new Design System
#1125
## 🚀 Improvements
- [E&A] Return default value of colormap along with other settings
#1128
- Create new raster paint layer module and factor out
BaseTimeseriesProps #1105
- Consolidate a place where to check linkProps
#1121
#1160
- Expose Data Catalog and update child components to pass in routing/nav
for library build #1096
#1159
- Set up eslint rule for no trailing spaces
#1146
- Replace cmr-stac with titiler-cmr
#1131
## 🐛 Fixes
- Update external link in top navigation target
#1145
- Update PageHeader/Nav to not throw
#1149
- [E&A] Fix to convert the time to usertzdate
#1151
- Use sourceparams as it is when it is there
#1148
- Fix compare label on block map
#1153
- Discard the previous sourceExclusive value to fix the case when the
datasets with different sourceExclusive can be selected together
#1161
- Show the name of the selected filter on story hub
#1161
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.

2 participants