heyjaywilson / peakfit

Strength exercise iOS app written in Swift
Apache License 2.0
16 stars 11 forks source link

feat: :sparkles: sort exercise lists by list name #63

Closed mike011 closed 4 weeks ago

mike011 commented 1 month ago

Description

The exercise list can now be sorted alphabetically. This has been accomplished by creating a new ExerciseListContainerView which contains the ExerciseListView to be sorted. From the menu when you pick Alphabetical it sets the $sortOrder to being a new SortDescriptor using the ExerciseList.name.

This work was heavily influenced by: Sorting query results by Paul Hudson

Related Issue

How Has This Been Tested?

By default when you see the view it’s sorted alphabetically, and when you add something new it add’s it in, in the correct location. So I hacked up reverse alphabetical button, then verified pressing alphabetical correctly sorts the list.

Screenshots (if appropriate):

https://github.com/user-attachments/assets/8ceb8b7c-bfa6-4b4b-ba7f-19aabdbc2106

Types of changes

Checklist:

mike011 commented 1 month ago

I don’t understand why the check is failing.

mike011 commented 1 month ago

@heyjaywilson pls review