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

Expose Data Catalog and update child components to pass in routing/nav #1096

Merged
merged 11 commits into from
Sep 6, 2024

Conversation

sandrahoang686
Copy link
Collaborator

@sandrahoang686 sandrahoang686 commented Aug 7, 2024

Related Ticket: #1085

Description of Changes

  • Exposes Data Catalog component
  • Updates child components to pass in routing/nav and link component

Notes & Questions About Changes

  • Manually test that Data Catalog filters are working as is in current architecture

Validation / Testing

  • Make sure Data Catalog works as expected including filtering and all cards
  • Make sure Data Layer Selector Modal cards work as expected
  • Make sure stories hub cards works as expected

Copy link

netlify bot commented Aug 7, 2024

Deploy Preview for veda-ui ready!

Name Link
🔨 Latest commit 0de867b
🔍 Latest deploy log https://app.netlify.com/sites/veda-ui/deploys/66daf1808291000008e61269
😎 Deploy Preview https://deploy-preview-1096--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 Initial work to expose and connect Data Catalog Expose Data Catalog and update child components to pass in routing/nav Aug 26, 2024
@sandrahoang686 sandrahoang686 marked this pull request as ready for review August 26, 2024 22:46
sandrahoang686 added a commit that referenced this pull request Aug 30, 2024
**Related Ticket:** Very vaguely related to #946 

This PR makes the Card component delegate what link component to render
to the `SmartLink` component. I initially started working on this PR to
continue the work on #1096,
more specifically, to make the link component come from props. I thought
this change was worth merging regardless of whether we work on the
routing problem now or later.
@sandrahoang686 sandrahoang686 force-pushed the refactor/1085-expose-data-catalog branch from 6ce5f21 to 5b3fc8d Compare August 30, 2024 16:57
let navCommit = navigate;

if (push) {
navCommit = ({ search }) => navigate.push(`?${search}`);
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think there is a potential to make it even more flexible if we just let the instance to pass this whole thing as navigate props. ex. Replace this line: https://github.com/developmentseed/next-veda-ui/pull/3/files#diff-6578b281e50705562cdf8ba73c73ae2bb1df366e18e91e9595106b09cfbf3f89R14

 const controlVars = useFiltersWithQS({navigate: ({ search }) => router.push(`?${search}`)});

then let's say if the instance wants to replace the url instead of push, it can handle it on its level. (and no additional push props is needed) What do you think?

Copy link
Collaborator Author

@sandrahoang686 sandrahoang686 Sep 5, 2024

Choose a reason for hiding this comment

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

I think that also makes sense but I think we should work on closing out the PR if this is not blocking we can address this in the routing ticket / make note of this. Is that fine with you?

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.

Thanks for working on it 🙇 It will be great to get one more testing (clicking around and making sure everything is ok) but here is my approval for a swift merge.

Copy link
Collaborator

@dzole0311 dzole0311 left a comment

Choose a reason for hiding this comment

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

I think I spotted a bug which I can't see in the rest of the deployments:

  1. Go to Data Catalog
  2. Click on "CASA-GFED3 Land Carbon Flux"
  3. Click on "Explore Data"
  4. I get an error page with Cannot destructure property 'pathname' of 'e' as it is undefined

The button should lead to the E&A page with the dataset filtered.

@sandrahoang686
Copy link
Collaborator Author

@dzole0311 thanks for catching, fixed ✅

@aboydnw
Copy link
Contributor

aboydnw commented Sep 6, 2024

Looks good to me! I clicked around the data catalog/overview, stories, and E&A and didn't. notice anything off

@sandrahoang686 sandrahoang686 merged commit 4a6c978 into main Sep 6, 2024
8 checks passed
@sandrahoang686 sandrahoang686 deleted the refactor/1085-expose-data-catalog branch September 6, 2024 16:32
hanbyul-here added a commit that referenced this pull request Sep 18, 2024
**Related Ticket:** Follow up of
#1096 &
d84527b#diff-7d1c949cac222e52ef45864275aff43e6fa94599bd4684d9611fa25b610e900b

### Description of Changes
- I accidentally removed the question mark operator while running a lint
[in the previous pr](
d84527b#diff-7d1c949cac222e52ef45864275aff43e6fa94599bd4684d9611fa25b610e900b)
and this operator is actually needed. I put the proper type so it
doesn't happen with automatic lint
- I made the Card Component work backward compatible since the component
is exposed to instance levels.
- Simplified parameters for `useFiltersWithQS`

### Notes
- I found another bug on filters that the selected value is not being
displayed, but it can be handled separately.
- I checked the library build locally, but didn't publish it yet. will
do after the review.
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.

4 participants