Open Sidnioulz opened 2 days ago
CI is running/has finished running commands for commit 247e65cde81b6a4f5707ed610f4b42cfe1727c43. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.
📂 See all runs for this CI Pipeline Execution
Sent with 💌 from NxCloud.
What I did
I edited the code converting the story index to story hashes for use in the manager (transformStoryIndexToStoriesHash), to add a
tags
property for'group'
entries, which is the intersection of all their stories' hashes.This is the
'group'
counterpart of https://github.com/storybookjs/storybook/pull/29343. I am opening the PR because users of my addon have come to me requesting support for badges in group entries of the sidebar, which requires that tags are also computed for these: https://github.com/Sidnioulz/storybook-addon-tag-badges/issues/20.Checklist for Contributors
Testing
The changes in this PR are covered in the following automated tests:
Manual testing
This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!
renderLabel
function that prints all tagsstorybook:ui
instanceDocumentation
Still not sure how/where to document this, like I pointed out in the component PR.
Checklist for Maintainers
ci:normal
,ci:merged
orci:daily
GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found incode/lib/cli-storybook/src/sandbox-templates.ts
[ ] Make sure this PR contains one of the labels below:
Available labels
- `bug`: Internal changes that fixes incorrect behavior. - `maintenance`: User-facing maintenance tasks. - `dependencies`: Upgrading (sometimes downgrading) dependencies. - `build`: Internal-facing build tooling & test updates. Will not show up in release changelog. - `cleanup`: Minor cleanup style change. Will not show up in release changelog. - `documentation`: Documentation **only** changes. Will not show up in release changelog. - `feature request`: Introducing a new feature. - `BREAKING CHANGE`: Changes that break compatibility in some way with current major version. - `other`: Changes that don't fit in the above categories.🦋 Canary release
This PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the
@storybookjs/core
team here._core team members can create a canary release here or locally with
gh workflow run --repo storybookjs/storybook canary-release-pr.yml --field pr=<PR_NUMBER>
_Greptile Summary
Added support for tags in GroupEntry objects within the Storybook manager's sidebar, computing them as the intersection of child stories' tags.
tags
property toAPI_GroupEntry
interface incode/core/src/types/modules/api-stories.ts
intersect
utility incode/core/src/manager-api/lib/intersect.ts
with stricter array validationtransformStoryIndexToStoriesHash
incode/core/src/manager-api/lib/stories.ts
to compute group entry tagscode/core/src/manager-api/tests/stories.test.ts
verifying tag inheritance for group entries