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: allow CRC to use renderTextUrl #9237

Merged
merged 1 commit into from
Jun 20, 2019
Merged

Conversation

paulirish
Copy link
Member

  1. reuse renderTextUrl instead of maintaining separate functionality inside the CRC. The pattern of passing in the detailsRenderer was first used in snippetRenderer, so I figured why not.
  2. only text-decorate the linky part.

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.

I started to review this and then realized you just wanted to merge into @connorjclark 's PR, soooo feel free to ignore.

* @return {Node}
*/
static createChainNode(dom, tmpl, segment) {
static createChainNode(dom, tmpl, segment, detailsRenderer) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

this definitely feels weird and passing this to anything smells, but I don't really have a better suggestion that doesn't involve totally refactoring how details renderer is structured, sooooooo. sure, why not :)

Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe this class should extend DR? but i agree on deferring, this shouldnt be handled within this pr

@@ -182,7 +183,7 @@ class CriticalRequestChainRenderer {
for (const key of Object.keys(root.tree)) {
const segment = CriticalRequestChainRenderer.createSegment(root.tree, key,
root.startTime, root.transferSize);
CriticalRequestChainRenderer.buildTree(dom, tmpl, segment, containerEl, details);
CriticalRequestChainRenderer.buildTree(dom, tmpl, segment, containerEl, details, detRenderer);
Copy link
Collaborator

Choose a reason for hiding this comment

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

det !? we at least gotta go with deets 😆

is this just coming up on 100 then?

@connorjclark connorjclark merged commit 7d93bde into report-url-anchors Jun 20, 2019
@brendankenny brendankenny deleted the crctexturl branch June 20, 2019 22:16
@brendankenny brendankenny restored the crctexturl branch June 20, 2019 22:16
@brendankenny brendankenny deleted the crctexturl branch June 20, 2019 22:16
@brendankenny brendankenny restored the crctexturl branch June 20, 2019 22:17
@brendankenny
Copy link
Member

renderNode was already a stretch for snippets, but that's a specialized method, but this is a pretty complicated way to make a link. I mean...it's a link. Do we just need a util method to get a displayed path and host?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants