Skip to content

fix: storysort#677

Merged
dannyhw merged 8 commits intonextfrom
dannyhw/fix-experimental-storysort
Feb 8, 2025
Merged

fix: storysort#677
dannyhw merged 8 commits intonextfrom
dannyhw/fix-experimental-storysort

Conversation

@dannyhw
Copy link
Member

@dannyhw dannyhw commented Jan 30, 2025

Issue: #414

What I did

figuring out how to apply sorting in v8

How to test

Please explain how to test your changes and consider the following questions

  • Does this need a new example in examples/expo-example?
  • Does this need an update to the documentation?

If your answer is yes to any of these, please make sure to include it in your PR.

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.

This looks great on first glance. Does it work?

@dannyhw
Copy link
Member Author

dannyhw commented Jan 31, 2025

@shilman heres the result on this pr

before

sort is specified but ignored
image

after

Sort specified (note that the order changed)
image

No sort specified
image

@dannyhw dannyhw changed the title WIP: experimental storysort WIP: storysort Jan 31, 2025
@dannyhw dannyhw marked this pull request as ready for review January 31, 2025 16:15
@dannyhw dannyhw changed the title WIP: storysort fix: storysort Jan 31, 2025
return { index, importMap };
const sortableStories = Object.values(index.entries);

sortStoriesV7(
Copy link
Member Author

Choose a reason for hiding this comment

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

pulling in sort stories from preview api to reuse sorting code

options?: ReactNativeOptions;
}) {
const { index, importMap } = prepareStories({ storyEntries, options });
const composedAnnotations = composeConfigs<ReactRenderer>(annotations);
Copy link
Member Author

Choose a reason for hiding this comment

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

using composeConfig lets us read the parameters synchronously

@dannyhw dannyhw merged commit 33484c6 into next Feb 8, 2025
1 check passed
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.

2 participants