carbon-design-system / carbon-platform

The "next" version of the Carbon Design System website, as a platform.
https://next.carbondesignsystem.com
Apache License 2.0
21 stars 5 forks source link

Add `overviewPath` to asset docs schema #1015

Closed mattrosno closed 2 years ago

mattrosno commented 2 years ago

Summary

Design spec: https://www.figma.com/file/Cs94zXOUUEizXNdDz263OA/Component-demo?node-id=114%3A169975

Because the Storybook embed will be achieved through a new MDX component, we need a file to use that new component.

We can add an overviewPath to asset.docs in the schema to render content immediately below the dashboard. See: https://github.com/carbon-design-system/carbon-platform/blob/main/docs/resource-schemas.md#asset-docs

Acceptance criteria

What requirements must be met to complete this request?

(We might need to create a new Contributing > Assets page to house that and other documentation templates.)

mattrosno commented 2 years ago

Hey team! Please add your planning poker estimate with ZenHub @alisonjoseph @francinelucca @andreancardona

francinelucca commented 2 years ago

@kingtraceyj @aubrey-oneal what should happen here when the specified overview content path doesn't exist? (404)? 🤔 since this isn't the entire page, just a section

alisonjoseph commented 2 years ago

I think if it doesn't exist then we just don't display content, there might be some components that don't have this file, at least to start with, and that's ok.

francinelucca commented 2 years ago

I agree we can just not display anything, wanted to confirm with design if that's ok?

mattrosno commented 2 years ago

The content of this file gets inserted in the slot in the Overview page below the dashboard. There will always be an Overview page tab and dashboard. So if there's no overviewPath indexed, it's a no-op.

francinelucca commented 2 years ago

The content of this file gets inserted in the slot in the Overview page below the dashboard. There will always be an Overview page tab and dashboard. So if there's no overviewPath indexed, it's a no-op.

yeah so I'm asking what if there is an overviewPath indexed, but when we try to retrieve the content doesn't actually exist?

francinelucca commented 2 years ago

this content is loaded runtime and requires remote mdx functionality so marking #321 epic as a blocker

kingtraceyj commented 2 years ago

Ideally, we would default to the usage page when there is no overview content.

Then for the overview, instead of having just a blank page, it would be nice to have some sort of information about why there is a blank page. Here's a good overview of best practices or 404's or maintenance pages. I'm thinking something simple like: image

mattrosno commented 2 years ago

@kingtraceyj the dashboard will always be there, even if there are errors getting overview content.

kingtraceyj commented 2 years ago

ah. i see. as long as there is something there then that's ok!

mattrosno commented 2 years ago

@francinelucca this issue is no longer blocked by design response. If overviewPath is indexed, but it's invalid and the content doesn't actually exist, because the dashboard will always be there, @kingtraceyj is okay with doing nothing (not showing an error.)