Ticket #7867 (closed requirement: fixed)

Opened 9 years ago

Last modified 8 years ago

Warn browser users when Math won't display correctly

Reported by: kef Owned by: ew2
Priority: critical Milestone: Hot Fixes
Component: Content Viewing Version: Live
Severity: severe Keywords:
Cc: schatz System Area: Content Display
Primary Skill: Writing
Site URL:
Suppress email to reporter: no

Description (last modified by kef) (diff)

Chrome and Safari do not support MathML so visitors using Chrome will not be able to properly view modules that have MathML in them. We need to warn them using a pop up like we do for IE without MathPlayer? installed.

It will be ideal if this warning only happens when modules have Mathml in them.

Also, for Firefox 2 and 3, we need some sort of warning if the fonts aren't correct. If we can't detect that, we may want to have a suppressable popup or warning that shows something that only works with the right fonts (a short equation with a radical sign that should span numerator and denominator for ff3) and what it should look like as a png for comparison.

Change History

Changed 9 years ago by jccooper

The existing warning (at least the MathPlayer? one) comes from source:mathml2/trunk/style/pmathmlcss.xsl which is an adapted MathML Presentation stylesheet; the warnings are probably sdapted by us. Check where it comes from; maybe the upstream version has additions for FF and Chrome.

I'm not really sure how it works, by the way. I think probably pmathmlcss.js hides the warning if math exists, but I haven't verified this.

Changed 9 years ago by jccooper

See also #7869

Changed 9 years ago by ew2

  • milestone changed from Hot Fixes to AuthIntRedesign- Landing Page And Navigation

Changed 9 years ago by kef

  • summary changed from Warn chrome and safari browser users that Math won't display correctly to Warn browser users when Math won't display correctly
  • description modified (diff)
  • severity changed from minor to severe

Changed 9 years ago by ew2

  • keywords Sprint 1, Story 13 added
  • type changed from defect to requirement

Changed 9 years ago by ew2

  • status changed from new to assigned

Changed 8 years ago by ew2

  • status changed from assigned to working

Changed 8 years ago by ew2

(In [25568]) In cnxml_transforms.py, added logic to set correct mime-type and to add pmathmlcss.xsl to the stylesheet list for Chrome and Safari. This allows the warning message to be displayed. Modified the warning message to have information about Chrome and Safari. Refs #7867

Changed 8 years ago by ew2

  • version set to Live

Changed 8 years ago by ew2

These are the rules I have implemented:

  • Firefox
    • With javascript
      • User will see message with "Hide this message" link
      • "Hide this message" link will dismiss message and set cookie to prevent message from being displayed on future module viewing.
    • Without javascript
      • User will see message without the "Hide this message" link
  • IE
    • Without MathPlayer Plugin
      • With javaScript
        • User will see message with "Hide this message" link
        • "Hide this message" link will dismiss message on that module, but not set cookie to hide the message
      • Without javascript
        • User will see message without the "Hide this message" link
    • With MathPlayer Plugin
      • User will not see the message
  • Chrome and Safari
    • User will see message without the "Hide this message" link

Changed 8 years ago by ew2

(In [25625]) Commented out browser warning since it has been moved to content_render.xsl. Refs#7867

Changed 8 years ago by ew2

  • status changed from working to testing

(In [25626]) Modified to display MathML warning to users based on browser. Image is for display of MathML vs image of correct MathML. Fixes #7867

Changed 8 years ago by maxwell

  • status changed from testing to assigned

I have a few problems with this implementation, some of which might justify my failing of this ticket:

  • This warning message is not in the same place as similar warning messages either in the past (the old MathML message), or still used in the present (the preview and not-latest messages). I don't like it above the title, attribution, and summary info, and I can imagine that it might interfere up above with future branding plans (but can't be sure on that one).
  • I would like to pull out the sentences reading "A simple MathML test is below this message. If the two MathML examples below are alike, your browser is MathML compatable." and put them in a separate paragraph immediately before the two examples. Currently, it's such a long block of text, and by quick scan, it's not clear what those two examples are there for. I think extracting those two sentences would help that.
  • 'compatable' should be 'compatible'
  • It seems like there is a lot of duplicated code for this message just for the "Hide this message" link, unless there are small differences that I didn't notice. I would think that there would be a better way to do this ... something with changing the JS not to hide either the entire mathml_msg or mathml_no_js_msg divs, but instead always display the mathml_msg div and put an ID on that "Hide this message" link that the JS would recognize and hide or show as appropriate.
  • None of the text has been set to be translated with the gentext template. I realize this is a pain, especially with text broken up by links like that, but it should be done at some point. The above three points should be resolved before any translation is worked on.

Changed 8 years ago by ew2

(In [25803]) Moved message in content_render.xsl to be below module title. Modified message and toggler.js to handle 1 version of the message. Refs #7867

Changed 8 years ago by ew2

  • owner changed from ew2 to maxwell

Back to Max for styling.

Changed 8 years ago by maxwell

(In [25814]) fix spelling error. refs #7867.

Changed 8 years ago by maxwell

  • owner changed from maxwell to ew2

Styling work was completed in #8067.

The text still needs to be translated with the translations going in cnxmll10n.xsl. See the other warning messages to see how this is done.

Also, there is now an underlined space after each link, at least in Chrome Win and FF3 Mac. Just doing the translation might take care of this automatically, or it might require pushing up the </a>s right up against the end of each line of text.

Also, at least on FF3 Mac, there is no underline on the "Hide this message" link. This is probably caused by the @href having a javascript call instead of a real location. It could probably be solved by instead making the link look like <a href="#" onclick="hideMathMLMsg(); return false;">.

Changed 8 years ago by ew2

  • status changed from assigned to testing

(In [25847]) Added translation for MathML warning. Fixes #7867

Changed 8 years ago by jenn

Since this is now on its own branch, and on my list to test independently, shouldn't it be in Hot Fixes rather than MEW?

Changed 8 years ago by ew2

  • keywords Sprint 1, Story 13 removed
  • milestone changed from AuthIntRedesign- Landing Page And Navigation to Hot Fixes

Moved to Hot Fixes for early release

Changed 8 years ago by jenn

  • priority changed from high to critical
  • skills changed from Unspecified to Writing
  • status changed from testing to assigned
  • area changed from Unknown to Content Display

Moved out of testing since it's still in UI cleanup mode. Also into "critical" priority, as befits a Hot Fixes ticket that merits its own testing-and-rollout cycle.

Changed 8 years ago by kef

  • cc schatz added

Manpreet's analysis of the desired behavior in the various browsers:

MathML message

Choices for desired behavior:

  1. Show (standard OR customized per browser) full message once and have the ability to dismiss it completely.
  2. Show (standard OR customized per browser) full message at all times – no dismissing
  3. Show (standard OR customized per browser) full message once and smaller nag message at all times
  4. Show smaller nag message at all times with a link to full details.

My recommendation for desired beahvior per browser:

  • IE:
    • Detect presence of MatML in browser. If not present – do nothing.
    • If MathMLpresent present – detect MathPlayer?. If present – do nothing.
    • If MathML present and Mathplayer absent Show customized full message with hide option
      • If “hide message” clicked – change it to small nag message to be displayed at all times till Mathplayer is installed. Small nag message should have a link to show full message.
  • FF:
    • Detect presence of MathML. If not present – do nothing.
    • If MathMLpresent present - Show customized full message with Math examples with the following choices
      • Yes Math is correct – hide the message forever
      • No Math is not correct but hide the message anyway – show a smaller nag message with a link to show the full message. This smaller nag message should be displayed till the “Yes Math is correct” is selected.
  • Chrome and Safari:
    • Detect presence of MathML. If not present – do nothing.
    • If MathML present - Show customized full message with hide option
      • If “hide message” clicked – change it to small nag message to be displayed at all times Small nag message should have a link to show full message.

Changed 8 years ago by kef

Does someone still need to look at the actual math example and make sure that it isn't too complex?

In the meeting we noted that the parens just under the radical should definitely be removed because they make the Firefox font problem undetectable because the math is still right even though the radical doesn't stretch over the denominator.

Changed 8 years ago by maxwell

Somebody also mentioned not understanding why the blue color was being used. I don't know if that's necessary to show the proper display of MathML, but if not, I wouldn't mind getting rid of it, since IIRC it added annoying complexity to the CSS styling of that box.

Changed 8 years ago by ew2

I'll work with Kyle and Philip to get a good example.

Changed 8 years ago by jenn

The proper display of MathML isn't currently blue, so it certainly doesn't seem necessary to me.

Changed 8 years ago by ew2

(In [26547]) Modified to have separate message for each browser along with a smaller nag message. Still need to detect mathml in content before display. Refs #7867

Changed 8 years ago by ew2

(In [26579]) MathML sample now works correctly. Checking in matching image. Refs #7867

Changed 8 years ago by ew2

(In [26582]) Modified wording and updated JavaScript?. Still need to complete no javascript testing. Refs #7867

Changed 8 years ago by ew2

(In [26683]) Refactored javascript to isolate each browser. Firefox works. IE, Chrome/Safari still need work. Reworded and rearranged message text. Refs #7867

Changed 8 years ago by ew2

(In [26693]) Modified for Internet Explorer. Also refactored Firefox a bit. Chrome/Safari is still left to finish. Refs #7867

Changed 8 years ago by ew2

(In [26694]) Modifications for Safari and Chrome. Flashing message when MathML is correct has yet to be fixed. Refs #7867

Changed 8 years ago by ew2

(In [26723]) Modififed to prevent rendering of mathml message if it is not needed. Removes "flashing" or "flickering" of default message. Refs #7867

Changed 8 years ago by ew2

(In [26831]) Start on version 3 of mathml message. Modified text and put new text in content_render. Still have JavaScript? to update. Refs #7867

Changed 8 years ago by ew2

(In [26845]) Working correctly in IE and Opera. Firefox is close. Still need to add Safari and Chrome. Refs #7867

Changed 8 years ago by ew2

(In [26846]) Safari and Chrome are working correctly. Firefox to go. Refs #7867

Changed 8 years ago by ew2

  • status changed from assigned to testing

(In [26858]) Firefox is now working correctly. Fixes #7867

Changed 8 years ago by ew2

(In [26908]) Added cookie value to keep message open in Firefox. Modified IE message tonavigator.userAgent.indexOf("MSIE") != -1 ? true : false; display default message for IE on Mac. Refs #7867

Changed 8 years ago by ew2

(In [26927]) Added logic to prevent flashing of message on reload. Refs #7867

Changed 8 years ago by ew2

(In [26929]) Modified element in module_export_template to have value of cnx_mathml_msg cookie. Using this value in content_render to set display style on different parts of message. Modified wording on firt sentence of default message. Refs #7867

Changed 8 years ago by ew2

(In [26937]) Modified to get correct message in IE on the Mac. Refs #7867

Changed 8 years ago by ew2

  • status changed from testing to closed
  • resolution set to fixed

Released on 3-19-2009

Note: See TracTickets for help on using tickets.