refactor: split report-renderer into multiple files#1987
Merged
patrickhulce merged 4 commits intomasterfrom Apr 12, 2017
Merged
refactor: split report-renderer into multiple files#1987patrickhulce merged 4 commits intomasterfrom
patrickhulce merged 4 commits intomasterfrom
Conversation
Member
|
works for me |
Contributor
|
Works for me too. You know I love that |
ebidel
approved these changes
Apr 11, 2017
This was referenced Apr 11, 2017
Contributor
|
@patrickhulce you good on this? I don't want to get too deep and have rebase nightmares. |
Collaborator
Author
|
yep I'm ready if you are! |
| module.exports = DetailsRenderer; | ||
| } | ||
|
|
||
| /** @typedef {{type: string, text: string|undefined, header: DetailsJSON|undefined, items: Array<DetailsJSON>|undefined}} */ |
Contributor
There was a problem hiding this comment.
this won't work (it's scoped to the module like regular variables). I believe you can put it on DetailsRenderer, but then it'll have to be referred to as DetailsRenderer.DetailsJSON in report-renderer.js
Contributor
There was a problem hiding this comment.
although you can wait on that, because these are broken anyways (no non-null and I believe union types need parens when nested like this)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In preparation for introducing tags/grouped audit renderers the report-renderer.js started getting unwieldy. This splits it into 3 files DOM, DetailsRenderer, and ReportRenderer.
I know @brendankenny had Eric kill DOM but c'mon having these duplicated everywhere is bad and the class allows for easy test injection. I'll split up the test files too, but currently it conflicts with @ebidel's PR and figured I'd wait before I get too far.