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

remove report v1 and dependencies #2596

Merged
merged 6 commits into from
Jun 28, 2017
Merged

remove report v1 and dependencies #2596

merged 6 commits into from
Jun 28, 2017

Conversation

brendankenny
Copy link
Member

@brendankenny brendankenny commented Jun 26, 2017

part of #2276

also removes formatters, handlebars, handlebar build files, etc

still to do:

  • decide what to do with PerfX. Its UI depends on injecting a handlebars partial into the report, which no longer supports handlebars partials. Disabled while we decide on that.
  • move the v2 report to lighthouse-core/report/. Was too confusing to also do that in this PR :)

@paulirish paulirish mentioned this pull request Jun 26, 2017
7 tasks
Copy link
Contributor

@ebidel ebidel left a comment

Choose a reason for hiding this comment

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

Noizzzzze

@@ -8,8 +8,8 @@
/**
* An enumeration of acceptable output modes:
* 'json': JSON formatted results
* 'html': An HTML report
* 'domhtml': An HTML report rendered client-side with DOM elements
* 'html': An HTML report rendered client-side with DOM elements
Copy link
Contributor

Choose a reason for hiding this comment

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

How about just "An HTML report". "rendered client-side with DOM elements" is an unimportant implementation detail of v1 vs v2.

Copy link
Member Author

Choose a reason for hiding this comment

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

done

}
},
details: v2TableDetails
details: tableDetails
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are some audits keeping extendedInfo and others are nuking it?

Copy link
Member Author

Choose a reason for hiding this comment

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

Why are some audits keeping extendedInfo and others are nuking it?

removing makeV1TableHeadings was the immediate motivation, and then some that were using v2TableDetails for details but something besides a v1 table in the extendedInfo, but ended up with identical info in each...and then I probably got a little too trigger happy. I'll revert them so we can deal with slimming down LHR in a separate PR.

assert.equal(auditResult.extendedInfo.value[0].url, URL);
assert.equal(auditResult.extendedInfo.value[0].label, 'line: 123');
assert.equal(auditResult.details.items.length, 2);
assert.equal(auditResult.details.items[0][1].text, URL);
Copy link
Contributor

Choose a reason for hiding this comment

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

ugh. we should probably rename URL while you're here. Node 8 has https://nodejs.org/api/url.html.

Copy link
Collaborator

Choose a reason for hiding this comment

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

you still have to require it though and it's meant to be identical so why need to rename?

Copy link
Contributor

Choose a reason for hiding this comment

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

This is true. I suppose we'll know if someone introduces that require and things break. Just thinking ahead.

Copy link
Member Author

Choose a reason for hiding this comment

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

we probably should generally use lowercase url for things like that

@@ -36,7 +36,7 @@ describe('External anchors use rel="noopener"', () => {
URL: {finalUrl: URL},
Copy link
Contributor

Choose a reason for hiding this comment

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

more of them.

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.

not clear to me why we're nuking extendedInfo in a lot of places/how the decision was made to nuke or keep. Those will be breaking changes if anyone was looking for information in there but maybe I'm missing the methodology?

@@ -247,8 +246,7 @@ class ConsistentlyInteractiveMetric extends Audit {
displayValue: Util.formatMilliseconds(timeInMs),
optimalValue: this.meta.optimalValue,
extendedInfo: {
value: extendedInfo,
formatter: Formatter.SUPPORTED_FORMATS.NULL,
value: extendedInfo
Copy link
Collaborator

Choose a reason for hiding this comment

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

why you gotta nuke the extra commas? :(

Copy link
Member Author

Choose a reason for hiding this comment

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

why you gotta nuke the extra commas? :(

haha, I realized what I was doing halfway through and thought that might be a mistake. I'll restore them :)

* 'html': An HTML report
* 'domhtml': An HTML report rendered client-side with DOM elements
* 'html': An HTML report rendered client-side with DOM elements
* 'domhtml': Alias for 'html' report.
Copy link
Member

Choose a reason for hiding this comment

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

can you also tweak the filename for domhtml files to be just .html? That's in bin.ts

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@brendankenny brendankenny changed the title remove report v1 and associated dependencies remove report v1 and dependencies Jun 26, 2017
@brendankenny
Copy link
Member Author

PTAL

@ebidel
Copy link
Contributor

ebidel commented Jun 26, 2017

Should the smoketests preserve extendedInfo for now?

@brendankenny
Copy link
Member Author

Should the smoketests preserve extendedInfo for now?

Yeah, I guess so, though there's no details expectations on master, which are arguably more important now

@brendankenny
Copy link
Member Author

done

@brendankenny
Copy link
Member Author

drive-by commenters happy?

@paulirish
Copy link
Member

i'm happy.

@ebidel
Copy link
Contributor

ebidel commented Jun 28, 2017

@brendankenny you handle file move?

@brendankenny
Copy link
Member Author

you handle file move?

got it now, thanks

@patrickhulce
Copy link
Collaborator

i'm good too

@brendankenny
Copy link
Member Author

if you're developing Lighthouse, you'll also need to manually delete lighthouse-core/report/partials/ and lighthouse-core/report/templates/ as the built files in there were gitignored before and so aren't automatically deleted for you.

you'll probably also want to yarn install-all (and probably yarn build-all) to get rid of removed dependencies.

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

4 participants