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

feat: Add sortNodes and generic orderBy #961

Merged
merged 2 commits into from
May 23, 2024
Merged

feat: Add sortNodes and generic orderBy #961

merged 2 commits into from
May 23, 2024

Commits on May 22, 2024

  1. refactor: Move file utils into utils directory

    Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
    susnux committed May 22, 2024
    Configuration menu
    Copy the full SHA
    e1b4eb3 View commit details
    Browse the repository at this point in the history
  2. feat: Add sortNodes and generic orderBy

    Move the functions from the files app to this library to allow
    reusing them in other places, like for example the FilePicker or Viewer app.
    
    `orderBy` is a generic natural sorting function which allows to pass
    a collection, identifiers and associated order and sorts the
    collectiong using the browser native `Intl.Collator`.
    
    `sortNodes` is a specialized function based on `orderBy`
    to sort nodes (files and folders) based on sorting options.
    
    Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
    susnux committed May 22, 2024
    Configuration menu
    Copy the full SHA
    139fbea View commit details
    Browse the repository at this point in the history