Skip to content
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

Merged
merged 27 commits into from
Feb 7, 2019

Conversation

ScoutHarris
Copy link
Contributor

@ScoutHarris ScoutHarris commented Feb 4, 2019

Fixes #10832

To test:


On a site that has a post with multiple tags/categories:

  • Tip: Hogwarts usually has some.
  • Go to Stats > Insights > Tags and Categories.
  • Verify:
    • The icon is folderMultiple.
    • The disclosure icon is pointed down.

tandc_init


Click on a row that has multiple tags/categories.

  • Verify:
    • Individual rows appear for each tag/category.
    • On the "parent" row, the disclosure icon is pointed up.
    • The row dividers above and below the expanded section are the full width of the row.
    • Selecting a "child" row displays a webview for that tag/category.

tandc_expanded


  • Verify expanded rows persist on scrolling and rotation.
  • Verify expanded rows are reset when Insights is first displayed.

…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.
@ScoutHarris ScoutHarris added this to the 11.8 milestone Feb 4, 2019
@ScoutHarris ScoutHarris self-assigned this Feb 4, 2019
@ScoutHarris ScoutHarris requested a review from jklausa February 4, 2019 20:19
@ScoutHarris
Copy link
Contributor Author

ScoutHarris commented Feb 4, 2019

@SylvesterWilmott -


expanding_rows


tandc_init


tandc_expanded


ipad

@ScoutHarris ScoutHarris mentioned this pull request Feb 4, 2019
45 tasks
@ScoutHarris
Copy link
Contributor Author

ScoutHarris commented Feb 5, 2019

@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 develop. The constraint warnings are there too. So I broke it long before this PR. I'll address it separately.

@SylvesterWilmott
Copy link

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?

@ScoutHarris
Copy link
Contributor Author

Hey @SylvesterWilmott .

jumpiness of the expanding/collapsing

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?

Copy link
Contributor

@jklausa jklausa left a 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()
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@jklausa
Copy link
Contributor

jklausa commented Feb 7, 2019

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

@ScoutHarris
Copy link
Contributor Author

maybe you could take a peek there for inspiration

@jklausa thank you!

@ScoutHarris ScoutHarris merged commit b2a814b into develop Feb 7, 2019
@ScoutHarris ScoutHarris deleted the feature/10832-insights_tandc_dropdown_rows branch February 11, 2019 21:18
@ScoutHarris ScoutHarris mentioned this pull request Jun 4, 2019
79 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants