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

Show runtime configuration on report #1485

Merged
merged 8 commits into from
Jan 31, 2017

Conversation

weiwei-lin
Copy link
Contributor

@weiwei-lin weiwei-lin commented Jan 17, 2017

Added a section at the end of the report page which shows the runtime configuration of this report (e.g. disable CUP throttling).
Screenshot [updated]:
current-config

Will add some test cases later.

@ebidel ebidel added the report label Jan 17, 2017
background-position: center center;
background-repeat: no-repeat;
background-size: contain;
background-color: transparent;

Choose a reason for hiding this comment

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

Move background-* into its on selector? .report-body__icon, .runtime-config__icon.

Perhaps consider using the shorthand for background too. https://developer.mozilla.org/en/docs/Web/CSS/background

Copy link
Contributor Author

@weiwei-lin weiwei-lin Jan 18, 2017

Choose a reason for hiding this comment

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

Deleted .report-body__icon {...} because it's redundant and I prefer to stick with the longhand version because I feel it's more readable.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think I saw @brendankenny mention this somewhere else, and I've been thinking the same...

Can we start a new perfx.css stylesheet and dump all the perfx stuff in that? The template can inject it dynamically based the context. We want to limit stylesheet bloat for CLI/CRX/Devtools users.

Copy link
Contributor Author

@weiwei-lin weiwei-lin Jan 18, 2017

Choose a reason for hiding this comment

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

Can we start a new perfx.css stylesheet and dump all the perfx stuff in that?

Sure. I will separate all the perf-x related CSS code to another file. But for this particular case, I think runtime config section belongs to the main report not just perf-x.

Copy link

@samuelli samuelli left a comment

Choose a reason for hiding this comment

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

Actually, the ticks/crosses & the negation "disabled" are super confusing; can we change that please?

Maybe use bullet points and change the text depending on the configuration:

  • "Network throttling enabled'
  • "CPU throttling disabled"

@brendankenny
Copy link
Member

can you give a screenshot of this in context of the whole report?

@weiwei-lin
Copy link
Contributor Author

weiwei-lin commented Jan 17, 2017

can you give a screenshot of this in context of the whole report?

Sure : )
current-config-entire-page

@weiwei-lin
Copy link
Contributor Author

weiwei-lin commented Jan 18, 2017

Actually, the ticks/crosses & the negation "disabled" are super confusing; can we change that please?

Maybe use bullet points and change the text depending on the configuration:

I wanted it to be consistent with cli-flags (e.g. --disable-cpu-throttling). But yeah, we should remove the "disabled". Thanks for your advice.
But I still prefer tick/cross over bullet points + "enabled/disabled", because tick/cross allows users to tell which option is enabled at a glance.

background-position: center center;
background-repeat: no-repeat;
background-size: contain;
background-color: transparent;
Copy link
Contributor

Choose a reason for hiding this comment

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

I think I saw @brendankenny mention this somewhere else, and I've been thinking the same...

Can we start a new perfx.css stylesheet and dump all the perfx stuff in that? The template can inject it dynamically based the context. We want to limit stylesheet bloat for CLI/CRX/Devtools users.

@ebidel
Copy link
Contributor

ebidel commented Jan 18, 2017

My initial feedback from looking at the screenshot is that the "Runtime configuration" section looks very similar to report results. Users might get confused and think these X's and checked items are part of their perf results (as opposed to the way the run was setup).

We may need to think about how to best surface the emulation settings in the report. #784 was another approach of adding emulation settings to the report.

@weiwei-lin
Copy link
Contributor Author

If this part needs to be under perf-x folder, ignore this PR for now. I will move it to perf-x folder and inject this to main report as a partial (when in --interactive mode) after #1455 is landed.

@paulirish
Copy link
Member

paulirish commented Jan 24, 2017

If this part needs to be under perf-x folder, ignore this PR for now.

I think this should be in the core code, and not living in perf-x.

But I also have a different idea on UI which we can first discuss offline.

@paulirish
Copy link
Member

We discussed using a <details><summary>Run configuration</summary> .... </details> block for the config and putting in the top grey header of the report. Also "enabled/disabled"

Copy link
Member

@paulirish paulirish left a comment

Choose a reason for hiding this comment

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

Screenshots for the curious:

image
image

@@ -133,14 +133,24 @@ class Runner {
a => Aggregate.aggregate(a, runResults.auditResults));
}

const runtimeConfig = {
environment: [
{name: 'CPU Throttling', value: !opts.flags.disableCpuThrottling},
Copy link
Member

Choose a reason for hiding this comment

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

let's put CPU throttling last of the three and add the extra detail hardcoded in here.

Network throttling (150ms RTT, 1.6Mbps down, 750Kbps up): enabled
Device emulation (Nexus 5X): enabled
CPU throttling (5x slowdown): disabled

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added. Was thinking about adding more details (like screen size, etc)

background-image: url('data:image/svg+xml;utf8,<svg fill="black" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"/><path d="M0 0h24v24H0z" fill="none"/></svg>');
}

.report-body__header-dropdown {
Copy link
Member

Choose a reason for hiding this comment

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

I think it'd be better if the header just grew in side when you expand this.

So we could use a ▶ and it goes to ▼ when you click on it. cursor: pointer on the icon so its clearly actionable.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it'd be better if the header just grew in side when you expand this.

Sorry, I don't have a clear idea what you mean here. Do you mean grow the header itself when we expand it (so it looks like the current UI but without the line between header bar and drop down)? If not, would you mind explaining in a little bit detail?

<a href="#" data-action="save-json">Save as JSON...</a>
</ul>
</span>
<button class="report-body__icon share js-share" title="Share report on Github"></button>
Copy link
Member

Choose a reason for hiding this comment

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

"GitHub"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@ebidel
Copy link
Contributor

ebidel commented Jan 27, 2017

Like that dropdown UI. Should we incorporate some sort of setting icon too?

https://material.io/icons/#ic_settings

@weiwei-lin
Copy link
Contributor Author

Should we incorporate some sort of setting icon too?

Hmm. But the top bar does not allow users to configure anything. I'm not sure if a setting icon fits here.

@weiwei-lin
Copy link
Contributor Author

Changed the header bar from a fixed header to part of report content and improved UI.
current-config

Scroll down + Url blocking patterns
current-config-scrolled-down

@@ -790,6 +839,7 @@ body {

.export-section {
position: relative;
display: none;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

instead of hiding the export-button, hide the entire export-section when not in viewer context. So the dropdown won't cause the report page to be wider than it should be, which could make the report page scroll-able on x direction.

<li class="config-section__item">
<p class="config-section__desc">
{{ this.name }} ({{ this.description }})
<strong>: {{#if this.value }}Enabled{{else}}Disabled{{/if}}</strong>

Choose a reason for hiding this comment

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

Don't bold : and remove the extra space before the : in the UI.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed. thx.

const environment = [
{
name: 'CPU Throttling',
value: !flags.disableCpuThrottling,
Copy link
Member

Choose a reason for hiding this comment

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

rename value to enabled ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@paulirish paulirish merged commit a5416c4 into GoogleChrome:master Jan 31, 2017
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.

None yet

5 participants