Docs-Suggestion: Show version banner on all pages if not on final #4608

Closed
wants to merge 1 commit into
from

Projects

None yet

5 participants

@MauriceG
Contributor

@agcolom, @toddparker, @ugomobi
This is just a suggestion to show the version banner on all pages in the docs, if the viewed version is a unstable one.
I suppose, the $.mobile.version "at home" is something like 1.2.0-pre for an pre-release. Therefore, if the version suffix is something else then "Final", the banner will be shown everywhere (except the page templates).
Demo at: http://test.jqmobile.de/ ($.mobile.version set to "1.2.0-pre" there).
Addresses partly #3330

@MauriceG
Contributor

edit: Added switchable example for constantly show a version banner inside the headers right corner.
http://test.jqmobile.de/

@jaspermdegroot
Member

I am in favor of the most subtle solution possible. Our docs should also be a good practise of mobile web design, so absolute positioned banners that can obscure the title or other content on small screens should be avoided if you ask me.

@MauriceG
Contributor
MauriceG commented Jul 4, 2012

This is just a suggestion and the banner could also styled absolute.
I prefer the second suggestion.

Note:
This PR is just to start a discussion about #3330

@MauriceG
Contributor
MauriceG commented Jul 8, 2012

Hi @uGoMobi
What do you think about to mention the docs version together with the copyright and set this in jqm-docs.js?
This will also prevent changing all pages again next year when the copyright may change to 2013.
Example: jqm-docs.js // display the version of jQM - pageinit:
$( this ) .find ( "div.footer-docs p" ) .html ( "jQuery Mobile " + version + " © 2012 jQuery Foundation and other contributors" );
Maurice

@jaspermdegroot
Member

@MauriceG

I have been thinking about the footer as well. That certainly qualifies as "subtle". Downside is that you might find out you have been reading the wrong information only after you reached the bottom of the page.

Something I have been thinking about is adding (small) breadcrumbs at the top of the content div and add the version to the first crumb. For example:

Docs 1.1.1. > Pages > Dialogs

That might also improve the search results on Google. That's another issue mentioned at #3330. Probably best would be if the title contains the version, but I think that would mean we have to hardcode it :(

Let's ask what @toddparker and @agcolom think about all suggested solutions.

@toddparker
Contributor

I agree that the header badge is pretty strong and it could interfere with some pages. I think we should add this to the footer as a start. The breadcrumb idea is interesting, but I don't know if that it too strong too.

The Google situation is a problem because it links to master before stable releases. It would be good to find a way to improve that somehow but let's at least start by echoing the version in the footer in a fairly subtle way now and think about bigger changes.

@MauriceG MauriceG closed this Jul 13, 2012
@staabm
Contributor
staabm commented Jul 13, 2012

Maybe appending the version to the page title would do the trick and dont mess up any content of the demo itself?

@jaspermdegroot
Member

@toddparker @agcolom @MauriceG

Ok, let's do the footer.

Same style as copyright and align right? Center copyright and version info if less than 650px?

I am not sure about injecting it with js, because it seems that doesn't work if you open the docs local. Or am I wrong?
If we are going to hardcode it, we have to add it to the "version update checklist".

Maurice, is your local repo in sync already so you can make the change en masse in one commit/PR?
If you want me to do it, let me know.

Jasper

@agcolom
Member
agcolom commented Jul 13, 2012

@uGoMobi Sounds good. I'd be in favour of doing just one to try and test to see if it fits and looks ok. (a jsbin would be probably good enough for that, before the change en masse!) BTW, am I right in thinking all these changes will be for past versions only? (not master)

I'm just thinking, can we actually make changes to built & deployed docs? (or does it mean @johnbender will need to rebuild/redeploy?)

What I was thinking initially with this one was some sort of warning, maybe as a popup or a dialog, warning the user that the version they were viewing was not the latest one, with 2 option in the dialog: ok, take me to the latest version or no, I understand the risk (kind of thing). That dialog would come up only on a 1st load of the jquerymobile.com/demos/an_old_version/ However, I have no idea how to do this....

@MauriceG
Contributor

@uGoMobi

Hi Jasper! I'd prefer that you do this changes please.

Thanks in advance!
Maurice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment