Open CoryDuncan opened 2 years ago
Thanks for your kind words! I see what you mean. For example, being able to move a story to the beginning, but leaving the rest in the import order. Or ordering just the first-level groups explicitly, and leaving the stories in the import order.
It could be possible. The trick would be finding out the import order. It is not a parameter passed to te sorting method, though. I'll give it a thought, how to get or infer the import order.
If you or somebody else wanted to give it a shot, I added support for custom comparators of group and story names in 1.2.0, which can check not only the two compared names, but also group paths, which lead to them. I would help, if the list of full story paths in the imported orders gets somehow available.
@prantlf Excellent package, thank you for this. It works well, I just had one question regarding to the "fallback sort":
Is it possible to configure the fallback sort to be the order of stories defined in the file, matching the Storybook default, instead of alphabetically?