-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Split arrays into separate tables" if there are less than 5 elements in array #306
Comments
@jpmckinney @sabahfromlondon this rule seems more logical and is not difficult to implement. Also, whether 5 and fewer elements or just fewer than 5 elements should cause the split. |
To clarify, can you express the rule?
Which one is currently implemented? |
@jpmckinney for context what is happening in the flatten tool is that if there are fewer than 5 rows in a table then these are automatically rolled up into the main table - we specified that as a requirement. However, on the interface the user is told that there is an array, but there is no option to split out the array. I think to a user, this is confusing and might even look like a bug. We have two options:
My suggestion is to go with the first option. |
@jpmckinney The current rule is "Split arrays into separate tables if there are 5 or more elements in the array". |
@sorenabell And from your comment, which rule seems more logical: the current rule (never split if < 5, offer to split if >= 5) or the other rule ( |
I'm just trying to address the issue with the UI which is confusing. Telling the user that there is an array in the table and then no other information, is likely to lead to confusion and potentially the user thinking something is wrong with the tool. I guess a third option is just to add an extra sentence for this instance to say: "The array has fewer than five fields, so has not been split out into a separate table." By the way @sorenabell the sentence "There is one array in this tables" should be "table". |
Yes, we can clarify the language. I also just want to understand which behavior we actually want. |
@sabahfromlondon This small text issue was fixed. |
From our call today, the new logic should be:
Regarding the choice of operators (>= and < versus > and <=), we can continue using the same operators we currently do. From my reading, we do This should address one of the causes of #303, where the problem was that merging the child table would cause the creation of a very wide table. For now, the default option can be that all child tables are split. (In future, we might want to test whether users prefer to have single-value children merged into parent tables by default.) We also agreed that, on each screen (i.e. for each parent table), the split behavior will be all-or-nothing: that is, either all child tables are merged, or all child tables are split. Per-child-table controls are expected to be too complicated for the user. (In future, we might want to test whether users prefer to have per-child-table controls, like when removing tables.) |
To clarify, regarding the all-or-nothing implementation, if one child table A is above the threshold, and the other child tables (B, C) are below the threshold, what happens?
|
The second option seems to be correct:
|
Great! |
@jpmckinney just re-confirming and re-phrasing once more: All child tables should be split (regardless of the number of elements in the array).
Is that correct? |
Yes. The second bullet should be "equal to or greater than", to cover the "at threshold" case. |
@jpmckinney Should CLI mimic the splitting behavior discussed in this issue? |
If the CLI can be more flexible, it would be better. Otherwise, the CLI should behave the same as the web version. |
I've created a separate issue for CLI open-contracting/spoonbill#176 |
The UI for the new splitting behavior was updated on the staging website. Please check. |
@sabahfromlondon Can you check this issue? |
@sorenabell I'm testing with this file (spoonbill-test.txt) and the table Also I'm not sure why the styling for the pop up box is different. The wireframes were only created to describe the requirement for the behaviour. We want the styling to be as per the rest of the tool. Finally, the text in the pop up box does not match what was in the wireframe: Here is a screenshot of how I wanted the text. I wanted to be specific about which tables can't be merged, rather than saying "some tables" as it is too vague. |
@sorenabell I've been testing this with the following file created by @yolile In the file attached the relatedProcesses array is below the threshold (=<5), but the pop up says that it can't be rolled up into the main table. The behaviour we wanted was to not allow arrays that were above the threshold only. In any case, @jpmckinney and I discussed this and we do think that this issue is only likely to affect a very small number of users, that it's not something we want to focus lots of resource on. As a result, I suggest that we leave the behaviour as is and if it becomes a problem for users then we can re-surface this ticket. |
No description provided.
The text was updated successfully, but these errors were encountered: