universalviewer icon indicating copy to clipboard operation
universalviewer copied to clipboard

English title truncated on left side in right-to-left manifests

Open jamesmisson opened this issue 7 months ago • 0 comments

I'm submitting a:

  • [x] bug report => please fork one of these codesandbox examples with a repro of your issue and include a link to it below
  • [ ] feature request => please use the user stories repo
  • [ ] support request => Please do not submit support requests here, use stackoverflow

Current behavior: UV truncates item titles (i.e. manifest labels) and adds an ellipse when they don't fit the title space above the canvas. In manifests with "viewingDirection": "right-to-left",, these titles are truncated on the left even when the titles are in English, so the beginning of the title isn't visible. UV also adds a full stop to the left of the title.

Expected behavior: Titles in right-to-left languages should be truncated on the left, titles in left-to-right languages should be truncated on the right, i.e. truncation and full stop placement should be determined by the language value given in the label.

Steps to reproduce:

  1. Follow this link to view a manifest with "viewingDirection": "right-to-left": https://www.universalviewer.dev/#?xywh=-258%2C-1209%2C7278%2C4370&iiifManifestId=https%3A%2F%2Fdata.idp.bl.uk%2Fiiif%2F3%2Fmanifest%2FE7FE1087334A4DDA88FBF1834B14ACA1
  2. Resize the browser to shrink UV until the title truncates, or view the page on the mobile view in dev tools.

Related code:

// insert any relevant code here

Other information:

jamesmisson avatar May 22 '25 15:05 jamesmisson