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

Implement storySort for React Native #414

Open
mattg95 opened this issue Dec 28, 2022 · 7 comments
Open

Implement storySort for React Native #414

mattg95 opened this issue Dec 28, 2022 · 7 comments

Comments

@mattg95
Copy link

mattg95 commented Dec 28, 2022

Is your feature request related to a problem? Please describe.
I'd like to be able to sort my stories alphabetically in React Native.

Describe the solution you'd like
I'd like an implementation of sortStory that allows alphabetical ordering, ideally with the same behaviour as in React.

Describe alternatives you've considered
I've considered manually editing /storybook.requires.js with a .sort() function. However, there is a warning against editing this file at the top of the file:
/* do not change this file, it is auto generated by storybook. */
and the any changes are lost after re-running sb-rn-get-stories.

Are you able to assist bring the feature to reality?
No

Additional context
Add any other context or screenshots about the feature request here.

@dannyhw
Copy link
Member

dannyhw commented Dec 30, 2022

Will add it to the list of improvements

@Peeeep
Copy link

Peeeep commented Jan 23, 2023

This works out of the box (at least on 6.0.1-beta.11 it does):

Bildschirm­foto 2023-01-23 um 16 10 53

@dannyhw
Copy link
Member

dannyhw commented Jan 23, 2023

@Peeeep nice!! I was kinda hoping it would but hadn't confirmed it 😅

@dannyhw
Copy link
Member

dannyhw commented Apr 2, 2023

I believe that this is working in the current stable version ^6.5 so I'm closing this. Let me know if you would like to reopen.

see here for more details on sorting stories in csf:
https://storybook.js.org/docs/react/writing-stories/naming-components-and-hierarchy#sorting-stories

@dannyhw dannyhw closed this as completed Apr 2, 2023
@gimi-anders
Copy link

I am not getting this to work for react-native. Is it really working, or am I doing something wrong? Can someone confirm if it works? I am using SB v.8.

@gimi-anders
Copy link

@dannyhw Can you confirm it is working, or can you reopen this issue?

@dannyhw dannyhw reopened this Jan 29, 2025
@dannyhw
Copy link
Member

dannyhw commented Jan 29, 2025

Seems like there may have been a regression in 8.5, i don't have availability to work on this until atleast next week but once i do i will look into it

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

No branches or pull requests

4 participants