-
Notifications
You must be signed in to change notification settings - Fork 141
Compat banner prototype / research #474
Comments
Banner messaging on MDN reference pagesThis project was previously referred to as "Compat ribbon" or "Summary compat data". Problems we are trying to solve
Possible solution: {{Banner}} macroTo address the above problems, we're currently thinking about introducing a new macro called Banner.ejs and also remove any other current banner macros. Specification for the Banner macroThe {{Banner}} macro could work according to these rules:
If none of the above 4 rules applies to a feature, {{banner}} is a no-op and won't show any messaging. In other words, the feature can probably be used without trouble in terms of accessibility, security privacy, performance and compatibility. If two or more of the above rules apply, we shouldn't be displaying many banners below each other like we do now, but have the banner so that several warning icons appear next to each other, for example. This is something we will need to figure out when designing the banner. Removing old bannersThe following banner macros should be replaced by {{Banner}} and so we will hopefully free up some space at the top reference pages:
DesignThere is no mockup for the look and feel of the new banner yet. From conversations it seems like:
Next steps
|
I think this seems like a very sensible approach :). A couple of general points coming out of the KS analysis work I've been doing.
How will this work in pages outside the en-US locale?
I agree that (2) might not be needed, given (4).
I think we'll have to work through the details of this. It's tricky, and seeing how it will look will help. For example:
Maybe a date-based approach would work better? If this has been supported for > 1 year, issue no warning? I think we can do that with https://github.com/mdn/browser-compat-data/tree/master/browsers, no?
Again tricky. Sometimes notes are important, sometimes they're not. I think we'd have to see how it feels.
I'm a little bothered about an icon-based approach - at least I'm conflicted. I like the idea of saving space but worry they won't be understandable. Which is a way of saying that the design will be hard I suppose.
I would just delete all these without waiting for a replacement :). Also, I guess {{Banner}} takes an argument that's a path through BCD? |
This looks like a really good start Florian. I had a bunch of comments, but then Will already asked most of the questions I had ;-) I guess I've got a few extra bits to chime in, so here goes.
I was going to ask exactly this ;-) I guess the trouble is that these details have no representation in BCD, and for good reason (we want to keep BCD pure, and not pollute it with every little thing). So maybe we'd have to include a couple of extra parameters in the macro to handle this, which would be messy and suboptimal...I don't know. An extensible options object would be probably cleaner than however many parameters...but I guess this is a conversation for slightly later on. The good news is that most features are available in web workers, and the web is largely moving towards HTTPS everywhere, so most things will be running in a secure context. It's more likely that we'll have to call out things that don't run in workers/secure contexts.
This is a good point. I guess we'd need some kind of l10n object to look for the correct string based on locale.
I hear your concern here, although I'm thinking this could be good for international reach, especially if we use very common icons, like padlock for security, etc. Another option would be to just have a simple line of text links, equally spaced using flexbox, e.g.
|
And for the banners, don't forget {{AvailableInWorkers}} |
Thanks for your feedback, Will and Chris!
I think for now, my answer would be no, lets not special case them. I think banner messaging should be about critical limitations the user of the feature needs a heads up about. I'm not sure HTTPS and workers qualify as being more special here than other security or performance concerns. Maybe it could be mentioned in the security concerns section that a feature is HTTPS only? I agree with Chris that HTTPS-only and worker availability will become the norm anyway, so it will be even less worth calling these out separately.
I think we should just deprecate these kinds of badges, but I also think we should scope this project to banners and deal with badges in a new project or a separate discussion. Can't do everything at once. If this approach works for banners, we might be able to re-use it for badges, but I think it would be good to look into badges on their own.
Yes, I think we should use current KumaScript l10n mechanisms to localize this approach, even if we're not happy with how that works.
There is also mdn/browser-compat-data#1528, so I think we should go ahead and remove "experimental" when we have rule 4 working.
Yes, that might work better. I think this rule isn't straight forward and will need some playing around with until we get it right. I think it should answer the question "Can I use this?" basically.
Yes, we will need some clever design thinking here. I share your concerns, but I do hope that we will be able to come up with something.
Yes, feel free! :) Didn't mean to sound like {{banner}} is a prerequisite for all of them.
Yes! I'm going to update the above spec for banner based on the feedback here. Let me know if you have more thoughts. I think the hard parts (or the parts we're still undecided) are:
|
I really like your idea of just adding these to the "concerns" sections. They could definitely fit under performance/security. |
On secure-contexts-only and available-in-workers: I don't think we should use parameters for this. I think we should get away from that model and towards one where the "macro" (or whatever it ends up being :) finds the answer in some properly-maintained data source (e.g. BCD or mdn/data). Just like {{Compat}}. So one suggestion would be to include this data in mdn/data (and that's the suggestion made in the KS landscape doc in fact) and have {{Banner}} find it there. But, I agree we shouldn't worry about this now, and also that we should carefully consider which data to include in here. In particular we should avoid a situation where a condition is true for 90% of pages (because then it just becomes noise - the value of these banners is that you notice them when they are present, because they are usually absent). |
Before I get started with my thoughts, I'd like to start by saying this is a great beginning. I'm very excited about this!
Another option would be to have the ability to specify the links to the documentation about each of these topics within the JSON tables somewhere. This would allow more flexibility, such as the ability to have an entire article covering security concerns for an API that has many of them.
I think we should avoid ambiguity and inconsistency and always display at least the true/false compatibility information.
I agree; the banner should be some sort of an icon or widget bar. General warnings on one end (deprecated, non-standard, etc) and per-browser usability widgets on the other end. Something like: (Experimented with a couple of approaches to indicating "not supported" on the Opera icon there) Tooltips over each of the icons would provide additional details; this could be as simple as explaining what "Non-standard" means to providing more detailed information about compatibility in the browser you're pointing at. |
One other thing I'm worried about here is that to me the effectiveness of these banner items is greater if they only appear on a small number of pages - so you notice them when they are there. If they appear on, say 80% of pages, they are not so effective, they are just generally part of the page nav, and then they are fighting with other elements like the "jump to" thing for instance. It seems likely that some of these "XYZ concerns" sections will appear on a lot of pages. |
Will, that's definitely a valid point. Perhaps instead of overloading the compat bar with the warning/advisory/concerns information, we should find a separate method for handling those. One possibility that keeps coming back into my head is the idea of having a vertically-oriented bar that lays along the edge of the article area. This would extend the full height of the article, and could display warning icons in it; this bar would only be present on pages for which concerns exist. This bar could even have functionality to present added details alongside the article providing more depth, if clicked/hovered/whatever. Anyway, implementation specifics aside, it might be worth exploring how to present these in two separate places, for the reasons Will stated. |
User story
As a web developer, I want to quickly get answers whether or not I can use a Web feature, so I can develop compatible web sites and apps. As an MDN writer I want to present a single banner at the top of pages and that contains the relevant info automatically.
Acceptance criteria
A plan is made about banners at the top of MDN pages with research taken into account.
The text was updated successfully, but these errors were encountered: