Skip to content

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

Merged
merged 4 commits into from
Mar 18, 2025

Conversation

ezimet-livefront
Copy link
Collaborator

@ezimet-livefront ezimet-livefront commented Mar 18, 2025

🎟️ Tracking

PM-19260

📔 Objective

📸 Screenshots

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 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

Copy link
Contributor

github-actions bot commented Mar 18, 2025

Logo
Checkmarx One – Scan Summary & Details8ac152a7-795e-4ef7-9561-eb3a59359c87

Great job, no security vulnerabilities found in this Pull Request

Comment on lines 702 to 703
state.folders = [.default] + folders.sorted(by: { $0.name < $1.name })
.map { DefaultableType.custom($0) }
Copy link
Member

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.

Copy link
Collaborator Author

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.

@ezimet-livefront ezimet-livefront changed the title PM-19260: sorted folders in edit item view PM-19260: Sorted folders in Add/Edit item view Mar 18, 2025
Copy link

codecov bot commented Mar 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.58%. Comparing base (2d4ff26) to head (cf6b677).
Report is 1 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ezimet-livefront ezimet-livefront merged commit 32ace69 into main Mar 18, 2025
9 checks passed
@ezimet-livefront ezimet-livefront deleted the PM-19260/sort-folders branch March 18, 2025 15:44
@djsmith85 djsmith85 linked an issue Mar 18, 2025 that may be closed by this pull request
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Folders Not Alphabetical Order
2 participants