DonJayamanne / gitHistoryVSCode

Git History for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=donjayamanne.githistory
MIT License
943 stars 150 forks source link

Use grid layout instead of current list #465

Open DonJayamanne opened 4 years ago

DonJayamanne commented 4 years ago

This opens the door to more possibilities in UI enhancements Current issues:

@ole1986

Please let me know your thoughts. I'm very keen on this. This would require a lot/some refactoring to the UI (I'm not starting this just yet)

Note:

Benefits & other notes:

ole1986 commented 4 years ago

I think this is a pretty good idea but yet not sure if react-virtualized is the best choice. Since we now know the exact commit count (through PR #475) I am excited to see lazy load list or grid to finally eliminate issue #71

ole1986 commented 4 years ago

As an alternative to react-virtualized could be material-ui?

See: https://material-ui.com/

It does also have a virtualized list and for all controls we could use the same UI framework.. instead of bootstrap of course

DonJayamanne commented 4 years ago

react-virtualized could be material-ui?

Sure. I had alraedy planned on using materia-ui for other parts as well. E.g. branches/tags, rather than doing it our selves. I'm referring to https://material-ui.com/components/chips/

Since we now know the exact commit count

With virtualized grids, we don't need the count. Basically fetch till we get back nothing.

DonJayamanne commented 4 years ago

The only hitch with the virtualized approach is the fact that the graph will have to be drawn in sequence. I.e. today we draw graph for page 1, then when you click next, we'll draw graph for page 2. The plan is to connect points of graph in page 2 with 1, Similarly graph points on page 3 will be connected to that of 2.

If a user wishes to go to page 5, then we'll need to render the graph for page 1, 2, 3, 4 and then 5 to connect all of the lines properly.

I have tried this and works very well. Unfortunately this is the only way (IMHO) that we can have all the points/lines in the graphs line up and connect properly.

So, if the user drags cursor to the very end then we have a problem, though not without solutions:

Solutions

Note:

DonJayamanne commented 4 years ago

lol, I think the suggestion is to use the package is proposed, but with their grid.. Screen Shot 2020-03-04 at 14 02 54

Some notes/links:

DonJayamanne commented 4 years ago

Requirements for grid

Feature Materia UI [Tubular React]()https://github.com/unosquare/tubular-react mui-datatables
Virtualization
Lazy loading
Resize Columns
Sorting
Filtering
Selecting
Selecting multiple rows
Custom rendering (images/icons in rows)