-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
New homepage website #1827
Comments
Super awesome 👍 ! Thanks for initiating the effort. The current site is highly functional and one of the reasons why I love KO so much is because the documentation is there on the tap for all the important bits of the library. However, the current site is anything but exhaustive with respect to what KO can do. |
It's seem great. |
@sumitkm – awesome :) It would certainly help if you posted a list of SO questions that you think out to be in the docs. @ramitayba Forgive my ignorance – what do you mean by "routing"? 😁 |
URL routing 😄 |
@ramitayba – the only url changes are to the hash component of the location. In particular ... The So nothing special. 😁 |
The only thing I noticed that is a bit annoying is that on this page - http://brianmhunt.github.io/knockout/computed-dependency-tracking.md#animated the side-by-side view becomes a little cluttered. I'd opt for a one above the other approach. Could we change this particular tutorial to using CSS3 transitions? I'd be happy to modify and feed back with the appropriate changes if you like? - Assuming it doesn't make it needlessly complex |
@brianmhunt - Great work to start this. When I first clicked the URL, I got an endless loading message. I had to reload the page. |
@simonmurdock Thanks – the side-by-side should now only happen when the page is extra-wide (>1280px). Let's see how cluttered that feels. Please by all means feel free to add a CSS3 transition example. Live examples are super-easy now – they follow yaml format like this (feel free to post back with an example in this format): ```example
html: |-
<a href='#' data-bind='...'></a>
javascript: |-
var myViewModel = {}
``` @mbest – thanks. That's strange about the loading message. What browser were you using? |
@brianmhunt I had the same on first load using Chrome 43.0.2357.132 |
In fact @brianmhunt I seem to get the same religiously every other load when dev tools is open (caching is disabled). Makes no sense... |
@AdamWillden If something goes wrong it should print an error message now ...so we can hopefully tell what's happening from that. Cheers |
@brianmhunt there are no messages at all when it goes wrong other than two objects:
Whereas when it works I get lots of messages as follows with the two objects later down the log:
|
|
Thanks @AdamWillden – I've updated the cache load mechanism, and also set up some debugging messages during the load. Grateful if you could let me know what you see. |
@brianmhunt, Why did you go with a SPA design? |
@mbest A few reasons, including:
The main drawback I can think of is the SEO url mapping, which I have not yet implemented. The limited space of the cache is a concern, namely the website cache can be at most around 5MB for most browsers. The two areas where space may go over are:
The way I figured we can get around this is to cache only the latest version of the documentation for offline access, and if necessary segregate the plugins by e.g. the number of stars i.e. include in the cache those plugins that have more than 1 star, but the others accessible only with network access. Right now the site is 2.4MB, but 400KB of that is fonts, and 1.2MB is unminified libraries. So there is a lot of space to play with for the moment. The space constraint struck me as worthwhile trade-off for the benefits. Did any other concerns come to mind? |
@brianmhunt works great now for me. |
Looks nice. Page fails to load in IE 11 unfortunately. One thing that's both great and unfortunate about the SPA design is that it requires a modern browser. It's awesome in that it shows KO is a library that works with modern techniques. The problem is that it may, to the uninitiated, cause the incorrect belief that KO doesn't support older browsers whereas it's one of the few libraries that considers that support important. I don't have access to any old browsers (yay for me) but it'd be good to really emphasise to someone who lands upon the page that Legacy browsers are really welcome and they can access the documentation via another site. Going forward though I suppose that means two sites to maintain unless there's a nice way of turning the SPA data into something that could be rendered server-side, not require local caching or not rely on newer layout tricks as much. There's no perfect answer here :( |
I have some thoughts on this, in response to concerns voiced here and the current implementation. This should be read as casual suggestions based on my experience in developing single page applications in Knockout, Angular, React, and jQuery. Some of this I don't have much experience with. High level requirements:
Architecture:
Implementation:
Prerendering Strategy The strategy is roughly:
You'll note that some of the content is conditional on whether it's the server or client version. This is most easily accomplished by having webpack inject true/false into Most of this can be done incrementally if ever, but yes/no to webpack and yes/no to prerendering affect everything else. I hope this helps in some way. |
@IanYates Thanks for the feedback. I have no way to test IE at the moment, so I may have to rely on others to debug it. :( But it'll get there, I'm sure! @brigand Thanks for the very detailed thoughts – very helpful. This is very much along the lines of what I was thinking, too. It seems SPA still definitely needs to coincide with multi-page fallback, for broader audiences and SEO. |
@brianmhunt - Use this: https://remote.modern.ie/. You get free access to an instance of IE on iOS, Android, Mac or Windows. It reads like it's IE on Windows 10, which it is, but it's not the Edge browser so it's more like IE 11.1 :) @brigand - nice overview :) If this flavour of docs is adopted then they'd also serve as a model of how to structure a large-ish public-facing KO SPA taking advantage of client-side caching, etc. This is a good thing in itself. |
@IanYates Thanks for the tip on remote.modern.ie. I signed up but have not received the email that'll let me get started. Will keep at it. The system now has a hard link fallback if the single-page app does not work. All the links are now to Also, to improve SEO I've added a |
I noticed that after clicking a link, going back doesn't restore the scroll position. I think it's because of the code at https://github.com/brianmhunt/knockout/blob/gh-pages/src/events.js#L43. I think if you swap the |
@brianmhunt, I think there should be a way for the user to select the static pages or SPA version, maybe with a cookie. Also the new URL method is much better and should allow for anchor links, like the current documentation supports (see #1763 also). |
Thanks @mbest – I reversed the order of There is now an option in the bottom-right of every page that, for lack of creativity, I've called "no single page", and as it suggests checking it disables the single page navigation and stores the preference in Incidentally, I have written a small project (called opine.js) that'll allow us to make inline documentation of the code and will export files & lines & urls linking to the source. That's coming later, but it's pretty nifty. |
It's working well now. |
This is so cool! Great stuff @brianmhunt! The project's website has been looking a bit dated and has had some UX problems for a while, so it's excellent to see this new one emerging. It's particularly great to have the "plugins" database integrated into the site. Further thoughts:
|
Thanks @SteveSanderson ...
In the meantime, maybe we can set it up as |
Quick design feedback: But I guess there's still much to be done on the design aspect, so ok =) Couple of other suggestions: tutorials - a collection of web articles, eg. from knockmeout, tutsplus, etc. mentioning the pubdate (relevancy of the article), and maybe also an FAQ with popular questions from SO. |
@webketje Great feedback, thanks. Agree on all points. :) |
Noted issue w/ Firefox (via TrackJS): request for |
This is just a comment with a link to a blog post I wrote with some details on how the proposed page works . |
|
From the blog post, this seems like an ambitious project, and hopefully Knockout can regain some traction with its own website as an impressive showcase. |
@IanYates Thanks– would love feedback on the blog post, in case I missed something. As for IE I have not yet looked at it– just haven't had a chance. But it's on the TODO. I did see a number of IE 10/11/Edge connections and they did not report errors on TrackJS ... but maybe that's an error too. lol @webketje Thanks for the feedback– It'll definitely be great to how the site is received and how well people feel expresses what KO is capable of. |
@brianmhunt - given you've just closed #1836, if you update the new KO website to use a template polyfill (or replace |
I was just checking to see if there was any mention of Not sure if you're already aware. In the process of looking for the above I noticed the tag '#specifying-a-template' didn't anchor me to the section as expected: http://brianmhunt.github.io/knockout/a/component-registration.html#specifying-a-template |
Thanks @AdamWillden – yes, the I was thinking we should add something in the docs about needing to polyfill |
Yeah template section would make most sense. Still may be worth components making reference to it however especially around the following note:
|
In fact I'd just link "on browsers that support them" to the new relevant section in the template. |
@brianmhunt - great success! It now works in IE 11 :) I still think that the |
@brianmhunt I like previous design more... looks better for "technicians" (even being fun) and it was less mannered... |
@brianmhunt please change the header font. That's "crime against design". |
@maxim-boligatov @Eisenspalter Thanks for the feedback. The visual design is really just a placeholder right now, have no fear. 😉 |
@brianmhunt I trust you. I love the design of your own homepage. In my experience, one of the biggest hurdle to use knockout are still custom bindinghandlers. It would be great to have a hub where you can upload and grade bindinghandlers. All examples should be in Typescript too. |
@brianmhunt, I noticed that if you click the same link twice (for example, click "Documentation" and then click it again), you'll get two history entries; so going back the first time stays on the same page. This is different from what happens normally: clicking a link that doesn't change the URL doesn't add a history entry. |
@brianmhunt Is the code available somewhere for pull requests? I couldn't seem to find it but I'm being blind no doubt. This time I'll just let you know but next time I'd do a pull request Live example is broken here: http://brianmhunt.github.io/knockout/a/component-overview.html Just need to remove this the following(?) |
Thanks @AdamWillden – The code is under my repo at |
For folks interested in the style, you may enjoy the latest, and in any case feedback is most welcome. |
Hi everyone,
I am just writing to let everyone know that I have started a new alpha/beta web-site with the hopes that it will replace the current one at knockoutjs.com.
You can check it out at https://brianmhunt.github.io/knockout
It will hopefully include at least the following features:
Here's what needs to be done (and I could definitely use some help):
svg
, orcanvas
) etc.In the future, to make this work, here's what has to change in the main site:
Cheers all.
The text was updated successfully, but these errors were encountered: