-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[Stats Refresh] Insights Tags and Categories: add drop-down rows for groups #10944
[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? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.