openstax / webview

Connexions web site
http://cnx.org
GNU Affero General Public License v3.0
12 stars 8 forks source link

What Would It Take to Support Italics in Module Titles? #2265

Closed openstaxalina closed 4 years ago

openstaxalina commented 5 years ago

The Florentine Codex, the subject of this module, should be italicized since we are referring to a book-like item. However, CNX currently does not support italics in module titles.

Would it be possible to support italics in module titles, as well as in the ToC? What would this break? Where/how would this need to be implemented?

openstaxalina commented 5 years ago

Need to apply the emphasis tags to some module title content to facilitate dev testing in a future sprint.

openstaxalina commented 4 years ago

Confirm that the markup is HTML markup - per Ross, change some double braces to triple braces once you find the place in the template that renders that. This would be a change in the webview repo.

We would need a similar change in Tutor. Need to also look at all the different spots where the titles display and confirm the italics show properly. This is not a ton of work for dev, but more testing to make sure we found all the instances.

Advice is to fix in CNX so that we get clean HTML and then see if further fixes are needed in Tutor.

openstaxalina commented 4 years ago

@oscryan, could you please create sample content with italics in the module titles on easyvm5.cnx.org and put the link here? Please apply the template APUSH with recipe.

oscryan commented 4 years ago

https://easyvm5.cnx.org/contents/waJb6R7Y@2.1:VDwSTsFR@1/%E2%9C%92%EF%B8%8F-The-Florentine-Codex-c-1585

OpenStax CNX
brittweinstein commented 4 years ago

We need to find where the title is rendered and ensure that the text does not escape. We will wait for easyvm5 to be cleaned up so we can test the content.

openstaxalina commented 4 years ago

@oscryan the link is leading to a 404. Can you try publishing without the italics tags and see if it's still a 404? Any troubleshooting would be welcome...we may need to publish a module title with italics on another server to see if this 404 issue is specific to easyvm5.

openstaxalina commented 4 years ago

Content troubleshooting steps from devs:

1) publish without italics tags, see if that works 2) publish again with italics tags, see if that works 3) if step 2 didn't work, try sub or sup tags or other markup that seems to work in page titles and see if that works

oscryan commented 4 years ago

https://easyvm5.cnx.org/content/col29682/latest/ the second module seems to work; html doesn't render in the editor, but webview notices it

OpenStax CNX
openstaxalina commented 4 years ago

That is exciting! Since we've had some weird behavior I want to document what I see: Screen Shot 2019-09-25 at 12 23 27 PM

It appears that <i> works while <emphasis effect="italics"> doesn't. In both cases, the markup shows in Legacy (not desired, but doesn't matter because Legacy). With <emphasis effect="italics">, nothing happens in CNX webview (see previous screenshot). With <i>, the italics display in CNX webview (see previous screenshot). ItalicsMarkup

@oscryan could you test one more thing - could you test using <i> but having c. 1585 in normal text? I just want to make sure that we can have mixed (italics and non-italics) text in titles. This will be important to inform WW's decisions.

If we decide that <i> works even with mixed (italics and non) titles, could you go ahead and change The Florentine Codex module on content05 and reimport to tutor-content to see if it works there, too?

openstaxalina commented 4 years ago

Side note that I am still getting 404s when pasting the URL to either of the above modules directly into my browser. Probably need to check with devs about this. Video here: https://drive.google.com/open?id=1gfY5Mzl5jDRZPoCuNHqmtA1RhV5MmkXP

Meet Google Drive – One place for all your files
Google Drive is a free way to keep your files backed up and easy to reach from any phone, tablet, or computer. Start with 15GB of Google storage – free.
openstaxalina commented 4 years ago

Another mystery is why the exact same markup yields italics on easyvm5 but not content05: https://content05.cnx.org/contents/CmIfJ6vh@35.32:JgybCbwI@8/1-15-%E2%9C%92%EF%B8%8F-The-Florentine-Codex-c-1585

https://easyvm5.cnx.org/contents/waJb6R7Y@3.2:bChHirvQ@2/%E2%9C%92%EF%B8%8F-The-Florentine-Codex-c-1585

Park with devs tomorrow

OpenStax CNX
OpenStax CNX
openstaxalina commented 4 years ago

Results of team investigation:

The content on easyvm5 was NOT baked (we all confirmed this via Inspect). The baking is stripping off the <i>tags.

Screenshot of unbaked content on easyvm5: Screen Shot 2019-09-26 at 11 13 18 AM

Screenshot of baked content on content05: Screen Shot 2019-09-26 at 11 12 58 AM

Next steps: 1) fix bug in cnx-recipes that is stripping any markup inside of a title (sup and sub will still be supported; if other page titles have markup this may not be supported)

(Secret next steps: long live properly transformed cnxml)

openstaxalina commented 4 years ago

Issue moved to openstax/cnx-recipes #1429 via ZenHub