Sort add card views alphabetically #816
No reviewers
Labels
No labels
_CRITICAL_
API
app
backEnd
Blocked-waiting-for-further-changes
bug
bug-only-on-server-for-mobile-not-webpage
Bug-Report-After-Merge
cleanup
close
design
duplicate
enhancement
feature request
frontEnd
further-changes-needed
future-problem-not-fixint-this-period
help wanted
invalid
last-week-issue-to-fix
library
low-priority
needs input
needs review
not-implemented.
project documentation
question
research
reviewed
Script
security
SQL
style
Team 1
Team 2
team leaders
test-creation
testing
topLevel
unassigned
Under-review
wontfix
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Andras/BoundlessFlowCampus2K!816
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "603-sort-cards-alphabetically"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR adds automatic alphabetical sorting for cards in the Add Card modal.
Changes:
Added alphabetical sorting using localeCompare
Sorting is now applied automatically before rendering the card list
Newly added cards will automatically appear in alphabetical order
Review on #816
Whats done
Added automatic alphabetical sorting for cards in the Add Card modal.
Tested on Windows using Chrome & Firefox
Inspected following files
What needs to be done
Conclusion
@b25marem Can you fix the changes @b24idalu suggested before i merge?
Thanks for the review.
The reason I originally used slice() was to create a copy of the array before sorting, since .sort() mutates the original array directly. This is often used as a safer approach in React to avoid modifying props unintentionally.
However, since the current implementation works fine without it and to keep the code simpler, I removed slice() as suggested.
I also renamed the sorting variables from a and b to viewA and viewB for better readability.
Looks good, changes has been applied and everything still works good.
Did not know that slice() makes things safer, could be good for future implementations if that is the case even though it currently works without.
Ready to be merged after adding it back.
Looks good, is ready to be merged