-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
Add isMobile
boolean to audit context / create Environment
artifact
#7043
Comments
I want to do this so we can use it in #6687. Should we use the |
I like the idea of an |
Cool, I didn't know about base artifacts 🙂. Seems like they're already very similar to an Right now we use the Do we even need Found this relevant PR: #5871 |
I think we want something similar to what content-width does now. We want to know both
We use the host user agent combined with our emulation settings to compute the above. When
Its primary purposes is to know what Chrome version Lighthouse ran under. I guess to flip this question. It's a fact gathered from the browser/page, and we want to surface it in the report. Where should we put it if we didn't put it in artifacts? |
Do you mean we want an
Ok, I'll change it to
Could we pass the driver into I think we don't want people to use |
First good use I can think of would be for automatically disabling our CPU throttling if you've attached to a real device.
Hmmm, I'm confused. Why not? Host user agent would be a mobile user agent if you're running on a real mobile device. That's why we check
I don't really see it this way. It's useful to know exactly what device/user agent Lighthouse was running on. Not just what we were emulating. The OS, device type, and other goodies (not just Chrome version) are usually in there. |
Oh, I didn't get that, it all makes sense then. I thought desktop Chrome was somehow involved when running on a mobile device. Will create an |
On Chrome 76 - where Lighthouse was updated from 4.1.0 to 5.2.0 (including this issue) - we are not able to get the Mobile site audited, only the Desktop site is loading during the Mobile audit. Anything I can do to fix this? |
OK, "It's a Chrome bug, we're working on a fix." #9476 (Thanks to @patrickhulce on twitter) |
Summary
In content width, we branch our logic based on if the audit was on a mobile page or not. I could see plugins wanting to do something similar. Moving this to an artifact or context boolean could be helpful.
Note: Created from a TODO in code so it can be more visible and properly prioritized
The text was updated successfully, but these errors were encountered: