Giter Site home page Giter Site logo

Comments (4)

devdanzin avatar devdanzin commented on September 3, 2024

Seems like the simple way to do it would be adding ids the the headers, getting the th from (and storing) it in sortColumn and loading it in coverage.wire_up_sorting (which would also pass the id from the click event).

I can work on a PR tonight if it's still open.

from coveragepy.

nedbat avatar nedbat commented on September 3, 2024

Thanks! Extra-credit homework: if you sort the function page by function name, the file index page doesn't have that column, so what should the sort order be?

from coveragepy.

devdanzin avatar devdanzin commented on September 3, 2024

We could store the last column the index page was sorted by and sort on it again. But then we'd have one more question when the user goes back to the function page. We have two scenarios:

  • The user didn't re-sort by another column: should the function page now be sorted by function (as it was last time the user was there) or by whatever was the last sort column on the index page?
  • The user sorted by some other column: then we can sort the function/class page by that new column.

I think it would be easier to keep storing the last column to sort with, while adding a flag that means "sort the function or class pages by function/class" when set. Let me give it a try.

from coveragepy.

nedbat avatar nedbat commented on September 3, 2024

This is now released as part of coverage 7.5.1.

from coveragepy.

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.