Skip to content

Conversation

@paulirish
Copy link
Member

fixes #14560

@vercel
Copy link

vercel bot commented Dec 5, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
lighthouse ✅ Ready (Inspect) Visit Preview Dec 5, 2022 at 11:35PM (UTC)

let deviceEmulation = Util.i18n.strings.runtimeMobileEmulation;
if (settings.screenEmulation.disabled) {
deviceEmulation = Util.i18n.strings.runtimeNoEmulation;
} else if (settings.formFactor === 'desktop') {
Copy link
Contributor

Choose a reason for hiding this comment

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

I still think we should use settings.screenEmulation.mobile here because the strings refer to the emulated device and not scoring methodology.

That should only matter when the formFactor and screenEmulation.mobile disagree for some reason so this is probably fine.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good idea.

const get = settings => Util.getEmulationDescriptions(settings).deviceEmulation;
/* eslint-disable max-len */
assert.equal(get({formFactor: 'mobile', screenEmulation: {disabled: false, mobile: true}}), 'Emulated Moto G4');
assert.equal(get({formFactor: 'mobile', screenEmulation: {disabled: true, mobile: true}}), 'No emulation');
Copy link
Contributor

Choose a reason for hiding this comment

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

this does bring it back to @connorjclark's point that there's no indication this was a mobile report now

Copy link
Contributor

Choose a reason for hiding this comment

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

Adding a separate indicator for that would be fine, I just don't think it makes sense here.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@devtools-bot devtools-bot merged commit a8236d4 into main Dec 8, 2022
@devtools-bot devtools-bot deleted the report-emulationstr-ifdisabled branch December 8, 2022 22:00
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.

Report shows "Emulated Moto G4" when testing on a mobile device

5 participants