NASA-IMPACT / veda-ui

Frontend for the Dashboard Evolution project
Other
25 stars 5 forks source link

Hiding certain data stories from catalog #1088

Open aboydnw opened 3 months ago

aboydnw commented 3 months ago

Context

For GHGC R3, they will be using the data stories construct to create custom pages for and Urban landing page (and others)

This will help us meet the needs for R3, but we do not want those pages to appear in the stories catalog. So, we need to make sure some stories are hidden. This can be manually defined.

Sounds like this is already possible, just needs some custom work. We should work with the UAH team to get this done.

Acceptance Criteria

slesaad commented 3 months ago

@hanbyul-here @sandrahoang686 can you add details here for what custom work needs to be done? I wasn't aware it was already possible 😄

dzole0311 commented 3 months ago

@slesaad I opened up a draft to check if this is what we want: https://github.com/NASA-IMPACT/veda-ui/pull/1090

Basically, I introduced a isHidden prop which could be optionally added to the story in the .mdx. This story will then not be shown in the stories catalog, but it will still be known to the veda-ui and could be navigated to via routing.

Example with "This is the life of water":

Stories catalog (hidden): https://deploy-preview-1090--veda-ui.netlify.app/stories Story page: https://deploy-preview-1090--veda-ui.netlify.app/stories/life-of-water

However the story will still appear as a featured story unless isFeatured is also set to false in the .mdx, so it's pretty configurable.

slesaad commented 3 months ago

@dzole0311 that's exactly what we wanted! great that you also added it to datasets, I'm sure that's gonna be really useful too. thanks for doing this so quickly!

slesaad commented 3 months ago

@dzole0311 just noticed that the count in the stories page still counts the hidden stories - example here https://deploy-preview-451--ghg-demo.netlify.app/stories. That might be confusing to the users.