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(redesign): inline display text. bold audit header text #8592

Merged
merged 7 commits into from
May 3, 2019

Conversation

connorjclark
Copy link
Collaborator

@connorjclark connorjclark commented Apr 24, 2019

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.

% encoding nit.

flex: 1;
}

/* Prepend display text with separator. But not in Opportunities. */
.lh-audit-group:not(.lh-audit-group--load-opportunities) .lh-audit__display-text:not(:empty):before {
content: '—';
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
content: '';
content: '\2014';

Copy link
Member

Choose a reason for hiding this comment

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

can this just go in the HTML? Kind of weird to do it with a pseudo-element

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

why? dt encoding issues are resolved

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@brendankenny can't just be HTML, need some sort of logic check. makes sense to me to have the display + logic in one place here.

Copy link
Member

Choose a reason for hiding this comment

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

can't just be HTML, need some sort of logic check. makes sense to me to have the display + logic in one place here.

I don't think it needs to be. Opportunities and the rest of the audits share text with a .lh-audit__display-text class, but they actually come from different templates, #tmpl-lh-opportunity vs #tmpl-lh-audit. If the #tmpl-lh-audit template gets the em dash inline, then it'll only show up there

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good catch on the template thing. But would still need a length check - and can't make a CSS rule for preceding sibling (pseudo code below).

image

.lh-audit__separator {
  margin: 0 var(--audit-item-gap);
}
/* not actually a thing */
.lh-audit__display-text:not(:empty) - .lh-audit__separator {
  display: none;
}

flex: 1;
}

/* Prepend display text with separator. But not in Opportunities. */
.lh-audit-group:not(.lh-audit-group--load-opportunities) .lh-audit__display-text:not(:empty):before {
Copy link
Member

Choose a reason for hiding this comment

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

while this selector does look crazy, it turns out to be reasonable.. 👍

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

:)

lighthouse-core/report/html/report-styles.css Outdated Show resolved Hide resolved
flex: 1;
}

/* Prepend display text with separator. But not in Opportunities. */
.lh-audit-group:not(.lh-audit-group--load-opportunities) .lh-audit__display-text:not(:empty):before {
content: '—';
Copy link
Member

Choose a reason for hiding this comment

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

per discussion in chat.. let's use whitespace on both sides of the dash.

Assuming we want to use var(--audit-item-gap) the we'll need some margin in here too:

  margin-right: var(--audit-item-gap);

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

@brendankenny
Copy link
Member

these things realllllly need a screenshot. No idea what "inline display text" means here :)

Co-Authored-By: Hoten <cjamcl@gmail.com>
@googlebot
Copy link

So there's good news and bad news.

👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this state. It's up to you to confirm consent of all the commit author(s), set the cla label to yes (if enabled on your project), and then merge this pull request when appropriate.

ℹ️ Googlers: Go here for more info.

flex: 1;
}

/* Prepend display text with em dash separator. But not in Opportunities. */
.lh-audit-group:not(.lh-audit-group--load-opportunities) .lh-audit__display-text:not(:empty):before {
Copy link
Member

Choose a reason for hiding this comment

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

best practices aren't grouped so aren't getting the :before

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

@paulirish paulirish changed the title report(redesign): inline display text. bold audit header text. report(redesign): inline display text. bold audit header text May 3, 2019
@paulirish paulirish merged commit ec0fd47 into master May 3, 2019
@paulirish paulirish deleted the rd-audit-title branch May 3, 2019 00:17
@connorjclark connorjclark mentioned this pull request May 3, 2019
55 tasks
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.

4 participants