Skip to content

Change way browser and version found #844

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

Merged
merged 7 commits into from
Feb 13, 2015

Conversation

squirrelo
Copy link
Contributor

There was a problem with firefox and opera where the version found was not the actual version of the browser. This new code fixes that.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 78.48% when pulling 01adb2d on squirrelo:fix-firefox-validation into 8a791a3 on biocore:master.

objfullVersion = ''+parseFloat(navigator.appVersion);
objBrMajorVersion = parseInt(navigator.appVersion,10);
}
// from http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use the permanent link instead? http://stackoverflow.com/q/5916900/379593

@ElDeveloper
Copy link
Contributor

This looks good except, there's not a good way to test this code, it has the "same" validity as the other chunk of code taken from a blog post found on the inter-tubes and that the code is not really maintainable. IMHO, should be ready to merge as soon as the comments I made are addressed but then again ... how can we make sure this new snippet is not introducing any problems that the previous block was accounting for? I would probably advocate for finding the bug in the previous block of code and correct it there.

@antgonza
Copy link
Member

The issue is that there is no perfect way and more when browsers change the way they report their version, which made the previous one obsolete. I think this is fine as long as we test in all valid browsers.

@ElDeveloper
Copy link
Contributor

Ok, sounds good. We should check Safari, Chrome, Opera, Internet
Explorer, Firefox and lynx? With the corresponding mobile versions where
possible?

On (Feb-10-15|14:13), Antonio Gonzalez wrote:

The issue is that there is no perfect way and more when browsers change the way they report their version, which made the previous one obsolete. I think this is fine as long as we test in all valid browsers.


Reply to this email directly or view it on GitHub:
#844 (comment)

@antgonza
Copy link
Member

antgonza commented Feb 10, 2015 via email

@ElDeveloper
Copy link
Contributor

Well the only browser that shows the error message is lynx, however the interface is unusable in internet explorer 8.

Just for fun:

screen shot 2015-02-10 at 3 51 53 pm

@wasade
Copy link
Contributor

wasade commented Feb 11, 2015

@ElDeveloper, that is a fantastic screenshot

@GabeAl
Copy link

GabeAl commented Feb 11, 2015

Still no good. I'm being inappropriately flagged (Firefox 35.0.1)
baddetect
and cannot access the site. I also do not use Chrome and do not run a Mac. Firefox is the only truly open, cross-platform, non-corporate browser that enjoys modern standards support. For Linux (and Windows) users who can't (or won't) use Chrome, it's probably better to botch the detection and include an "unsupported browser" blurb at the top than to blanket ban.
Cheers

@antgonza
Copy link
Member

antgonza commented Feb 11, 2015 via email

@GabeAl
Copy link

GabeAl commented Feb 11, 2015

Apologies -- actually, this is for the main site as it currently exists, not the proposed changes, thereby merely corroborating the finding in the opening message.

@squirrelo
Copy link
Contributor Author

So apparently flake8 updated and is throwing all sorts of fun errors. I'll fix that in aseperate emergency pull request.

@ElDeveloper
Copy link
Contributor

I'm on it, see #846

@ElDeveloper
Copy link
Contributor

almost done also ...

@squirrelo
Copy link
Contributor Author

Oops, pull request already in.

@antgonza
Copy link
Member

Pull from upstream master.

@squirrelo
Copy link
Contributor Author

ready for review again.

@antgonza
Copy link
Member

👍 @ElDeveloper ?

@ElDeveloper
Copy link
Contributor

It still doesn't work in IE 8 i. e. no message about the website not working is shown. 😕

@squirrelo
Copy link
Contributor Author

good to review again

@ElDeveloper
Copy link
Contributor

It now shows the appropriate message for IE8, however it shows the
message in IE10 and Opera (it wasn't before), from the displayed message
it seems that at least IE10 is supported.

On (Feb-12-15|15:50), Joshua Shorenstein wrote:

good to review again


Reply to this email directly or view it on GitHub:
#844 (comment)

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.09%) to 78.5% when pulling 9eceade on squirrelo:fix-firefox-validation into 1ca033a on biocore:master.

@squirrelo
Copy link
Contributor Author

Bluh, The issue is that the older browsers flat out won't run the version check javascript, so I defaulted it to just throw the error by default. Not sure whats going on with IE 10, but we don't support Opera so it's getting the default error page.

@ElDeveloper
Copy link
Contributor

So then the only open issue is IE 10. And we may also need to rephrase
the error message to: "This site only works on these browsers".

On (Feb-12-15|16:10), Joshua Shorenstein wrote:

Bluh, The issue is that the older browsers flat out won't run the version check javascript, so I defaulted it to just throw the error by default. Not sure whats going on with IE 10, but we don't support Opera so it's getting the default error page.


Reply to this email directly or view it on GitHub:
#844 (comment)

@squirrelo
Copy link
Contributor Author

Yup. IE isn't firing off the document.ready so I'll dig into that.

@squirrelo
Copy link
Contributor Author

Went old school and used body onload='' to fire off the check, since that's supported by pretty much everything. This also means the site is visible by default now for non-checked browsers, so Opera will show the site again.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.09%) to 78.5% when pulling 02e2ead on squirrelo:fix-firefox-validation into 1ca033a on biocore:master.

@ElDeveloper
Copy link
Contributor

If we don't support Opera should that be changed then?

On (Feb-12-15|16:32), Joshua Shorenstein wrote:

Went old school and used body onload='' to fire off the check, since that's supported by pretty much everything. This also means the site is visible by default now for non-checked browsers, so Opera will show the site again.


Reply to this email directly or view it on GitHub:
#844 (comment)

@squirrelo
Copy link
Contributor Author

I think we can have in the documentation that we support X browsers above Y version, and while the site is accessible with other browsers , we make no claims to usability.

@antgonza
Copy link
Member

antgonza commented Feb 13, 2015 via email

@antgonza
Copy link
Member

@ElDeveloper could you check again that it works on the expected browsers? Seems like you have everything in your system to do this ... thanks!

@squirrelo
Copy link
Contributor Author

Added to the FAQ section.

@antgonza
Copy link
Member

antgonza commented Feb 13, 2015 via email

});
</script>
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra whitespace.

@ElDeveloper
Copy link
Contributor

Just tested this in all the browsers I have access to and it works just
fine! Lynx actually lets me log in (unlike IE8). Just one more minor
comment about whitespace and this should be merged right away!

On (Feb-13-15| 5:50), Antonio Gonzalez wrote:

@ElDeveloper could you check again that it works on the expected browsers? Seems like you have everything in your system to do this ... thanks!


Reply to this email directly or view it on GitHub:
#844 (comment)

@squirrelo
Copy link
Contributor Author

whitespace removed, merge ready.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.11%) to 78.48% when pulling d86181f on squirrelo:fix-firefox-validation into 1ca033a on biocore:master.

antgonza added a commit that referenced this pull request Feb 13, 2015
Change way browser and version found
@antgonza antgonza merged commit 502774a into qiita-spots:master Feb 13, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants