Skip to content

[Stats Refresh] Add Period > Authors card - #10953

Merged
ScoutHarris merged 13 commits into
developfrom
feature/10946-period_authors
Feb 11, 2019
Merged

[Stats Refresh] Add Period > Authors card#10953
ScoutHarris merged 13 commits into
developfrom
feature/10946-period_authors

Conversation

@ScoutHarris

Copy link
Copy Markdown
Contributor

Fixes #10946

To test:


  • On a site with some posts, go to Stats > Period > Authors.
    • Note when switching between the Period filters, the expanded rows will reset.
  • Verify the view is:

authors_init


  • Select an Author row.
    • Max 10 child rows will be displayed, showing the Author's posts.
    • There is no action for selecting a child row.
  • Verify the view is:

authors_expanded

@ScoutHarris ScoutHarris added this to the 11.8 milestone Feb 6, 2019
@ScoutHarris ScoutHarris self-assigned this Feb 6, 2019
@ScoutHarris
ScoutHarris requested a review from jklausa February 6, 2019 00:48
@ScoutHarris

ScoutHarris commented Feb 6, 2019

Copy link
Copy Markdown
Contributor Author

@jklausa - the constraint warnings mentioned in #10944 (comment) still exist, and are actually exacerbated when a row is expanded. (Try expanding a row and then rotate. G'head, try it. 😄 ) It's still my plan to fix that ASAP in a separate PR (since it pre-dated the expanding rows).

@ScoutHarris

Copy link
Copy Markdown
Contributor Author

@SylvesterWilmott -


authors_init


authors_expanded


ipad_portrait


ipad_landscape

@ScoutHarris ScoutHarris mentioned this pull request Feb 6, 2019
45 tasks
@ScoutHarris

Copy link
Copy Markdown
Contributor Author

Hey @jklausa . Sorry for the spam. The constraint issues were so bad with the expanded rows, sometimes they wouldn't even render. So I fixed the constraint issues on this PR.

When switching period filters or scrolling, you should not see a slew of warnings like this:

    "<NSLayoutConstraint:0x6000010a1a90 UIView:0x7fc39ea331f0.height == 0.5   (active)>",
    "<NSLayoutConstraint:0x6000010a1b80 UIButton:0x7fc39ea2d580.top == UILayoutGuide:0x6000009b2f40'UIViewSafeAreaLayoutGuide'.top   (active)>",
    "<NSLayoutConstraint:0x6000010a1f40 UILayoutGuide:0x6000009b2f40'UIViewSafeAreaLayoutGuide'.bottom == UIView:0x7fc39ea331f0.bottom   (active)>",
    "<NSLayoutConstraint:0x6000010a2120 V:[UIButton:0x7fc39ea2d580]-(0)-[UIView:0x7fc39ea331f0]   (active)>",
    "<NSLayoutConstraint:0x6000010a2ee0 UIView:0x7fc39ea357c0.height == 0.5   (active)>",
    "<NSLayoutConstraint:0x6000010a2fd0 UIButton:0x7fc39ea219c0.top == UILayoutGuide:0x6000009b31e0'UIViewSafeAreaLayoutGuide'.top   (active)>",
    "<NSLayoutConstraint:0x6000010a3390 UILayoutGuide:0x6000009b31e0'UIViewSafeAreaLayoutGuide'.bottom == UIView:0x7fc39ea357c0.bottom   (active)>",
    "<NSLayoutConstraint:0x6000010a3570 V:[UIButton:0x7fc39ea219c0]-(0)-[UIView:0x7fc39ea357c0]   (active)>",
    "<NSLayoutConstraint:0x6000010d1ea0 UIView:0x7fc39ea37e70.height == 0.5   (active)>",

@jklausa

jklausa commented Feb 7, 2019

Copy link
Copy Markdown
Contributor

This is unrelated to the PR itself, but:

Should we maybe indent the blog post names in this view, or add an icon? I can sorta guess that’s what the expanded items are, but without any labels or icons it all just blends together with the author name — it feels like this might be a source of confusion for our users.

@SylvesterWilmott

Copy link
Copy Markdown

Should we maybe indent the blog post names in this view, or add an icon? I can sorta guess that’s what the expanded items are, but without any labels or icons it all just blends together with the author name — it feels like this might be a source of confusion for our users.

Thanks for the feedback @jklausa . I'll look into this

@jklausa jklausa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still see a bunch of warnings on rotation:

	Probably at least one of the constraints in the following list is one you don't want. 
	Try this: 
		(1) look at each constraint and try to figure out which you don't expect; 
		(2) find the code that added the unwanted constraint or constraints and fix it. 
(
    "<NSLayoutConstraint:0x600002e911d0 H:[UIStackView:0x7ffd5246c960]-(0)-|   (active, names: '|':UIView:0x7ffd5246c780 )>",
    "<NSLayoutConstraint:0x600002e91270 H:|-(0)-[UIStackView:0x7ffd5246c960]   (active, names: '|':UIView:0x7ffd5246c780 )>",
    "<NSLayoutConstraint:0x600002e90b90 UIImageView:0x7ffd5246a4f0.width == 130   (active)>",
    "<NSLayoutConstraint:0x600002e90730 UIButton:0x7ffd5246bb60.width == 44   (active)>",
    "<NSLayoutConstraint:0x600002f8c460 'fittingSizeHTarget' UIStackView:0x7ffd5246f160.width == 184   (active)>",
    "<NSLayoutConstraint:0x600002e919f0 'UISV-canvas-connection' UIStackView:0x7ffd5246f160.leading == UIView:0x7ffd5246c780.leading   (active)>",
    "<NSLayoutConstraint:0x600002e93f20 'UISV-canvas-connection' H:[UIView:0x7ffd5246c780]-(0)-|   (active, names: '|':UIStackView:0x7ffd5246f160 )>",
    "<NSLayoutConstraint:0x600002e92b70 'UISV-canvas-connection' UILayoutGuide:0x6000037bfc60'UIViewLayoutMarginsGuide'.leading == UIStackView:0x7ffd5246cb60.leading   (active)>",
    "<NSLayoutConstraint:0x600002e92bc0 'UISV-canvas-connection' UILayoutGuide:0x6000037bfc60'UIViewLayoutMarginsGuide'.trailing == UIButton:0x7ffd5246bb60.trailing   (active)>",
    "<NSLayoutConstraint:0x600002e92c60 'UISV-spacing' H:[UIStackView:0x7ffd5246cb60]-(10)-[UIImageView:0x7ffd5246a4f0]   (active)>",
    "<NSLayoutConstraint:0x600002e92cb0 'UISV-spacing' H:[UIImageView:0x7ffd5246a4f0]-(10)-[UIButton:0x7ffd5246bb60]   (active)>",
    "<NSLayoutConstraint:0x600002e92a80 'UIView-leftMargin-guide-constraint' H:|-(8)-[UILayoutGuide:0x6000037bfc60'UIViewLayoutMarginsGuide'](LTR)   (active, names: '|':UIStackView:0x7ffd5246c960 )>",
    "<NSLayoutConstraint:0x600002e92b20 'UIView-rightMargin-guide-constraint' H:[UILayoutGuide:0x6000037bfc60'UIViewLayoutMarginsGuide']-(8)-|(LTR)   (active, names: '|':UIStackView:0x7ffd5246c960 )>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x600002e90b90 UIImageView:0x7ffd5246a4f0.width == 130   (active)>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful.
2019-02-07 13:12:09.089038+0100 WordPress[26227:10101645] [LayoutConstraints] Unable to simultaneously satisfy constraints.
	Probably at least one of the constraints in the following list is one you don't want. 
	Try this: 
		(1) look at each constraint and try to figure out which you don't expect; 
		(2) find the code that added the unwanted constraint or constraints and fix it. 
(
    "<NSLayoutConstraint:0x600002e911d0 H:[UIStackView:0x7ffd5246c960]-(0)-|   (active, names: '|':UIView:0x7ffd5246c780 )>",
    "<NSLayoutConstraint:0x600002e91270 H:|-(0)-[UIStackView:0x7ffd5246c960]   (active, names: '|':UIView:0x7ffd5246c780 )>",
    "<NSLayoutConstraint:0x600002e90b90 UIImageView:0x7ffd5246a4f0.width == 130   (active)>",
    "<NSLayoutConstraint:0x600002e90730 UIButton:0x7ffd5246bb60.width == 44   (active)>",
    "<NSLayoutConstraint:0x600002ff1950 'fittingSizeHTarget' UIStackView:0x7ffd5246f160.width == 94   (active)>",
    "<NSLayoutConstraint:0x600002e919f0 'UISV-canvas-connection' UIStackView:0x7ffd5246f160.leading == UIView:0x7ffd5246c780.leading   (active)>",
    "<NSLayoutConstraint:0x600002e93f20 'UISV-canvas-connection' H:[UIView:0x7ffd5246c780]-(0)-|   (active, names: '|':UIStackView:0x7ffd5246f160 )>",
    "<NSLayoutConstraint:0x600002e92b70 'UISV-canvas-connection' UILayoutGuide:0x6000037bfc60'UIViewLayoutMarginsGuide'.leading == UIStackView:0x7ffd5246cb60.leading   (active)>",
    "<NSLayoutConstraint:0x600002e92bc0 'UISV-canvas-connection' UILayoutGuide:0x6000037bfc60'UIViewLayoutMarginsGuide'.trailing == UIButton:0x7ffd5246bb60.trailing   (active)>",
    "<NSLayoutConstraint:0x600002e92c60 'UISV-spacing' H:[UIStackView:0x7ffd5246cb60]-(10)-[UIImageView:0x7ffd5246a4f0]   (active)>",
    "<NSLayoutConstraint:0x600002e92cb0 'UISV-spacing' H:[UIImageView:0x7ffd5246a4f0]-(10)-[UIButton:0x7ffd5246bb60]   (active)>",
    "<NSLayoutConstraint:0x600002e92a80 'UIView-leftMargin-guide-constraint' H:|-(8)-[UILayoutGuide:0x6000037bfc60'UIViewLayoutMarginsGuide'](LTR)   (active, names: '|':UIStackView:0x7ffd5246c960 )>",
    "<NSLayoutConstraint:0x600002e92b20 'UIView-rightMargin-guide-constraint' H:[UILayoutGuide:0x6000037bfc60'UIViewLayoutMarginsGuide']-(8)-|(LTR)   (active, names: '|':UIStackView:0x7ffd5246c960 )>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x600002e90b90 UIImageView:0x7ffd5246a4f0.width == 130   (active)>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful.
2019-02-07 13:12:09.117373+0100 WordPress[26227:10101645] [LayoutConstraints] Unable to simultaneously satisfy constraints.
	Probably at least one of the constraints in the following list is one you don't want. 
	Try this: 
		(1) look at each constraint and try to figure out which you don't expect; 
		(2) find the code that added the unwanted constraint or constraints and fix it. 
(
    "<NSLayoutConstraint:0x600002d54b40 WordPress.CircularImageView:0x7ffd4fb09510.width == 64   (active)>",
    "<NSLayoutConstraint:0x600002d02530 H:|-(20)-[UIStackView:0x7ffd4fb09310]   (active, names: '|':UITableViewCellContentView:0x7ffd4fb09120 )>",
    "<NSLayoutConstraint:0x600002d03ac0 H:[UIStackView:0x7ffd4fb09310]-(20)-|   (active, names: '|':UITableViewCellContentView:0x7ffd4fb09120 )>",
    "<NSLayoutConstraint:0x600002e15a40 'UISV-canvas-connection' UIStackView:0x7ffd4fb09310.leading == _UILayoutSpacer:0x60000312a0d0'UISV-alignment-spanner'.leading   (active)>",
    "<NSLayoutConstraint:0x600002e155e0 'UISV-canvas-connection' UIStackView:0x7ffd4fb09310.centerX == WordPress.CircularImageView:0x7ffd4fb09510.centerX   (active)>",
    "<NSLayoutConstraint:0x600002e35d10 'UISV-spanning-boundary' _UILayoutSpacer:0x60000312a0d0'UISV-alignment-spanner'.leading <= WordPress.CircularImageView:0x7ffd4fb09510.leading   (active)>",
    "<NSLayoutConstraint:0x600002e0fde0 'UIView-Encapsulated-Layout-Width' UITableViewCellContentView:0x7ffd4fb09120.width == 94   (active)>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x600002d54b40 WordPress.CircularImageView:0x7ffd4fb09510.width == 64   (active)>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful.```

@ScoutHarris

Copy link
Copy Markdown
Contributor Author

Hey @jklausa . Unless I'm missing something, those warnings are caused by the split view, and have been around a while.

I've already branched off of this, so I’ll look again in my current branch to make sure I didn’t miss any that I caused.

@ScoutHarris
ScoutHarris changed the base branch from feature/10832-insights_tandc_dropdown_rows to develop February 7, 2019 17:02
@ScoutHarris ScoutHarris modified the milestones: 11.8, 11.9 Feb 8, 2019

@jklausa jklausa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dang, you're right, I forgot about those! sorry :) :shipit:

@ScoutHarris
ScoutHarris merged commit a617d09 into develop Feb 11, 2019
@ScoutHarris
ScoutHarris deleted the feature/10946-period_authors branch February 11, 2019 21:18
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