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

Some datasets can only be analyzed with layers from the same source #913

Merged
merged 8 commits into from
Apr 9, 2024

Conversation

sandrahoang686
Copy link
Collaborator

@sandrahoang686 sandrahoang686 commented Apr 4, 2024

Related Ticket:

Closes #882 (comment)

Description of Changes

  • New dataset markdown attribute sourceExclusive added
  • When sourceExclusive, dataset can only be selected to be analyzed with other layers from the same dataset/source
  • Updates data layer selector modal
    • Remove show/hide filters
    • Allow only 4 filters with the search bar and then wrap all other filters below
    • Remove SortBy filter
    • Remove heading description to only appear in empty/not found state
    • Move note about limited selection of available datasets from top bar to the message that is shown when search and/or filters do not return any layers.

Notes & Questions About Changes

{Add additonal notes and outstanding questions here related to changes in this pull request}

Validation / Testing

{Update with info on what can be manually validated in the Deploy Preview link for example "Validate style updates to selection modal do NOT affect cards"}

Copy link

netlify bot commented Apr 4, 2024

Deploy Preview for veda-ui ready!

Name Link
🔨 Latest commit bde0e10
🔍 Latest deploy log https://app.netlify.com/sites/veda-ui/deploys/66141309ecd0b200095d6215
😎 Deploy Preview https://deploy-preview-913--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.

@sandrahoang686 sandrahoang686 changed the title Push up exclusive logic Some datasets can only be analyzed with layers from the same source Apr 6, 2024
@sandrahoang686 sandrahoang686 marked this pull request as ready for review April 6, 2024 21:51
@sandrahoang686 sandrahoang686 requested review from j08lue, hanbyul-here and faustoperez and removed request for j08lue April 6, 2024 21:51
@@ -178,6 +178,7 @@ export interface LayerInfo {
*/
export interface DatasetData {
featured?: boolean;
sourceExclusive?: string;
Copy link
Collaborator

Choose a reason for hiding this comment

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

If this is a binary value, would it make sense to make it boolean?

Copy link
Contributor

Choose a reason for hiding this comment

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

I see the value is actually used, so it is not a boolean flag.

https://github.com/NASA-IMPACT/veda-ui/pull/913/files#diff-e7c2bc61a035bdafe3d86d260f7cddb201aadb0195fcf1cd261139932ea00cc4R122

So, basically, you define here, which source value can exclusively be used. That is a bit redundant, though, because the is already defined under taxonomy, so a boolean flag would be cleaner for this simple case where only the source of the current dataset can be exclusive.

Copy link
Collaborator Author

@sandrahoang686 sandrahoang686 Apr 8, 2024

Choose a reason for hiding this comment

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

I think I did this because some datasets look like they can have more than 1 source value like here. So to set the filter the easiest, i opted to do it like so. lmk if there are better ideas though and I will go change 🏃🏼‍♀️

Copy link
Contributor

@j08lue j08lue Apr 8, 2024

Choose a reason for hiding this comment

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

This is great for now, thanks! We can refine later, if we learn more about the use cases and needs for these restrictions - or find out we can avoid them with other solutions. 🤞

Copy link
Contributor

@j08lue j08lue left a comment

Choose a reason for hiding this comment

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

The logic is as intended, great work! 💯

A little improvement might be if the filters from the layer selection modal would stick. Currently, they are reset when you add layers to the map, so if you add a layer from a "source-exclusive" dataset and then return to the layer selection modal to add more, you see all layers to select from, without the (source) filter. Changing that does not need to be in scope for this issue.

@@ -178,6 +178,7 @@ export interface LayerInfo {
*/
export interface DatasetData {
featured?: boolean;
sourceExclusive?: string;
Copy link
Contributor

Choose a reason for hiding this comment

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

I see the value is actually used, so it is not a boolean flag.

https://github.com/NASA-IMPACT/veda-ui/pull/913/files#diff-e7c2bc61a035bdafe3d86d260f7cddb201aadb0195fcf1cd261139932ea00cc4R122

So, basically, you define here, which source value can exclusively be used. That is a bit redundant, though, because the is already defined under taxonomy, so a boolean flag would be cleaner for this simple case where only the source of the current dataset can be exclusive.

@j08lue j08lue merged commit d91fba7 into main Apr 9, 2024
8 checks passed
@j08lue j08lue deleted the fix/epa-datasets-exclusion branch April 9, 2024 08:26
hanbyul-here added a commit that referenced this pull request May 1, 2024
## 🎉 Features
- Zoom in AOI, TOI when analysis is run in
#906
- Add custom javascript injection
#846
- ADR for V2 Refactor: #875
- Open all external links in a new tab in
#870
- Include dataset id to filter layers in
#910
- Some datasets can only be analyzed with layers from the same source in
#913
- Create minimal partial data layer scaffold starting off with Data
Catalog for VEDA2 Refactor in
#893
- Add analysis preset in #921

## 🚀 Improvements
- Chart style improvement in
#903
- Data Catalog enhancement with floating filter sidebar in
#918
- Sum as statistics option in
#925
-
## 🐛 Fixes
- Sort featured stories based on publication date in descending order in
#907
- Replace latency with temporalResolution in layer info in
#898
- Add a workaround for Safari scroll problem in
#909
- Handle empty result in #922
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.

[E & A] Some datasets cannot be selectable together with others
3 participants