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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Core: Support parameters.__id and metaId in indexers #23656

Merged
merged 5 commits into from
Jul 30, 2023

Conversation

JReinhold
Copy link
Contributor

@JReinhold JReinhold commented Jul 29, 2023

Works on #23457

What I did

  1. This PR changes the IndexInput:
    1. rename key to exportName
    2. Add support for metaId, to optionally overwrite the automatic generation of meta id based on title. If this is passed by the indexer, it must also be set at meta.id to be picked up by the preview too. CsfFile.parse() already does all of this.
    3. Add support for __id, to optionally overwrite the automatic generation of the whole story id. If this is passed by the indexer, it must also be set at story.parameters.__id to be picked up by the preview too.
  2. Adds support for story.parameters.__id in CsfFile.parse(). If this is set now, the story will pick that up as the its id, disregarding anything else.

How to test

See new unit tests for CsfFIle, as well as the updated ones with the IndexInput changes. I've also added some stories that tests the custom id, that should show up in Chromatic.

Checklist

  • Make sure your changes are tested (stories and/or unit, integration, or end-to-end tests)
  • Make sure to add/update documentation regarding your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Maintainers

  • When this PR is ready for testing, make sure to add ci:normal, ci:merged or ci:daily GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found in code/lib/cli/src/sandbox-templates.ts
  • Make sure this PR contains one of the labels below.

["cleanup", "BREAKING CHANGE", "feature request", "bug", "build", "documentation", "maintenance", "dependencies", "other"]

馃 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>

@JReinhold JReinhold self-assigned this Jul 29, 2023
@JReinhold JReinhold added core ci:daily Run the CI jobs that normally run in the daily job. maintenance User-facing maintenance tasks labels Jul 29, 2023
@JReinhold JReinhold marked this pull request as ready for review July 29, 2023 22:25
Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! This still all seems a little more convoluted than it could be, but I don't have any suggestions

@JReinhold JReinhold merged commit 2a6ca2e into indexer-api Jul 30, 2023
99 of 100 checks passed
@JReinhold JReinhold deleted the change-indexer-api branch July 30, 2023 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci:daily Run the CI jobs that normally run in the daily job. core maintenance User-facing maintenance tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants