Closed Xanir closed 10 years ago
How should hiding / showing of columns be done? Use a separate fly-out with check boxes for each column?
I don't see anything wrong with that. We need some way to add columns that aren't shown, and fly-out checkboxes seems like a good way to do it.
This and #2 have competing objectives. How can they both work together? Are they mutually exclusive features?
I think you are right and they would need mutually exclusive
I don't think #2 is mutually exclusive. #2 is base solely on displayability of a column due to width thresholds. Only those that are marked for display can be evaluated. Is the menu checkboxes control the column set. The reactive table based on allowable width controls display.
Maybe we need an icon indicating a column is visible in the menu? Ie. Checkbox + icon + column display name On May 18, 2014 7:41 PM, "Xanir" notifications@github.com wrote:
I think you are right and they would need mutually exclusive
— Reply to this email directly or view it on GitHubhttps://github.com/jadrake75/ng-scrolling-table/issues/9#issuecomment-43458604 .
For a user perspective I could see having both of these directive on a table leading to confusion. For example, if the table is small to begin with and there are already low priority columns being hidden and then the user enables low priority column it would not end up being displayed, Perhaps the columns listed in the menu are grayed out / have a different style when they are enabled but hidden due to priority collapsing.
Hiding based on a predefined priority is nice when then table columns are static but once the user starts being able to change the order and display of column they might also expected that they can change the priority, as their role / that specific user places a different priority on the columns
I'm not opposed to the fly-out menus available at the end of each column but what if there are a lot of available column, such as more then 20.
There are a few different ways we could handle that within our implementation (in no particular order): 1) Use some kind of a dialog instead of a fly-out. 2) When there are more then N column the columns fly-out instead opens a dialog. 3) Only ship with the fly-out because people 'should' only have a reasonable number of columns in a table but allow a customization point to replace the fly-out with something else. 4) The fly-out can only hide / show the columns built in the template, as there should only be a reasonable number displayed for performance / usability reasons but a separate dialog could be used to add or remove columns from the current template.
I think 4 would be the best in this case. Being able to add remove columns would be a different directive but I think it would be useful. For a dialog I was thinking of something like the table editor in Windchill. Where there is a list of available columns and a list of the columns currently selected.
Eek.... no Dialog for columns. That is way overkill. I think a simple "glyph" like button in the header of the last visible column (ie. a floating component) is more than applicable. OR.... we could use right-mouse (which doesn't really work well on mobile...) It could also be a toolbar action that shows menu..... I am not sure at this point we need to get hung up on it.
Ok, just got done writing up a big response but now I think I am just over thinking / engineering.
Here are the assumptions I will be making going forward. All columns in the table will be rendered. Hide / Show will modify the visibility of a column but does not need to modify the DOM using the CSS trick I showed you. Reordering columns will require modification of the DOM but we can manage that in an angular way by building up templates that represent a row.
Are these fair assumptions? So to actually respond to you, we will just want a list somewhere that displays all columns that can be hidden / shown.
correct.... and the showing or hiding of a column is independent of whether it is displayed visually. ie. if the table is squeezed horizontally to not be able to show a column it may still be "hidden" but this is different than not "showing" the column. ie. We should have the ability to toggle the columns for which the user wishes to view but their displayability to determined by the tables ability to represent them horizontally (assuming the directive is applied for adaptive table). We can always use an icon in the drop-down to represent whether a column is viewed as well as visible.... (ie. checkbox = viewable, icon = visible)
Will incorporate the col-visibility directive
Hide columns that were initially rendered and be able to reshow them.
Hiding the column should be doable through the CSSRuleEditor.