Closed Spone closed 7 years ago
I mean, I can have this in my layout:
mv_components.sort_by(&:name).each do |component|
But if you think it should be the default, I'd be happy to prepare a PR for this.
Great point @Spone! Yeah, it should definitively be the default.
I'll push the change and release a patch version in a bit.
Thanks for the input!!
Just out of curiosity, in what OS and ruby version are you noticing this?
Ubuntu 16.04 LTS, Ruby 2.4.1 (yeah it's pretty weird that the file system returns them in this order)
Also, it's a detail but I think you should consider using:
link_to_unless_current component.title, styleguide_path(id: component.name)
instead of
link_to component.title, styleguide_path(id: component.name)
So the current component is shown differently.
@Spone that's a good point to! Will update and release in the same version bump :)
Changes released in v0.12.3 🎉
Thanks for your help and input @Spone!!
Hello there,
I can't figure out why my components are not displayed in alphabetical order in my styleguide sidebar. Is there a way to force this (without adding some specific logic in my layout)?
I think it should be the default, what do you think?
Thanks