Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
core(base-artifacts): add FormFactorIsMobile base artifact #7280
core(base-artifacts): add FormFactorIsMobile base artifact #7280
Changes from 3 commits
a701cd0
73432a5
44f2e89
9f4439e
9c618c0
ee475bb
0d2e829
78b82e1
2947f2c
54b5d94
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
we might need to bikeshed on these. When I see
artifacts.isMobile
, my first thought is "is what mobile?" :)It'll make a little more sense when nested in an environment artifact, but do we have other ideas?
(I also like reusing
host
for the UA string artifacts, but (super nitpicky) dislike thehost
prefix vs suffix :)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.
IsMobileFormFactor
?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.
apparently, this is
false
if it was real mobile hardware but desktop was emulated.which isn't what I expected given the name.
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.
how about slightly different booleans?
isMobileHardware
isMobileEmulated
They will combine differently, but I think they communicate all the same things?
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.
That kind of just punts the question back to the audits again, though. Really we just want to be able to easily answer "were my artifacts gathered in a mobile environment, whether real or emulated?".
The value should be true if run on desktop with mobile emulation, run on mobile with mobile emulation, or run on mobile with no emulation, otherwise false.
Maybe we should just drop
IsMobileHost
for now (I don't think anything needs it at this point?) and just pick a name we all like forisMobile
/IsMobileFormFactor
/isMobileEmulated
?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 like
isMobileHardware
to replaceisMobileHost
👍when discussing @paulirish 's comment we just used the phrase
isMobileConditions
which I kinda like overisMobile
/isMobileFormFactor
. I'd want to avoidEmulated
since that's not really what we are getting atThere 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.
isMobileHardware
wasMobileConditions
???
the second is past tense because it's sometimes true and sometimes not.
crazy but semantically reasonable?
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.
Renamed to
FormFactorIsMobile
and removedIsMobileHost
from the base artifacts for now.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.
at first read, I'd probably have to look up whether
FormFactorIsMobile
meant either tested on actual mobile hardware or the definition we're going for.What about something around
TestedAsMobileDevice
?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 starting to circle back around to @mattzeunert 's suggestion that this represents whether the device presented itself as mobile to the site, i.e network user agent was mobile :)
at this point though, I think we've all identified it's hard to name and we should just document well in the comment above it what it really represents
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.
user agent is independent of form factor, though, isn't it? That's why I was suggesting we go with whatever awkward string reasonably encapsulates
RanLighthouseWithADeviceThatEitherWasOrPretendedToBeAMobileOne
, which would include the UA string and screen characteristicsThere 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.
TestedAsMobileDevice
works for me, updated the PR.