Skip to content
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

Arabic section titles are not appearing as Right To Left in Universal Viewer #5391

Open
1 of 3 tasks
sdellis opened this issue Aug 24, 2022 · 8 comments
Open
1 of 3 tasks

Comments

@sdellis
Copy link
Member

sdellis commented Aug 24, 2022

Summary

Arabic section titles are not appearing as Right To Left in Universal Viewer. Adding brackets to wrapped text also creates problems because they do not start and end at the beginning of the text.

Impact

This affects end users as the text is not displayed properly, but does not typically prevent them from accomplishing their task.

Priority recommendation

  • asap
  • within the next 3 weeks
  • PO will prioritize

Sudden Priority Justification

Required if "asap" or "within the next 3 weeks" is checked. Add "Sudden Priority" and "Maintenance/Research" labels

Expected behaviour

Section titles should be displayed Right To Left

Actual behaviour

Section titles are displayed Left To Right, which is incorrect

Steps to reproduce behaviour

See highlight reel. at 12:50.

ScreenshoTS

Screen Shot 2022-08-24 at 3 28 30 PM

See highlight reel. at 12:50.

Example

Example used in this screencast: https://catalog.princeton.edu/catalog/9963585953506421
https://figgy.princeton.edu/catalog/cfec680e-1169-475d-b0f3-90b5f64e8115

Context

This issue is the result of a UX research session. The bug was reported during a focus group / observation with Graduate Students working on an Islamic Manuscripts project, held on Aug 16th, 2022.

@hackartisan
Copy link
Member

potentially relevant UV ticket UniversalViewer/universalviewer#299

@sdellis
Copy link
Member Author

sdellis commented Aug 25, 2022

Follow up with users about whether the title in UV is RTL, but should also be justified right. UV has no dir attribute on the element. Is there a way to tell the viewer that this is RTL. Setting dir='rtl' in the TOC seems to do the right thing. However, there's often mixed languages in the TOC, so we need to apply it directly to the section labels.

Things to explore, in order:

  1. Can IIIF support RTL in text labels? (look at spec, ask in slack)
  2. Can UV support RTL in section titles? The answer is yes, if we can assign a language to the label that's an RTL language. (we can test with a mock manifest)
  3. We need to be able to assign lang value in Structure Manager. We define the language in the metadata values, and you can see that it works in the metadata panel of the UV.

Note: Rails Gem currently auto-assumes RTL or LTR (not language) based on the unicode character range.

@hackartisan
Copy link
Member

hackartisan commented Aug 25, 2022

Other implementation possibilities:

  • Do the above and also try to have the structure manager provide a best guess for the language and allow users to override.
  • Propose a way for iiif to allow us to give a rtl designation to a label (then we can leverage the rails gem mentioned in note above)
  • implement something in UV that's similar to the rails gem (referenced in note above)

@hackartisan
Copy link
Member

mentioned by @eliotjordan https://github.com/jtoy/cld

@kelea99
Copy link
Contributor

kelea99 commented Sep 15, 2022

PO Priority: This is one of two top figgy priorities for the Large 3 year project for Middle East Manuscripts. After discussion with project team, it would be great to see this through to completion by the end of the 3 year project (2024)

@tpendragon
Copy link
Contributor

Implementation proposal:

In the Manifest Builder, check to see if a section label is RTL (#dir), if it is, then make it a RDF Literal with the language tag that's in the imported metadata's #language property.

@hackartisan
Copy link
Member

hackartisan commented Apr 14, 2023

#5750 updates manifests as per the implementation proposal in the previous comment. However, UV only implemented the rtl direction feature for the metadata info pane, not for the leftPanel "Contents" iiif-tree-component.

Code references:

Note that @tpendragon also tried just putting html as the manifest value, but that resulted in an error.

The proposed path forward is (not necessarily in this order):

However, this path forward is a bigger project than we had hoped and the work will need to undergo prioritization again.

@hackartisan
Copy link
Member

I created UniversalViewer/universalviewer#916

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

No branches or pull requests

4 participants