Skip to content
This repository has been archived by the owner on Dec 13, 2020. It is now read-only.

Collapse functionality in Grid View included rows #835

Closed
metas-mk opened this issue Jun 5, 2017 · 13 comments
Closed

Collapse functionality in Grid View included rows #835

metas-mk opened this issue Jun 5, 2017 · 13 comments

Comments

@metas-mk
Copy link
Member

metas-mk commented Jun 5, 2017

Type of issue

Feature request

Current behavior

Currently, we don't have the possibility to fold/ unfold groups for large data sets in Grid Views included rows. Something like a collapse functionality w/ group (top node/ root) and detailed data.

Expected behavior

Have the functionality to provide the Grid View Tree with top lines in collapsed mode (not seeing the detail lines) and via icon/ button to expand the view for that or all groups.

Backend task: metasfresh/metasfresh-webui-api-legacy#424

@metas-mk metas-mk added this to the 2017-24 milestone Jun 5, 2017
@cadavre cadavre self-assigned this Jun 6, 2017
@cadavre
Copy link
Contributor

cadavre commented Jun 6, 2017

Additionally, as talked: add flag in API which will define if gridview shall be initially expanded or collapsed. In /layout of document view let's introduce flag called expanded=true|false.

To think about: introduce in UI a link-button to "Expand all" or "Collapse all".

@damianprzygodzki damianprzygodzki self-assigned this Jun 7, 2017
damianprzygodzki added a commit that referenced this issue Jun 7, 2017
damianprzygodzki added a commit that referenced this issue Jun 8, 2017
@cadavre cadavre removed their assignment Jun 8, 2017
@cadavre
Copy link
Contributor

cadavre commented Jun 8, 2017

@metas-mk @teosarca proposal of design and functionality of collapse/expand:

collapse functionality 2x

@metas-mk what was the decision about "Expand all" and "Collapse all" buttons?

@teosarca
Copy link
Member

teosarca commented Jun 8, 2017

Additionally, as talked: add flag in API which will define if gridview shall be initially expanded or collapsed. In /layout of document view let's introduce flag called expanded=true|false.

update: API ready

@cadavre
Copy link
Contributor

cadavre commented Jun 9, 2017

@teosarca and how about API flag to define which view actually should have possibility to use expand/collapse function? I can see only flag for initial expanded=true|false, but as @metas-mk stated:

what you mean is to have collapse/expand only on root elements? yes
but, if the api decides what shall be collapsible and what not, then we can leave the design like it is

we need additional flag like collapsible=true|false which will turns on/off this function.

@teosarca
Copy link
Member

teosarca commented Jun 9, 2017

we need additional flag like collapsible=true|false which will turns on/off this function.

will talk with Mark and will provide. For now, pls consider missing "collapsible" as collapsible=false.

@teosarca
Copy link
Member

teosarca commented Jun 9, 2017

@damianprzygodzki @cadavre discussed with Mark and here is the concept for collapsible and expanded flags, together with some test cases.

Layout level:

  • collapsible=true|false => decides if the rows from that view can be collapsible or not => i.e. the frontend renders the "+" and "-" which will allow the user to expand or collapse that node.

Row level:

  • expanded=true|false => shall be considered only if collapsible=true. If expended=true the included rows expand on that level.

Test cases:

Case 1. Collapsible rows (in layout) but rows are not expanded (i.e. layout collapsible=true, row expanded=false)
https://w101.metasfresh.com:8443/window/540345
image

Case 2. Not collapsible rows (i.e. layout collapsible=false, row expanded=N/A)

NOTE: at the time of writing this, API is not providing those flags.

@metas-mk
Copy link
Member Author

metas-mk commented Jun 9, 2017

@damianprzygodzki @cadavre
After talk w/ damian/ teo we decided to drop intial "row level" definition of expanded=true/false and instead go in direction of expanded_depth = 0, 1, ..., 999 on layout level (or something similar)

to be decided/ agreed

@damianprzygodzki
Copy link
Contributor

damianprzygodzki commented Jun 9, 2017

Case of changing expanded property to expandedDepth:

-for expandedDepth: 0 - all rows should be collapsed initially
-for expandedDepth: n - all rows that have indentation on level n and deeper should be collapsed initially

@damianprzygodzki
Copy link
Contributor

Waiting for collapsible and expandedDepth properties from API.

@teosarca
Copy link
Member

IMHO they are already provided. Pls check out if it fits.
I would suggest to check with following windows:

@damianprzygodzki
Copy link
Contributor

damianprzygodzki commented Jun 12, 2017

@teosarca I've encountered one problem.

The key value for table component is id or rowId (depends on if we are in gridview or in tabs for document).

On that value relay things such as selection, quickActions, selectionAttributes, collapsing and so on. I wonder if we should relay on that properties further, because for one window that has collapsing enabled (540345) the documents have the same id.

Could API provide unique key (maybe some additional, straight from database) for docs in tables?

damianprzygodzki added a commit that referenced this issue Jun 13, 2017
@metas-mk metas-mk self-assigned this Jun 13, 2017
metas-mk added a commit to metasfresh/metasfresh that referenced this issue Jun 13, 2017
Adding this new issue to this week's release notes.
metasfresh/metasfresh-webui-frontend-legacy#835 Collapse functionality in Grid View included rows
@metas-mk
Copy link
Member Author

Tested.
a) Open the window
b) Press on Table Header Column to sort by.
c) Press on the first line [+] to expand. Nothing happens. NOK

image

@metas-mk
Copy link
Member Author

Tested. Works as required. Done.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants