-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Failed KYC message #7889
Failed KYC message #7889
Conversation
This can't be the way we add links to messages right? Seems super unscalable App/src/pages/workspace/reimburse/WorkspaceReimburseVBAView.js Lines 37 to 42 in 0d1ec3d
|
There are React components that transform any link from a text automatically, maybe we should use something like that? What do you think @marcaaron |
Oh maybe I misunderstood, but what is the scaling issue here? Could just be a UX thing where we decided at one point it would be better to have a copy email function vs.
I'm not sure about this library. But I know we can render html with this component here... https://github.com/Expensify/App/blob/main/src/components/RenderHTML.js |
I think specifically having copy for before and after emails or links is unscalable, like here: App/src/pages/EnablePayments/TermsPage/LongTermsForm.js Lines 103 to 129 in fbb4674
So for each piece of copy that has a link or email embedded in it, we have to have two variables. For before and after? |
Ok, I think I get it. I can't quite think of a better way to not break up the copy into separate variables when there's a link besides using html (which could be an option, but not sure if we have any translated html strings yet). One cool thing about the html engine we're using is that we can get pretty fancy with custom elements. So, say you want something like a text link to get converted to a custom component you could (in theory) pass something like: This is before <a data-email="concierge@expensify.com" data-type="copy-email">the link</a> and now after and then add some logic to handle the attributes in the customer renderer here:
|
@tgolen what do you think about it? |
I'm not sure that I agree with these yet. It doesn't seem terrible to me that the translations have to be broken up. It's definitely not the end of the world to have two translated strings wrapping an email. It does feel like something that can be improved at some point, but I don't think we need to yet (just my personal opinion).
My concern with this is putting more complexity into place with HTML rendering and using a third-party lib especially would put us into a worse place (since the lib would sort of be a black box). My suggestions would be (in this order):
The idea that I like the best so far is this one from Marc, with maybe a slightly different approach: But I think we should see how common translation libraries do it first. The reason is, if we want to get an organization to provide us other translations, we should be giving them translation strings that are pretty industry-standard. |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to production by @chiragsalian in version: 1.1.42-6 🚀
|
@nkuoch
Details
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/193506
Tests
Needs to be tested by whatever PR uses this
No QA Steps
Tested On
Screenshots
Web
Mobile Web
Desktop
iOS
Android