Display a message about using old browsers

Bug #1351893 reported by Paul Everitt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KARL4
Fix Released
Low
Balazs Ree
4.2
New
Undecided
Unassigned

Bug Description

For months the IE7 usage has gone down. In July, for whatever reason, it went up 50%. We no longer even try to support less than IE9. Let's put in a warning:

- If running old version, display a message

- The message includes a link to a content page, as specified in the conf file

- If the conf file doesn't have that knob, don't show a message (quick way to turn it off)

Something like:

<div id="browser_upgrade" style="display:none">
   class="site-announcement portalMessage"
   tal:condition="browser_upgrade">
You are using a version of Internet Explorer below KARL's minimum of IE9. <a
href="${browser_upgrade}">Please upgrade your browser.</a>
  <script type="text/javascript">
  if (document.all && !document.addEventListener) {
    $('#browser_upgrade').show();
  }
  </script>
</div>

Changed in karl3:
milestone: m139 → m999
Changed in karl3:
milestone: m999 → m140
assignee: Chris Rossi (chris-archimedeanco) → Paul Everitt (paul-agendaless)
Revision history for this message
Paul Everitt (paul-agendaless) wrote :

Balazs, you up for this?

Changed in karl3:
assignee: Paul Everitt (paul-agendaless) → Balazs Ree (ree)
milestone: m140 → m141
Revision history for this message
Balazs Ree (ree) wrote :

yes, absolutely.

affects: karl3 → karl4
Changed in karl4:
milestone: m141 → none
Changed in karl4:
milestone: none → 001
Balazs Ree (ree)
Changed in karl4:
status: New → In Progress
Revision history for this message
Balazs Ree (ree) wrote :

I've implemented this a bit differently, then you describe, because of past experiences. Please let me know if you agree on these.

- Instead of putting the message into a karl status box, I put it to the top of the page in a colored bar. This way, is is not dependent on which particular layout template is used in the page, and we don't have to test it on all different pages, because it will always work, regardless of the page html.

- Instead of using a template, I do it all form javascript. This has no dependencies, so it is more robust and it avoids the case when the message itself is broken on the browsers where it's meant to show.

I also added a #bad-browser service switch that if you enter to the end of the url and reload the page, you can see the message even without the need to find an old IE browser. I thought this is handy for debugging but of course it should be tested on a real IE8 too.

You'll also have to add browser_upgrade_url configuration option to the ini file, because if this is missing, the check is skipped.

Revision history for this message
Balazs Ree (ree) wrote :

Not yet finished.

Revision history for this message
Balazs Ree (ree) wrote :

Tested on IE8, problems fixed. Testable on ree-old-browser-message-lp1351893 branch.

Changed in karl4:
status: In Progress → Fix Committed
Revision history for this message
Paul Everitt (paul-agendaless) wrote : Re: [Bug 1351893] Display a message about using old browsers

I don't think check-service.js is in the committed gulp output on that branch.

--Paul

On Oct 10, 2014, at 3:24 AM, Balazs Ree <email address hidden> wrote:

> I've implemented this a bit differently, then you describe, because of
> past experiences. Please let me know if you agree on these.
>
> - Instead of putting the message into a karl status box, I put it to the
> top of the page in a colored bar. This way, is is not dependent on which
> particular layout template is used in the page, and we don't have to
> test it on all different pages, because it will always work, regardless
> of the page html.
>
> - Instead of using a template, I do it all form javascript. This has no
> dependencies, so it is more robust and it avoids the case when the
> message itself is broken on the browsers where it's meant to show.
>
> I also added a #bad-browser service switch that if you enter to the end
> of the url and reload the page, you can see the message even without the
> need to find an old IE browser. I thought this is handy for debugging
> but of course it should be tested on a real IE8 too.
>
> You'll also have to add browser_upgrade_url configuration option to the
> ini file, because if this is missing, the check is skipped.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1351893
>
> Title:
> Display a message about using old browsers
>
> Status in OSF KARL4:
> In Progress
>
> Bug description:
> For months the IE7 usage has gone down. In July, for whatever reason,
> it went up 50%. We no longer even try to support less than IE9. Let's
> put in a warning:
>
> - If running old version, display a message
>
> - The message includes a link to a content page, as specified in the
> conf file
>
> - If the conf file doesn't have that knob, don't show a message (quick
> way to turn it off)
>
> Something like:
>
> <div id="browser_upgrade" style="display:none">
> class="site-announcement portalMessage"
> tal:condition="browser_upgrade">
> You are using a version of Internet Explorer below KARL's minimum of IE9. <a
> href="${browser_upgrade}">Please upgrade your browser.</a>
> <script type="text/javascript">
> if (document.all && !document.addEventListener) {
> $('#browser_upgrade').show();
> }
> </script>
> </div>
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/karl4/+bug/1351893/+subscriptions

Revision history for this message
Balazs Ree (ree) wrote :

Sorry for not replying so long.

The file is in karl/views/static/check-browser.js and it's in the minified resources. Run 'gulp install' to make sure that you are not using a resource generated from a previous branch.

Changed in karl4:
milestone: 001 → 002
Changed in karl4:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.