Skip to content
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

[FEATURE REQUEST] Additional Sort Order setting #975

Closed
9 tasks
mmattel opened this issue May 26, 2021 · 5 comments
Closed
9 tasks

[FEATURE REQUEST] Additional Sort Order setting #975

mmattel opened this issue May 26, 2021 · 5 comments
Assignees
Labels
p3-medium Normal priority
Milestone

Comments

@mmattel
Copy link
Contributor

mmattel commented May 26, 2021

Please describe.
Files shown on IOS devices sorted by name look like this:

1_datei.txt
10_datei.txt
11_datei.txt
2_datei.txt
3_datei.txt

Describe the solution you'd like
The sort order should be additional selectable like this:

1_datei.txt
2_datei.txt
3_datei.txt
10_datei.txt
11_datei.txt

TASKS

  • Research (if needed)
  • Create branch feature/feature_name
  • Development tasks
    • Implement whatever
    • ...
  • Code review and apply changes requested
  • Design test plan
  • QA
  • Merge branch feature/feature_name into master

PR

  • App
  • Library (if needed)
@michaelstingl
Copy link
Contributor

Hm, good point. This is like in macOS Big Sur Finder and iOS 14 Files app.

macOS Big Sur Finder iOS 14 Files app
macOS Big Sur Finder iOS 14 Files app

@hosy @felix-schwarz do you remember why we choose 1_datei.txt, 10_datei.txt, 2_datei.txt ?

@michaelstingl
Copy link
Contributor

Same in oC 10.7 web UI and ownCloud-web:

CleanShot 2021-05-26 at 18 57 07@2x CleanShot 2021-05-26 at 18 57 48@2x
oC 10.7 web UI ownCloud-web

I think we should change it.

@michaelstingl michaelstingl added the p3-medium Normal priority label May 31, 2021
@michaelstingl michaelstingl added this to the 11.7.0-Next milestone May 31, 2021
@michaelstingl
Copy link
Contributor

@mneuwert is this related to “collation”? What spec did we implement? Is there another rule that would be better?

@mneuwert
Copy link
Contributor

mneuwert commented Jul 9, 2021

@michaelstingl Sorting is implemented in the ownCloudAppShared framework. In case of alphabetic sort, we just use Swift standard library API String.caseInsensitiveCompare(String). Foundation NSString.compare(options:) would allow to tweak comparison algorithm behaviour by applying several available options like:

  • ignore diacrtics
  • numeric comparison
  • etc

There is even quite old dev Q/A from Apple discussing the topic of "comparing files name like in Finder" using CoreFoundation functions:
https://developer.apple.com/library/archive/qa/qa1159/_index.html

To summarise: this would be an easy fix. Just replacing String.caseInsensitiveCompare() with NSString.compare() with few options (numeric, case-insensitive, width-insensitive) would do the job IMHO

@jesmrec
Copy link
Contributor

jesmrec commented Mar 21, 2022

Done and released in 11.9

@jesmrec jesmrec closed this as completed Mar 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p3-medium Normal priority
Projects
None yet
Development

No branches or pull requests

5 participants