Open mattrosno opened 2 years ago
Should we show pre-released data (e.g. default branch)? Or only data coming from tagged releases?
If we show pre-release data, should the version in the dashboard say "Latest"?
This issue was discussed in this Slack thread: https://ibm-studios.slack.com/archives/GSCEH4RSP/p1667501190174149
Per the release radar, releases are published every two weeks: https://github.com/carbon-design-system/carbon/wiki/Release-radar
The system squad doesn't create the tags until the release.
Since we're indexing main branch, there can be up to a two week window where content could get off. For example, let's say main branch has updated a demoLink
in the carbon.yml
metadata time. But, that demo link isn't valid until the next release is published and Storybook is deployed.
In that scenario, we wouldn't want main to be indexed by default; we'd want the default indexed version to be what's deployed to Storybook. Ideally, that version should also be the latest
tag in npm: https://www.npmjs.com/package/@carbon/react
Right now, our URL strategy uses latest
to map to the the repository's default branch (e.g. main
or master
.)
https://next.carbondesignsystem.com/libraries/carbon-react/latest
Instead, we might need to update our logic so latest
maps to the latest
npm tag. In that example, even through the URL says latest
, it renders this parameter:
https://next.carbondesignsystem.com/libraries/carbon-react/v11.17.0
(This assumes the fix for https://github.com/carbon-design-system/carbon-platform/issues/915 is in, so the URL used is for the repository v11.17.0, which includes the latest version v1.17.0 for the @carbon/react
package.)
Each library will likely have a version dropdown or table. Selecting a version will keep you on-site to view the library at that point in time.
We get library (and its asset) data by querying for GitHub content at a
ref
which can be the name of the commit, a branch, or a tag. The defaultref
if not specified is the repository's default branch.For a library to show up in the web application, the library at that
ref
needs validcarbon.yml
files so we can index it. The question then becomes: how do we know which versions to include in the dropdown or table?There are some UX and content issues to figure out:
There are also some GitHub API questions:
v10
branch) but also gets updated over time through tagged releases?If the version switcher (dropdown or table) shows valid versions that you can switch to, we'll likely need scheduled job that on a timer:
carbon.yml
files), the library now exists in our caching layers and can then be queried and included in the version switcherThis issue is to determine the version prefetching capabilities. Once this is known, we can determine design considerations prior to implementing in the client.