GithubHelp home page GithubHelp logo

Comments (10)

alexandru-dinu avatar alexandru-dinu commented on June 2, 2024 2

down the line it would be nice for the sorting to “just work”

I fully agree -- minimal tinkering on user's part!

I will research more into how Wikipedia achieves this, since it's the main source of inspiration for the plugin.

I appreciate the feedback and I am glad that people find Sortable useful!

from obsidian-sortable.

alexandru-dinu avatar alexandru-dinu commented on June 2, 2024 1

Yes, sorry for the misunderstanding, column annotation was just an idea.

from obsidian-sortable.

claremacrae avatar claremacrae commented on June 2, 2024 1

Yes, down the line it would be nice for the sorting to “just work” but I totally realise the nature of maintaining open-source projects and not everything can be done - I’ve been there myself on C++ projects…

For now, this is already really useful.

from obsidian-sortable.

alexandru-dinu avatar alexandru-dinu commented on June 2, 2024

Hello,

Thank you for the thorough report!

Currently, as mentioned in the project's README, the plugin supports sorting numerical and string data types. Custom comparator functions are part of the roadmap.

I will look into it and try add support for sorting date-time in the nearest future.

Best,
Alex

from obsidian-sortable.

claremacrae avatar claremacrae commented on June 2, 2024

Thanks for the swift reply. It's certainly not urgent to fix.

I must admit that bit of the README hadn't sunk in, but I might have assumed that there were numerical values. I take your point, though, that they are not.

In the meantime, might it be feasible to fall-back on treating other data types as strings, and sorting their unmodified string representation? This would give the desired value in this, and I suspect many other cases.

from obsidian-sortable.

alexandru-dinu avatar alexandru-dinu commented on June 2, 2024

I believe that's a fair point. There are certainly lots of edge cases (e.g. time zones, currencies etc.), but it's a good step forward.

For the meantime, I'd let let the user specify their preferred datetime format string in the settings and try to parse with that.

Maybe even annotate table's column with the data type?

from obsidian-sortable.

claremacrae avatar claremacrae commented on June 2, 2024

Thanks. How would I do that annotation please? (My tables are generated by dataview)

from obsidian-sortable.

alexandru-dinu avatar alexandru-dinu commented on June 2, 2024

Right, it may be trickier in this case -- there's #6 on the roadmap as well.

from obsidian-sortable.

claremacrae avatar claremacrae commented on June 2, 2024

Oh sorry, I thought you were mentioning an existing feature, maybe I misunderstand. Not to worry.

Thanks for the replies anyway, and thanks again for the useful plugin.

from obsidian-sortable.

alexandru-dinu avatar alexandru-dinu commented on June 2, 2024

To summarize:

At the time of writing, Sortable can only sort numeric and string data types. In your example, all the values from the Dates column get parsed as numbers, i.e. 2021, so the order does not change.

Supporting other data types is tracked in #18.

For the immediate future, I will allow the user to specify a date-time format string in plugin's settings and use that to try to parse date-time values.

Again, thank you for reporting. Closing this, as the main issue for this bug will be #18.

from obsidian-sortable.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.