iTwin / iTwinUI

A design system for building beautiful and well-working web interfaces.
https://itwin.github.io/iTwinUI/
MIT License
104 stars 38 forks source link

Column manager aka Configure grid #783

Open DineshBodewar opened 1 year ago

DineshBodewar commented 1 year ago

Provide a column manager modal dialog box which provide below features to manage table A] Search by column name B] Change column sequence using drag handle C] Stick/Unstick columns - So user can always see sticked columns in table even in horizontal scroll D] Show/Hide columns E] Reset to product default settings

1] User will get configure icon next to search box on top of table like show below image

2] user click on it and he gets dropdown with options like below image

3] User clicks on "Configure grid" option and below modal dialog box will open. For start we allow user to stick only 2 columns in table.

image

Once the 2 column limit reached we will disable the stick(lock) icon for other columns and give a tooltip for the same as shown below.

image

image

image

mayank99 commented 1 year ago

hi @DineshBodewar, have you seen the column manager that already exists? https://itwin.github.io/iTwinUI-react/?path=/story/core-table--column-manager

It handles just the toggling part, but could be useful in the meantime.

Also our table already supports reordering columns by just dragging the headers.

As for the rest, I think you could build it yourself because we provide each of those individual pieces to you and our Table is fully controlled.

FlyersPh9 commented 1 year ago

The option for a user to stick / unstick a column from within the column manager was raised by another UX team member today.

r100-stack commented 5 months ago

Technically, users can pass your custom ColumnManger type UIs using the Header property in the column object. For UI ideas, you can refer to a similar UI implementation here.

While this is technically possible, some additional functionality from our side will likely be missing if users directly pass the Header property. E.g.:

https://github.com/iTwin/iTwinUI/blob/9182303b132ea7bf48439c1c24c0b5345b12ca10/packages/itwinui-react/src/core/Table/columns/actionColumn.tsx#L82-L90

So ideally, if there is still such a use case, we could consider easier ways for users to pass custom UIs and perform column manager type modifications easily.

@DineshBodewar Please give an update if this is still a valid use-case.

mayank99 commented 5 months ago

@rohan-kadkol This is a valid recurring case, we don't really need an "update".

I already mentioned above that it is possible to achieve in user-land, but the point of this issue is that we should improve our built-in column manager.

It should support the following functionality:

Since it is new, complicated functionality, it may be better suited for NewTable (#1144).

r100-stack commented 5 months ago

Sounds good, added a point for this in #1144's issue description as a possible consideration.