-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Bolded and Italics code does not render properly on mobile #2491
Comments
Sorry. Misunderstood it. Please ignore the above. |
@NicMendonca We can fix this by updating and here is classesStyles that placed in
|
I spend a time debugging here and I found that in android we are not using the correct values. When text must be italic, it is changed to That is why it is not showing correctly, you could see it below. https://github.com/Expensify/Expensify.cash/blob/9efcc63e4eb9dd27fac35d7bfc92b3400554be0c/src/styles/fontWeight/bold/index.android.js#L3 In the begging of the file, the @marcaaron explain why
I changed to use bold and italic. |
@Thierrysantos LOL. This issue literally killed me. I graved out the Nice found. Great work. 🎉 |
In the screenshots the type is no longer monospaced ? |
@marcaaron yeah, when using bold or italic the text isn't monospaced |
So we should load a monospaced italic font for fontstyle italic. |
I think we want them to be the same on all platforms cc @shawnborton have you got the right font to use on hand ? |
GTAmericaExpMono-Rg.otf should have the italic and bold variant. |
Yes, if I didn't find that, looking at the react-native-render-html code would be the next step 😂 |
I try with that and have the same result 🤔 |
I mean it should have the italic and bold-variant on the internet which we can use something line GTAmericaExpMono-Italic.otf. |
Yeah, I found some variants here https://www.grillitype.com/typeface/gt-america |
@shawnborton would be a good person to get the assets. |
nice, I'm waiting to the next steps 🤘🏽 |
Hi @Thierrysantos |
Hello @Thierrysantos! I'll be reviewing your proposal on this issue. The description of the issue does include both Android and iOS, and I see that you've cracked part of the problem on Android. Can you account for why this is happening on iOS, and what you'd change to fix it? |
@aliabbasmalik8 I'll also review your proposal. Can you be more specific about the exact file you'll be changing? Also I'm not sure that this addresses the root cause of the issue. It should not be necessary to apply styles in this case, considering that the following HTML all works fine. (you can try it here: https://www.w3schools.com/html/tryit.asp?filename=tryhtml_intro)
|
@Luke9389 |
@aliabbasmalik8 |
@Luke9389 |
@aliabbasmalik8 |
yes |
@aliabbasmalik8 Seems like the fontStyle will need to remain platform dependent, but your change will be overwriting that. Correct? |
@Luke9389
but I think we also need to add
we can test with adding |
Also we could see here some issues related to styling #2491 (comment) |
Just to make sure I understand this correctly, it sounds like we need our monospaced font in regular italic, bold, and bold italic. Does that sound right? We can provide the font files to implement these natively, and I think we'll also have to make sure these fonts are added to our Expensify.com web application so we can serve them up for desktop/web. |
@shawnborton Yes I think that's correct. @aliabbasmalik8 I'm liking the direction you're heading, but you'll need to verify that your proposed solution works for iOS AND Android (with screenshots). If you can do that, please resubmit a proposal with those included, and a summary of exactly what you're going to change, links to those files, and any resources you'll need (like a new font for example). Please use links to our actual codebase (example), and markdown code blocks rather than screenshots of your IDE. Generally speaking, I'm looking for a very clean proposal that has everything we need, all in one comment. @Thierrysantos I'm not quite following your last two comments, but I ask that you please only comment when you have a solution ready and have a proposal to resubmit. Posting investigation steps is making this thread noisy and hard to follow. |
Sorry, if I'm not being clear enough, but what I'm suggesting here (#2491 (comment) and #2491 (comment)) is to have other variants for monospace font, such as bold and italics @Luke9389 |
Here are the font files we need for native implementation: GTAMono.zip As I mentioned, we'll need to implement these on Web-E as well as I am pretty sure desktop/web on Expensfiy.cash just grabs font URLs from the www.expensify.com web app. @Luke9389 is that something you would like to take care of? I can help you implement them as well. |
@Luke9389 NOTE:
|
@Luke9389 Android |
@aliabbasmalik8 for your testing, can you be sure to use words with a lowercase "g" in them? That makes it easy to tell if the correct font is being applied. For Android in your screenshot above, the fonts look like they are incorrect. |
Okay, |
@shawnborton You are right. fonts not added in android. I have no idea why it's happened but i linked all assets in app by running |
Hello @Luke9389 , I have a proposal right now, after a lot of time debugging we need to add this new fonts and rename it based on We need to add this fonts here and here Also we need to change the
And in the we need to load the font variant dynamically (only for android), because react-native in android don't work well with fontWeight and fontStyle. The code below is not the final version, and it is just to show the solution, I will improve it
That is the final result: |
REVISED PROPOSAL
STEP 4: DELETE THESE 2 files
STEP 5: ADD CODE HERE
STEP 6: ADD
STEP 7: UPDATE
|
@Thierrysantos I see you've got platform-specific code in your proposal. Could you describe to me at a high level how you'd improve your code? |
@Luke9389 that idea is just refactor the code to remove the nested ternary. Like this
|
@Thierrysantos I see. But what about |
@Luke9389 I'm looking a way here and I give a feedback for you |
@Luke9389 we don't need this
The result in the ios and android still the same. Web: |
Ok, @Thierrysantos you can go ahead and start the PR. Thanks for all your patience here. @aliabbasmalik8 I appreciate the effort you put into this thread, but I've decided not to move forward with your proposal. The main reason for this is that after I asked for a clear, complete, and well laid out proposal from both of you, Thierry was the one to provide that first. I do hope that you continue to make proposals with us, but in the future, I think you should focus less on speed, and more on making sure your proposal is clear and complete. The revised version you did was good, had you posted that much sooner this would have gone the other way. Thank you again very much for your time and efforts. |
Okay, thanks and sorry if I made something wrong here ❤️ . |
No, you've been great! No worries at all. |
Nice, I sent the proposal on UpWork |
@Thierrysantos just sent over the the offer in Upwork. Thanks! |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Expected Result:
Bold and italics are applied to the code block
Actual Result:
Bold and italics are not applied to the code block
Action Performed:
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Platform:
Where is this issue occurring?
Mobile, reproduced on both -
iOS
Android
Version Number: 1.0.2-74
Notes/Photos/Videos:
Bold / Strikethrough on mobile

Bold/ Strikethrough on desktop

Video: https://recordit.co/QtKls2EXDi
Expensify/Expensify Issue URL: https://github.com/Expensify/Expensify/issues/158825
View all open jobs on Upwork
Upwork job: https://www.upwork.com/jobs/~016d9851436c63f135
The text was updated successfully, but these errors were encountered: