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

report: expand groups within Passed Audits #6930

Merged
merged 5 commits into from
Jan 11, 2019
Merged

report: expand groups within Passed Audits #6930

merged 5 commits into from
Jan 11, 2019

Conversation

paulirish
Copy link
Member

This was the UX conclusion when PSI noticed the groupings in our new renderer.

Copy link
Member

@brendankenny brendankenny left a comment

Choose a reason for hiding this comment

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

I'd prefer this, but I believe the conclusion was that there would be no groups under passed.

Copy link
Collaborator

@patrickhulce patrickhulce left a comment

Choose a reason for hiding this comment

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

so is the end result that groups are not collapsible anymore? they are always expanded?

// Expanded by default!
// 1. The 'failed' clump has all groups expanded.
// 2. If a clump is collapsed (passed, n/a), we want the groups within to already be expanded
const auditGroupElem = this.renderAuditGroup(groupDef, {expandable: false});
Copy link
Collaborator

Choose a reason for hiding this comment

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

this is a little confusing, it's probably because I don't remember what our opts actually do at this point 😆 so expandable means isExpansionToggleable and it's expanded by default?

Copy link
Member Author

Choose a reason for hiding this comment

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

agree it's a funny name. expandable means collapsedAndCanBeExpanded

@paulirish
Copy link
Member Author

I'd prefer this, but I believe the conclusion was that there would be no groups under passed.

Hmm I dont remember that. but Ok. :)


Here's a GIF showing (1) current master - two collapsed groups under Passed. then (2) this PR - two expanded groups under Passed. The gif doesn't show (C) current PSI - groups are intermingled under Passed.

kapture 2019-01-04 at 12 40 32

Brendan thought the conclusion was option C, but I forget, tbh.
@kusler wanna make a call?

@brendankenny
Copy link
Member

yes, I remember it clearly because I was sad to lose the headings under Passed (I believe the argument was that you don't really need them at that point, since they're just a list of passed audits), and I had just finished my sweet ascii art and didn't want to change it :)

@egsweeny
Copy link
Contributor

egsweeny commented Jan 4, 2019

+1 to the idea of getting rid of both the description text and headers within passed audits/not applicable (i.e. how PSI currently handles it). Simple = good.

The only addition I'd like to make is some link that is presented to the user upon expansion of the passed audit/not applicable categories that sends them to a canonical list of the audits with their respective categories, so that on the off chance that a user wants to map a passed audit to its category it is easy for them to do so. WDYT?

@paulirish
Copy link
Member Author

Yah now that I've looked at it more, I support the idea of just dropping group titles/descriptions within these.

its extra text that we don't really need for low-priority content.

@paulirish
Copy link
Member Author

I'll update the PR with those changes.

@paulirish paulirish added the 4.0 label Jan 5, 2019
@connorjclark
Copy link
Collaborator

should #6279 be closed?

@paulirish
Copy link
Member Author

There's no grouping within Passed, Not Applicable, Manual any longer.

https://abject-partner.surge.sh/example.html

@@ -272,7 +274,7 @@ class CategoryRenderer {
*/
renderUnexpandableClump(auditRefs, groupDefinitions) {
Copy link
Member

Choose a reason for hiding this comment

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

weren't you going to rename?

Copy link
Member

Choose a reason for hiding this comment

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

weren't you going to rename?

oh, maybe because pwa-category-renderer.js also uses it?

@@ -291,7 +293,8 @@ class CategoryRenderer {
* ├── audit 5
* └── audit 6
* clump (e.g. 'manual')
* ├── …
* ├── audit 1
* ├── audit 2
* ⋮
Copy link
Member

Choose a reason for hiding this comment

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

maybe

/**
 * Renders a clump (a top level report section), under a status of failed, manual,
 * passed, or notApplicable. The result ends up something like:
 *
 * failed clump
 *   ├── audit 1 (w/o group)
 *   ├── audit 2 (w/o group)
 *   ├── audit group
 *   |  ├── audit 3
 *   |  └── audit 4
 *   └── audit group
 *      ├── audit 5
 *      └── audit 6
 * other clump (e.g. 'manual')
 *   ├── audit 1
 *   ├── audit 2
 *   ├── …
 *   ⋮

@@ -305,17 +308,15 @@ class CategoryRenderer {
return failedElem;
}

const expandable = true;
const elements = this._renderGroupedAudits(auditRefs, groupDefinitions, {expandable});

const clumpInfo = this._clumpDisplayInfo[clumpId];
// TODO: renderAuditGroup shouldn't be used to render a clump (since it *contains* audit groups).
Copy link
Member

Choose a reason for hiding this comment

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

this TODO makes no sense now. Maybe // TODO: renderAuditGroup shouldn't be used to render a clump since it's a clump, not a group.

clumpElem.classList.add('lh-clump', clumpInfo.className);

elements.forEach(elem => clumpElem.appendChild(elem));
// For all non-failed clumps, we don't group
Copy link
Member

Choose a reason for hiding this comment

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

This might not make much sense outside the context of this PR. Just // Add all audit results to the clump. (or add an intermediate const auditElems = auditRefs.map(...) and can probably avoid the comment altogether)

@brendankenny
Copy link
Member

proposal on top of this in #6982

Copy link
Member

@brendankenny brendankenny left a comment

Choose a reason for hiding this comment

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

LGTMMM

@paulirish paulirish merged commit bc23383 into master Jan 11, 2019
@paulirish paulirish deleted the expandpassed branch January 11, 2019 02:43
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.

None yet

5 participants