Skip to content

Conversation

@langermank
Copy link
Contributor

Reorganizing and creating a reusable format for story documentation (using ActionList as an example)

COMPONENTS
- ActionList [top level folder]
-- ActionList [component folder]
--- Playground [all controls available, page]
--- Features [folder]
---- Feature 1 [specific feature of component]
---- Feature 2 (etc etc)
-- Examples [folder]
--- Example 1 [page, detailed composition or github scenario]

Storybook sidebar navigation

👋 I'm looking for help to implement storySort https://storybook.js.org/docs/react/writing-stories/naming-components-and-hierarchy#sorting-stories so we can make sure Examples is always at the bottom of the component folders

@changeset-bot
Copy link

changeset-bot bot commented Jan 15, 2022

⚠️ No Changeset found

Latest commit: 7bc890a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Member

@siddharthkp siddharthkp left a comment

Choose a reason for hiding this comment

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

Love the idea, ship it!

@vdepizzol
Copy link
Contributor

@langermank love this!

👋 I'm looking for help to implement storySort

storySort seems to use the same behavior as compareFunction used by sort in javascript. Maybe something as simple as this could do the work?

// test:
// let items = ['ActionList', 'ActionListDivider', 'ActionListExamples', 'ActionListTreeFeatures'];

items.sort((a, b) => {
  if (b.includes('Examples')) return -1;
  return 0;
})

@vdepizzol vdepizzol self-requested a review January 18, 2022 21:17
@langermank langermank merged commit 1ca80ff into main Jan 18, 2022
@langermank langermank deleted the actionlist-doc-cleanup branch January 18, 2022 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants