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: implement new design for opportunities #5115

Merged
merged 9 commits into from
May 4, 2018
Merged

Conversation

@patrickhulce
Copy link
Collaborator

few UI notes:

  • chevron's don't rotate when expanded/collapsed
  • that's really all I could find :)

this.dom.find('.lh-load-opportunity__sparkline', tmpl).title = displayValue;
this.dom.find('.lh-load-opportunity__wasted-stat', tmpl).title = displayValue;
this.dom.find('.lh-sparkline__bar', tmpl).style.width = summaryInfo.wastedMs / scale * 100 + '%';
this.dom.find('.lh-load-opportunity__wasted-stat', tmpl).textContent = Util.formatSeconds(summaryInfo.wastedMs);
Copy link
Collaborator

Choose a reason for hiding this comment

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

we should probably filter on wastedMs < 50 now that it could show 0 s

@@ -116,6 +116,16 @@ class Util {
return `${coarseTime.toLocaleString()}${NBSP}ms`;
}

/**
* @param {number} ms
* @param {number=} granularity Controls how coarse the displayed value is, defaults to 10
Copy link
Collaborator

Choose a reason for hiding this comment

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

defaults to 0.1

if (!summaryInfo || !summaryInfo.wastedMs) {
return element;
}

const elemAttrs = {title: Util.formatDisplayValue(audit.result.displayValue)};
const sparklineContainerEl = this.dom.createChildOf(summary, 'div',
Copy link
Collaborator

Choose a reason for hiding this comment

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

yay cleanup! 🎉

color: var(--medium-75-gray);
text-align: center;
display: unset;
line-height: 40px;
Copy link
Collaborator

Choose a reason for hiding this comment

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

is this some variable +/* some padding?

margin: 0 5px;
}
.lh-load-opportunity__col--one {
flex: 5;
Copy link
Collaborator

Choose a reason for hiding this comment

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

I must say this was slightly magical to me given the header and details have different content, I have much to learn 📖 🤓

@paulirish paulirish changed the base branch from auditlistdisplay2 to master May 4, 2018 18:42
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.

LGTM

As the new UI settles it would be good to start asserting some of this stuff in the viewer/extension test. They're so barebones it will be a lot easier to add the tests as we go rather than at the end :)

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.

LGTM!

@paulirish paulirish merged commit db6b887 into master May 4, 2018
@paulirish paulirish deleted the oppodisplay branch May 4, 2018 20:53
kdzwinel pushed a commit to kdzwinel/lighthouse that referenced this pull request Aug 16, 2018
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

3 participants