-
Notifications
You must be signed in to change notification settings - Fork 42
PM-19260: Sorted folders in Add/Edit item view #1441
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Great job, no security vulnerabilities found in this Pull Request |
state.folders = [.default] + folders.sorted(by: { $0.name < $1.name }) | ||
.map { DefaultableType.custom($0) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎨 It's better to use the next for sorting which does a better job at sorting in other languages/alphabets:
.sorted { $0.name.localizedStandardCompare($1.name) == .orderedAscending }
🤔 Should the sorting be directly done in the publisher? So it'll fix all sorting issues in the app where that's used like in the FoldersProcessor
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah! I think sorting the publisher would make more sense, just updated the publisher.
BitwardenShared/Core/Platform/Repositories/SettingsRepositoryTests.swift
Outdated
Show resolved
Hide resolved
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1441 +/- ##
=======================================
Coverage 89.58% 89.58%
=======================================
Files 767 767
Lines 48191 48195 +4
=======================================
+ Hits 43172 43176 +4
Misses 5019 5019 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
🎟️ Tracking
PM-19260
📔 Objective
AddEditItemView
📸 Screenshots
⏰ Reminders before review
🦮 Reviewer guidelines
:+1:
) or similar for great changes:memo:
) or ℹ️ (:information_source:
) for notes or general info:question:
) for questions:thinking:
) or 💭 (:thought_balloon:
) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion:art:
) for suggestions / improvements:x:
) or:warning:
) for more significant problems or concerns needing attention:seedling:
) or ♻️ (:recycle:
) for future improvements or indications of technical debt:pick:
) for minor or nitpick changes