source_optics icon indicating copy to clipboard operation
source_optics copied to clipboard

choose what columns to show

Open mpdehaan opened this issue 5 years ago • 1 comments

in most grid views, we have a lot more columns than we show - even some are commented out, but there are MORE

We should allow the user a widget to pick via a checkbox what to show in each table, they may be interested in commits, or more complex stats like "commitment" and so on... but this makes more available via the UI vs just the API/database

This should apply to the repo list page and author stats page, and we can have somewhere in the code that says what columns are valid options to select from, and what the defaults are

mpdehaan avatar Sep 14 '19 15:09 mpdehaan

Adding some more background info:

  • On the repo list page there are about 10 different columns, but on the author list page there might be 10 OTHER different columns.

  • There should be some way to have a relatively unobtrusive menu option in the menu bar of those pages (maybe up by the date picker? Maybe not... open to ideas), that can pop up some sort of modal to select the columns to show for that type of page. There may be in the future many different types of pages, so "repo_columns" and "author_columns" may only be one of two different types, but think of those settings as being totally different from one another.

  • When the widget is clicked, it pops up a box that shows a different set of options, which is all the possible "repo_columns" or "author_columns" - including those that are checked or unchecked. Whatever settings the user chooses are saved in local storage under a different key depending on the page type.

*The widget (this also happens on page load) then uses the APIs available to ag-grid to show/hide the columns as selected in the user's preferences.

  • It should be possible to easily add new columns in code over time by just adding them to the ag-grid javascript, BUT there needs to be some sort of user-defined list of default columns to show if the user hasn't selected any. Defaulting to showing all the columns is probably too much, as we are showing too many columns already.

https://www.ag-grid.com/javascript-grid-column-api/

Note since this is free software it's using the non-enterprise version of agGrid, we can't use the premium features.

mpdehaan avatar Oct 09 '19 01:10 mpdehaan