[Stats Refresh] Insights Tags and Categories: add drop-down rows for groups - #10944
Conversation
…egate when parent row is selected.
…he row. Showing those when children rows are added.
…k view on the row to facilitate easy removal when the row is collapsed.
…Also, be sure the row has children before rotating the disclosure icon.
…d rows according to row.expanded state.
Plus some comments.
|
@jklausa this is causing constraint warnings when going from Insights > Period > Insights. I'll address those in the next PR, which is branched from this one. Update: I checked |
|
This looks great @ScoutHarris ! I'm a little concerned by the jumpiness of the expanding/collapsing. In the .gif it appears that the cells above the one that expands/collapses is moving too which makes it a little difficult to follow what is happening. Is there a way to keep the other cells completely static and animate only the group that is expanding? |
|
Hey @SylvesterWilmott .
Hrm. That's being caused by the need to redraw the card to resize it to accommodate adding/removing rows. Without the redraw, the rows were just smushed into the original card size. I'm not sure how else I can accomplish that. Do you mind if I add this to my todo list for later so can experiment and hopefully come up with a better solution? |
jklausa
left a comment
There was a problem hiding this comment.
I have one request for some comments, but other than that — looks good!
| } | ||
|
|
||
| func expandedRowUpdated(_ row: StatsTotalRow) { | ||
| applyTableUpdates() |
There was a problem hiding this comment.
Would you mind adding a comment why this is done this way here, instead of beginUpdates() at the beginning of this method and endUpdates() at the end?
There was a problem hiding this comment.
Sure, I can. But for here - everything after applyTableUpdates is just updating an array that has no effect on the table. So I didn't think waiting to endUpdates was necessary.
|
I also had similar issues with jumpiness in Plugins Detail view — I think I fought with it for a long time, and didn't manage to fix it a 100% (though I have an idea how to do it now...), but maybe you could take a peek there for inspiration :P |
@jklausa thank you! |




Fixes #10832
To test:
On a site that has a post with multiple tags/categories:
folderMultiple.Click on a row that has multiple tags/categories.