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

Remove deprecated properties from api-stories #25361

Closed
Tracked by #25331
yannbf opened this issue Dec 28, 2023 · 4 comments · Fixed by #25578
Closed
Tracked by #25331

Remove deprecated properties from api-stories #25361

yannbf opened this issue Dec 28, 2023 · 4 comments · Fixed by #25578
Assignees

Comments

@yannbf
Copy link
Member

yannbf commented Dec 28, 2023

It's unclear whether to remove these deprecated properties from the api-stories module in Storybook 8:

@ndelangen @shilman please let us know whenever you can, and what should be done migration-wise 🙏

@shilman
Copy link
Member

shilman commented Dec 29, 2023

Yes please remove them. They are superceded by type: 'root' | 'group' | 'component' | 'docs' | 'story'

@yannbf yannbf changed the title Determine whether to remove deprecated properties from api-stories Remove deprecated properties from api-stories Jan 2, 2024
@yannbf
Copy link
Member Author

yannbf commented Jan 2, 2024

@shilman can you explain what this code becomes?

useEffect(() => {
    if (api && props.isHighlighted && item.isComponent) { // <-- this becomes `item.type === 'component'` I assume
      api.emit(
        PRELOAD_ENTRIES,
        { ids: [item.isLeaf ? item.id : item.children[0]] }, // what about item.isLeaf? maybe a combination of checking parent and no children?
        { options: { target: item.refId } }
      );
    }
  }, [props.isHighlighted, item]);

@ndelangen
Copy link
Member

isLeaf = 'docs' | 'story', I think.

@yannbf
Copy link
Member Author

yannbf commented Jan 4, 2024

Reminder to shelve this until the storyStoreV6 work is done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants