-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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: refactor dom structure #12816
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm happy with these name changes aside from the lh-vars
callout, but I could live with that.
report/assets/styles.css
Outdated
@@ -312,31 +312,31 @@ | |||
color: var(--report-text-color); | |||
} | |||
|
|||
.lh-root :focus { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't love the use of lh-vars
for these purposes here :/
lh-scope
doesn't exactly feel right either. IIRC, we used to put all the lh-vars
on lh-root
but then one environment didn't end up having an lh-root
because it split everything out and we moved it onto lh-vars
instead. Will that same problem happen again with lh-scope
? Should we just keep both of these? That doesn't actually seem like the worst outcome.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just don't want to use 'root' where there are multiple of them. And yeah in the PSI case we have the multiple 'partials' and they all need these classes. I was thinking 'scope' felt good as you can have multiple. and then these L305-325 styles feel a little better on a "scope" than in a var-only thing.
lemme try finding a new home for these styles....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay i was able to place them more specifically: 98cf7d6
lg?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know we deleted lh-container
, but that seems like a good name for what is now root/vars.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i just pushed one last change which removes the one place i had been applying actual styles with lh-vars
. (this went against the spirit of the name, yeah)
so now we're back to lh-vars only being for providing the vars. :)
maybe its my recency bias, but when i see lh-container
i feel like there should be only one, but.. its true its not as explicit as root
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i could see renaming lh-vars into lh-scope to better indicate its not just variable definitions but also this DOM subtree is intended to be LH report content only. I dont have strong feelings, but if we did it, it'd be in a followup
just naming wise, I'd put in a vote for lh-scope
over lh-vars
for this reason, but interested in the answer to @patrickhulce's question about the PSI frontend
Co-authored-by: Patrick Hulce <[email protected]>
This reverts commit 0400b9196415a83a88dc5ddbe6af08e1a26bf42d.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still good with this.
Re: PSI point, I hear ya. I just don't have the same mental understanding of a container
so multiple is fine :)
fyi the removal of |
All (the pull request submitter and all commit authors) CLAs are signed, but 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 by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
somethings to work out in devtools first, let's work on a CL at the same time and submit this PR together to reduce churn. some things we noted on devtools: (devtools; focus on lack of topbar bg color) (standalone; there is not topbar bg color issue. here's the style rules) The order these style rules are applied is different between standalone report and devtools. note the "constructed stylesheet" in devtools but not in standalone:
|
first solution that comes to mind is to lean all-in on injecting our styles via JS. as in: convert this also means we can remove the "class name listing" we do in google3...and wouldn't actually need to prefix everything with |
I'm supportive of this long-term, we need to be able to rely on the consistency of CSS in multiple environments and varied injection methods prevent that from happening. Other short-term solutions to consider in the meantime...
|
@paulirish you marked this as waiting on reviewer, is there anything specific you need eyes on or just the devtools work @connorjclark raised? |
All (the pull request submitter and all commit authors) CLAs are signed, but 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 by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
…rs--dark. addtl css var cleanup and consolidation. isDevtools broken
All (the pull request submitter and all commit authors) CLAs are signed, but 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 by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
partial fix of #12254 ..
implementing my proposed DOM structure from here: #12254 (comment)
doing this paves the way to implement #12772
inlining for convenience:
edit: in fact, now as long as .lh-vars is attached to topbar and header and categories and footer, we're good.
notes:
lh-root
is removed as it basically merges intolh-vars
.lh-vars
intolh-scope
to better indicate its not just variable definitions but also this DOM subtree is intended to be LH report content only. I dont have strong feelings, but if we did it, it'd be in a followuplh-header
container. (following the proposal)..lh-main
container for now. i see a nice way to remove it in a followup, that'll also fix a few more things..lh-narrow
as that's been unused for a long while.