Coder Social home page Coder Social logo

Optimal TableView Real State Management about clui HOT 3 OPEN

khaf avatar khaf commented on July 23, 2024
Optimal TableView Real State Management

from clui.

Comments (3)

VladimirMarkelov avatar VladimirMarkelov commented on July 23, 2024

I agree that the proposal looks better than the library has at this moment. The current look is basic, though it is easy to implement and maintain. I would not be surprised if the proposal doubles the amount of the code.

  1. It looks a little change. Yet it needs fixing: mouse click event that now must check visibility and draw method.
  2. Add a new special value for column width? E.g, -1 and all columns that have it expand to fill the extra space. In this case all those fields would be equal in width. Adding extra attribute may make expanding scaled by original width. It does not look a big change, too
  3. (+.4) A very big change, especially if we want to implement automatic merging of adjacent columns with similar names. Limiting header to only 2 lines helps a bit. Anyway, so many places needs rewriting: header size calculations(1 or N rows), drawing of "sort" symbol becomes not so trivial, drawing lines/headers changes, mouse click processing(and what happens if I click on "Objects" in the middle on the example above?). I do not say it is impossible :) It just takes much time to do and test.

from clui.

khaf avatar khaf commented on July 23, 2024

I already have done 3 and 4; easier than I thought. I'll make a PR soon. The only challenge was finding the magic numbers in the code that represented the top row + 1 border. Mouse and Sort markers work properly. It also works for as many levels as the user wants to.

1 ended up being hard. I guess there are too many magic numbers. Hiding the scrollbars is easy, but using the space underneath wasn't. I'll give it another go later.

2 should be very easy. I haven't done it, but soon will and make a PR.

Thank you for being positive regarding the feature requests. I appreciate it.

from clui.

VladimirMarkelov avatar VladimirMarkelov commented on July 23, 2024

It sounds great! Looking forward to PR

from clui.

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.