-
Notifications
You must be signed in to change notification settings - Fork 85
A healthy choose your browser page #39
Comments
I'm working on a solution for this at the moment. Rough work done to date: (needs a lot more love, but it'll get there) :) Users are able to select features via an autocomplete input based on pulled data from caniuse.com. Support tables will however be designed better (might provide different views of the data) but are being correctly output per feature at the moment. A sharable URL is generated so that you can easily let people know what features are required for a demo and I might have links to go download particular browsers once the rest has been wrapped up. Any more ideas to contribute, feel free to let me know. |
OMG that looks exactly like what I wanted. Thank YOU @addyosmani! |
No worries! :) I'll ping back once I have a demo up somewhere you can try out. |
Cool addyosmani! When you shared the code, please say something, I'm also interested in this issue. |
This is (finally) almost ready. Will post to a repo once the code cleanup has been done. |
Great! Can't wait to see it. ;) 2011/11/3 Addy Osmani <
|
addy did this go online? |
@paul Not yet! I'll probably post it up when I'm back from travels at the Supported-browsers is pretty rad, but doesn't let you select what browser On Mon, Nov 7, 2011 at 6:46 PM, Paul Irish <
Addy Osmani Developer at Aol | jQuery Core [Bug Triage/Docs/Learning site] teams member |
5! I would like to show you when it will be nearly finished... |
What are your thoughts on auto-generating the list by crawling the website, or something similarly automated? I could definitely help with that if it's a feature people would use. |
yoshokatana i'm curious about that but in the end you'd need to parse the entire site (html/css/js) .. if you're up to that task then sureee :) |
Hypothetically this could work with public-facing webapps/sites. I'm trying to figure out the best way to do it, though. Looks like the best way would be to render it server-side with phantom.js. I'll investigate. |
@yoshokatana, IMHO crawling and detecting features in use isn't the way to go. |
Just a reminder: I have most of the work for this lazyweb done. Just waiting for a free weekend to cleanup the code and push somewhere. Will update when there's news! |
plz do, addy. IMHO this is one of the things that helps advance aggressively cool edge feature browser demos while still honoring the open web's commitment to ubiquity. also. you can post ugly code, too. :) |
Addy, yes please post the ugly code so others can clean it up and have it up ASAP! |
@paulirish @nimbupani will try my utmost to get this out this weekend :) |
Divya started a thread with Jon and I but I wanted to take things back here where I have less of a chance of blocking progress. Also she spoke with @simurai on the design, so cc'ing him. Divya listed out the following things as target areas
Also we've been talking about how this makes a lot of sense to mostly a Modernizr plugin. I agree that's very wise. in the next comment i'm gonna take a stab at what the API is like.. |
@paulirish Do you have a link to the thread with Jon? So far this actually looks really solid. Great work @jonathantneal :) One comment I would make is that where possible I would avoid forcing people to learn how to use the API (e.g |
@addyosmani I completely agree. I think it would just be a matter of creating an interface that would use the same data.json object to generate the urls in a friendly way for people. |
Also, we've been talking about this as a webservice. Not as something end users would ever visit. Use case: My HTML5 App
Use case: My Web Audio API demo
|
we're working out some APIs ideas here |
Using the API with Modernizr plugin (and json payload)Modernizr.browserPrompt({
features : 'localstorage canvas classlist csscalc' ,
},
// this callback only executes if above features have a falsy value
function(data){
var html = _.template(tmpl,data).render()
$(thing).html(html);
}) // return value is the result of testing the above features Using the API w/o Modernizr plugin (and html payload)if (!navigator.getUserMedia){
var script = document.createElement('script');
script.src = '//example.com/api/html/webrtc?callback=showDialog';
document.body.appendChild(script);
}
function showDialog(data){
$('<div>').html(data.html).dialog(); // thx jquery UI
} API
|
The next challenge is to figure out what's in the data payload.
(and if anyone has other ideas about the earlier stuff, chime) |
|
👍 |
This is looking very nice! This could probably generate a lot of side projects, so why not include something more in the package? =) The project repo could have an static generator, that outputs all the images and javascript needed as a drop-in. The browser and feature list could be compiled to local json files and have some kind of versioning identifier. The API response could return just that everything is still valid instead of the hole presentation layer for the page. There are some nice advantages about this design:
Anyone likes the idea? |
Good news, everyone! The API has been updated to deliver an extremely relevant payload. Two major improvements are:
|
@jonathantneal I've been playing around with creating some demos based on https://github.com/jonathantneal/caniuse and I just wanted to check: is combining features in http://sandbox.thewikies.com/caniuse/x+y.html stable at the moment? I ask because when I pass through certain tests (e.g touch - or even a fake test like 'touchs'), it still outputs the congratulations message: http://sandbox.thewikies.com/caniuse/geolocation+touchs.html?callback=showUpgrade |
@addyosmani try looking at the available features @ http://sandbox.thewikies.com/caniuse/features.js |
@jonathantneal awesome. thanks! |
@jonathantneal, i think we should probably output something like "we are unable to tell which browsers support the requested features" or something so devs know immediately something is amiss, or maybe it should be a debug option >_> #scopecreep. |
@simurai you could possibly do that with the javascript object that will be returned. Is that sufficient? |
@paulirish has opened this up for further discussion @ https://github.com/h5bp/caniuse/issues/4 |
https://github.com/h5bp/caniuse has this project now.check out the issue tracker and please get involved!we're alpha testing this out on http://mothereffinganimatedgif.com/ and its great! |
Looks like the above repo link is broken. It's over at https://github.com/h5bp/html5please-api |
A lot of demos have nasty "download IE9" or "download Chrome" or "download other browser" placeholder text when viewed on browsers that do not support a selection of features.
The idea is to create a site that would render the correct list of browsers that support the features required for the demo. e.g. http://chooseyourbrowser.com/history+transitions+webGL would give you a polite message with a list of all browsers that support these features (not just one).
get.webgl.org does this very well (and a lot of webGL demos use it).
Easier for demo creators to link to rather than face flack for openweb unfriendly unsupported pages.
The text was updated successfully, but these errors were encountered: