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

TextField issue with diacritics not fully visible #3983

Closed
enortonAtAdobe opened this issue Jan 31, 2023 · 4 comments · Fixed by #4579
Closed

TextField issue with diacritics not fully visible #3983

enortonAtAdobe opened this issue Jan 31, 2023 · 4 comments · Fixed by #4579
Assignees

Comments

@enortonAtAdobe
Copy link

🐛 Bug Report

full diacritics not visible in TextField for some characters depending on the browser

🤔 Expected Behavior

full diacritics should be visible

😯 Current Behavior

Screen Shot 2023-01-30 at 5 50 34 PM

💁 Possible Solution

🔦 Context

💻 Code Sample

https://32w4px.csb.app/

🌍 Your Environment

this happens in some browsers but not others - mainly Firefox seems to be the only one to handle correctly

🧢 Your Company/Team

AEP

🕷 Tracking Issue (optional)

@snowystinger
Copy link
Member

Looks like this might be font related.

I tried a TextField inside a Provider with the arabic locale, it's closer but the third line under that letter still seems cut off. https://codesandbox.io/s/broken-dust-8fscze?file=/src/App.js

It looks like this happens in native as well https://jsfiddle.net/pbw3L0kv/2/

Will bring up with our design, I tried changing the line-height and padding with partial luck. Changing the line-height rendered all the diacritic in the vertical space, but was still cut off in the horizontal.

Screenshot 2023-01-31 at 10 29 04 AM

@snowystinger
Copy link
Member

snowystinger commented Mar 14, 2023

After a discussion with the team. We've realized that codesandbox is not part of our typekit provisioning, nor possibly is chromatic. As a result, the images we've been dealing with and example apps are not actually correct. We need to use an environment where we actually resolve to the correct font and see if this is still a problem there.

We have another issue, neither our docs site nor localhost appears to be provisioned for the Arabic Adobe font face, so we'll need to add that, and any others, such as Hebrew
--spectrum-font-family-ar: 'adobe-arabic', 'myriad-arabic', var(--spectrum-font-fallbacks-sans); right now arabic is falling back to SF or system font

We also need to verify this against other accent marks that hang below the text baseline, such as the French Ç

@dannify dannify moved this from ✏️ To Groom to 📋 Waiting for Sprint in RSP Component Milestones Mar 17, 2023
@ktabors
Copy link
Member

ktabors commented Mar 18, 2023

Adobe Arabic is sans-serif and we want a serif font for consistency, so we're using Myriad Arabic. The same for Hebrew. Spectrum CSS has made this change as well.

@devongovett devongovett moved this from 📋 Waiting for Sprint to 🛑 Blocked / Needs More Info in RSP Component Milestones Mar 28, 2023
@snowystinger
Copy link
Member

Here is a textfield in an Arabic locale provider with Arabic text, using Myriad Arabic. These screen shots were all generated from https://reactspectrum.blob.core.windows.net/reactspectrum/4a41f3b71c62796056043e36972fa7118f2a0e3e/storybook/index.html?path=/story/textfield--default&providerSwitcher-express=false
Steps:

  1. Change locale in top bar
  2. inspect dom element for input
  3. replace label with text from this ticket
  4. paste text from this ticket into field

FireFox - everything handled correctly
Screenshot 2023-04-27 at 5 54 40 PM
Screenshot 2023-04-27 at 6 01 18 PM

Safari - field looks fine, but label arabic diacritic is cut off
Screenshot 2023-04-27 at 6 04 50 PM
Screenshot 2023-04-27 at 6 07 09 PM

Chrome - Arabic diacritic cut off in field
Screenshot 2023-04-27 at 6 10 05 PM
Screenshot 2023-04-27 at 6 11 13 PM

@matthewdeutsch matthewdeutsch moved this from 🛑 Blocked / Needs More Info to 📋 Waiting for Sprint in RSP Component Milestones May 24, 2023
@github-project-automation github-project-automation bot moved this from 📋 Waiting for Sprint to ✅ Done in RSP Component Milestones Jun 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants