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: use bang for errors #11670

Closed
wants to merge 5 commits into from

Conversation

rahulpatel596
Copy link

Summary
What kind of change does this PR introduce?
Report error design update to exclamation mark

Describe the need for this change
Runtime design update

Related Issues/PRs
Issue #9820
Please let me know if there is any issue or need any changes :)

@rahulpatel596 rahulpatel596 requested a review from a team as a code owner November 15, 2020 06:46
@rahulpatel596 rahulpatel596 requested review from patrickhulce and removed request for a team November 15, 2020 06:46
@google-cla
Copy link

google-cla bot commented Nov 15, 2020

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@google-cla google-cla bot added the cla: no label Nov 15, 2020
@rahulpatel596 rahulpatel596 changed the title report-error-design-update report(runtime-error): design-update Nov 15, 2020
@rahulpatel596
Copy link
Author

rahulpatel596 commented Nov 15, 2020 via email

@google-cla
Copy link

google-cla bot commented Nov 15, 2020

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@rahulpatel596
Copy link
Author

rahulpatel596 commented Nov 15, 2020

@googlebot I fixed it!

@google-cla
Copy link

google-cla bot commented Nov 15, 2020

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

1 similar comment
@google-cla
Copy link

google-cla bot commented Nov 15, 2020

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

updated category-renderer.js file to fix ubuntu test
@google-cla
Copy link

google-cla bot commented Nov 15, 2020

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

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.

Thanks so much @rahulpatel596! 🎉

If you take a look at https://lighthouse-19vbwclqz.vercel.app/error/ I think we're still missing the replacement of the ? with the exclamation for the category scores.

Looks good though! :)

.lh-scorescale-range--fail::before {
border-left: calc(var(--score-icon-size) / 2) solid transparent;
border-right: calc(var(--score-icon-size) / 2) solid transparent;
border-bottom: var(--score-icon-size) solid var(--color-fail);
}

.lh-audit--error .lh-audit__score-icon{
height:28px;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
height:28px;
height: 28px;
min-width: 10px;

Copy link
Collaborator

Choose a reason for hiding this comment

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

without this the icons got squished

image

Copy link
Collaborator

Choose a reason for hiding this comment

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

would also be nice to pull these values out into CSS variables like --score-icon-size is :)

.lh-scorescale-range--fail::before {
border-left: calc(var(--score-icon-size) / 2) solid transparent;
border-right: calc(var(--score-icon-size) / 2) solid transparent;
border-bottom: var(--score-icon-size) solid var(--color-fail);
}

.lh-audit--error .lh-audit__score-icon{
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
.lh-audit--error .lh-audit__score-icon{
.lh-audit--error .lh-audit__score-icon {

Copy link
Author

@rahulpatel596 rahulpatel596 Nov 17, 2020

Choose a reason for hiding this comment

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

Just curious, Is there a specific reason why is space required here or is it just code standard for project?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Just readability and consistency in style :)

Comment on lines 732 to 733
.lh-metric--error .lh-metric__innerwrap::before{
height:28px;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
.lh-metric--error .lh-metric__innerwrap::before{
height:28px;
.lh-metric--error .lh-metric__innerwrap::before {
height: 28px;
min-width: 10px;

@connorjclark connorjclark changed the title report(runtime-error): design-update report: use bang for errors Nov 16, 2020
@rahulpatel596
Copy link
Author

Hey @patrickhulce
Thank you so much for reviewing. I'll make changes and create a PR

@patrickhulce
Copy link
Collaborator

You're very welcome @rahulpatel596 thanks for putting this together and working on it!

I'll make changes and create a PR

No need to create another new PR, you can keep pushing to your fork to update this existing PR :)

@google-cla
Copy link

google-cla bot commented Nov 17, 2020

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@rahulpatel596
Copy link
Author

Hey @patrickhulce I made changes for above reviews and also added exclamation for category scores. I had a quick question regarding header exclamation icon size. It seems like there were no details regarding this header icon size in issue design. would it be 120px * 120px or am I missing any details here.
Screen Shot 2020-11-17 at 12 54 32 AM

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.

thanks @rahulpatel596!

looks like we're missing the top header overrides too

image

lighthouse-core/report/html/report-styles.css Show resolved Hide resolved
lighthouse-core/report/html/report-styles.css Outdated Show resolved Hide resolved
lighthouse-core/report/html/report-styles.css Outdated Show resolved Hide resolved
lighthouse-core/report/html/report-styles.css Outdated Show resolved Hide resolved
@@ -128,6 +128,8 @@
--score-icon-margin: 0 var(--score-icon-margin-right) 0 var(--score-icon-margin-left);
--score-icon-size: 12px;
--scores-container-padding: 20px 0 20px 0;
--error-icon-size: 28px;
Copy link
Collaborator

Choose a reason for hiding this comment

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

there's a lot of padding here that inflates this number above how large the icon actually is, WDYT about using a version with the padding stripped off like the below?

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 18" width="12" height="18" fill="none">
  <path d="M 4.5 16.5 L 7.5 16.5 L 7.5 13.5 L 4.5 13.5 L 4.5 16.5 Z" fill="#FF4E42"/>
  <path d="M 4.5 10.5 L 7.5 10.5 L 7.5 1.5 L 4.5 1.5 L 4.5 10.5 Z" fill="#FF4E42"/>
</svg>

@@ -1105,6 +1123,16 @@
--gauge-circle-size: var(--gauge-circle-size-big);
}

.lh-sticky-header--visible > .lh-gauge__wrapper--fail > .lh-gauge__svg-wrapper {
background-image: url("data:image/svg+xml,%3Csvg width='36' height='36' viewBox='0 0 36 36' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M17 26H20V23H17V26Z' fill='%23FF4E42'/%3E%3Cpath d='M17 20H20V11H17V20Z' fill='%23FF4E42'/%3E%3C/svg%3E");
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think we need to modify the SVG here, just position it

background-position: center;
background-repeat: no-repeat;

Copy link
Author

Choose a reason for hiding this comment

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

What you mean by not modifying svg in this comment. Do you mean using same sized svg for both these cases, and just scaling it up or down.
.lh-sticky-header--visible > .lh-gauge__wrapper--fail > .lh-gauge__svg-wrapper
&
.lh-category-header .lh-gauge__wrapper--fail .lh-gauge__svg-wrapper

Copy link
Collaborator

Choose a reason for hiding this comment

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

I mean that we should reuse the same SVG data URL for all of these (kept in a CSS variable) and not mess with its width/height/viewBox.

In this case we don't even need to scale it up (though we will need to for the large gauge)

}

.lh-category-header .lh-gauge__wrapper--fail .lh-gauge__svg-wrapper{
background-image: url("data:image/svg+xml,%3Csvg width='120' height='120' viewBox='0 0 120 120' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M56 80H64V72.0001H56V80Z' fill='%23FF4E42'/%3E%3Cpath d='M56 64H64V41H56V64Z' fill='%23FF4E42'/%3E%3C/svg%3E%0A");
Copy link
Collaborator

Choose a reason for hiding this comment

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

rather than modifying the SVG itself, let's try to use background-size to scale it up

maybe we can start with...

background-size: calc(var(--gauge-circle-size-big) * 0.6);

width:36px;
}

.lh-category-header .lh-gauge__wrapper--fail .lh-gauge__svg-wrapper{
Copy link
Collaborator

Choose a reason for hiding this comment

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

we don't want this to appear with all failing scores, just errored ones

image

(what it looks like right now)

Copy link
Author

Choose a reason for hiding this comment

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

For guage, I was only able to find these classes for guage .lh-gauge__wrapper--pass .lh-gauge__wrapper--average .lh-gauge__wrapper--fail or .lh-gauge__wrapper--not-applicable
There doesn't seem to any class for error, Do I need to add it for not-applicable one?
Thank you so much for answering my noob questions :)

Copy link
Collaborator

@patrickhulce patrickhulce Nov 18, 2020

Choose a reason for hiding this comment

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

Looks like you'll need to add one in the same place where you updated percentageEl.textContent :)

Thank you so much for answering my noob questions :)

Of course that's what we're here for 😃

@google-cla
Copy link

google-cla bot commented Nov 18, 2020

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@patrickhulce
Copy link
Collaborator

@rahulpatel596 are you still interested in taking this on? :) We have a release coming up if you'd like to include it, but just let us know if you've gotten busy with other work to hand this one off.

@rahulpatel596
Copy link
Author

are you still interested in taking this on? :) We have a release coming up if you'd like to include it, but just let us know if you've gotten busy with other work to hand this one off.

@patrickhulce Hey I am really sorry, I've gotten really busy with other stuff. You can hand this off, Thank you so much for all your help, Appreciate it :)

@patrickhulce
Copy link
Collaborator

Thanks @rahulpatel596 no worries we appreciate the progress you made :)

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

Successfully merging this pull request may close these issues.

None yet

3 participants