-
Notifications
You must be signed in to change notification settings - Fork 104
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
Features that only make sense in one form factor should still be considered Baseline #1038
Comments
@ddbeck mentioned that he thinks this could be handled with editorial override. Trying to imagine what that would look like, there, I don't think there's actually some edit to screen-orientation-lock.yml that would have the intended effect. I've sent #1058 to show the information that needs to be conveyed, where N/A would mean "not supported and that's OK". But do we want to do this per-browser, or divide the browsers into desktop and mobile and have something like |
@LeoMcA until we can figure this out, would you mind suppressing the baseline banner for screen orientation lock? |
When I mentioned that I thought this could be handled with an editorial override, I did mention that it would be blocked on #915. If we're going to do an override along the lines of "this doesn't make sense on desktop" then I think we also need a way to say something directly to explain to developers why they'd see both a Baseline status and partial implementation or unimplemented iconography together. |
Chiming in quickly on this. I do like the N/A approach demonstrated in https://github.com/web-platform-dx/web-features/pull/1058/files, but this should probably come with a note too. I'm not as keen on separating desktop vs. mobile. I don't think this has the same chances of enduring the passage of time. Something like: name: Screen orientation lock
status:
baseline: false
support:
chrome:
value: "N/A"
note: The feature doesn't make sense on desktop operating systems feels both simpler and more flexible. |
Discussed in today's WebDX CG call (notes). Technically, we can already achieve this with editorial overrides. But having data to support this as proposed in the previous comment seems desirable. |
HTML media capture is another feature to consider. For some reason it's only supported on mobile browsers, and it's always been like that. It seems like it could be supported on desktop platforms, so I'm not sure what to make of it. |
I looked for features that:
I'll paste the list below, it may be incomplete, but probably covers most cases already. I'll also add a bit of analysis for each of them. The list:
|
Hello, I found this because I find that MDN's baseline banner will blanket-consider Touch Events as totally unavailable on Safari which is incorrect and highly misleading to developers depending on baseline banners. I come here from my original issue: mdn/content#37736 Instead of baseline being simple "yes or no" (
So the spec should change to support four states instead of two, and once the spec changes, then the MDN banner needs to change its rendering to show all four states. The MDN banner's icon for each browser should also be in four states instead of two:
which would correctly show when a feature is available on both desktop and mobile in a certain web browser even if it's only "baseline available" on mobile across all browsers. |
For each case, it may be useful to consider what breaks if an app uses the features while it's not supported. For example:
I don't think anything really breaks when wheel events are not supported:
The only thing that would break is if the code called
Here, I suppose calling In the former case, it seems fine to say the feature is Baseline high, period. In the latter case, it seems important to call out that feature detection is recommended. |
Thank you for compiling that list @captainbrosset It's so much better having actual features to discuss. One additional thought here. The list is quite short, less than 20 items out of 1000 items, and in some of those cases the missing form factor is a non-issue. I'm thinking that given the scale of the issue we probably want to adjust the definition and the visualization appropriately and not make things significantly more complex for the other 98% of features. |
Given the low number, we could deal with this by overriding the baseline status manually, only for those few features. It would be nice, however, to have a real |
There are some cases where marking these features as “baseline” can be misleading even if they “don’t make sense” on the platforms where they’re unsupported. For example, code like if (myEvent instanceof TouchEvent) {
// ...
} will throw a runtime error (“Can't find variable: TouchEvent”) on desktop Safari Even though the “touch events” feature is “not applicable” to desktop Safari, the absence of the API can still cause errors but I might be led to believe that this code is safe if I see that TouchEvent were given a “widely available” baseline |
It's @controversial ! (Sorry couldn't resist 😜) That's a fair point. Indeed, that could be misleading too. And as I like to say:
|
Screen orientation lock is currently only available in Chrome on Android, and is therefore marked as not available in Chrome in the MDN banner, but even if it was supported in all mobile browsers, it would still not be considered Baseline according to our definition.
I suggest that we extend the definition to consider the form factor, and in cases where the feature is expected to be used almost exclusively used in one form factor, we consider the feature Baseline. That is in cases where developers don't have an expectation for a feature to work in another form factor, we don't state that the feature is not ready yet, as that would go against one of the goals of Baseline: Baseline status aims to identify features of developers’ contemporary, workaday web.
The text was updated successfully, but these errors were encountered: