This is a small thing that I've noticed - doesn't seem to impact the published page (which is good). I keep trying to reorder "Home" to be the first link in the nav. Click save. See published page and notice "Home" is where I expect (good). Then, I go back to the config page and see that Home has decided to reorder itself again. Just a weird blip of thing - but not too big of a deal." ~Devon in Slack 5/11
While the order was being persisted in the database the link options were reordering the selectize values which would have unintentionally reordered the navigation links on a subsequent save. This PR makes sure that the link options match the order of the selected links so that selectize does not reorder them.
Changes
orders link options by the navigation link order to ensure that order
of selected options are preserved across saves
fixes flaky feature website/configuration_spec.rb to be more explicit
about slug path
Reason for Change
Devon noticed the following buggy behavior:
While the order was being persisted in the database the link options were reordering the selectize values which would have unintentionally reordered the navigation links on a subsequent save. This PR makes sure that the link options match the order of the selected links so that selectize does not reorder them.
Changes
Navigation link ordering does not persist