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

Hiding certain data stories from catalog #1088

Open
1 task
aboydnw opened this issue Aug 5, 2024 · 4 comments
Open
1 task

Hiding certain data stories from catalog #1088

aboydnw opened this issue Aug 5, 2024 · 4 comments
Assignees

Comments

@aboydnw
Copy link
Contributor

aboydnw commented Aug 5, 2024

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

  • Stories manually identified by the GHG team do not appear on the stories catalog view, but can still be viewed by navigating directly to them (or via top nav, other means)
@slesaad
Copy link
Member

slesaad commented Aug 5, 2024

@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
Copy link
Collaborator

dzole0311 commented Aug 6, 2024

@slesaad I opened up a draft to check if this is what we want: #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
Copy link
Member

slesaad commented Aug 6, 2024

@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!

dzole0311 added a commit that referenced this issue Aug 7, 2024
**Related Ticket:** #1088

### Description of Changes
This ticket introduces a `isHidden` prop for both stories and datasets,
so that they could be hidden from the appropriate catalogs. If a story
has this new prop, then it will 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

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

### 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"}_
@slesaad
Copy link
Member

slesaad commented Aug 9, 2024

@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.

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

3 participants