-
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
[HOLD for payment 2023-10-23] [HOLD for payment 2023-10-23] [HOLD for payment 2023-10-20] [HOLD for payment 2023-10-20] [$500] Desktop - Monospace font for code block doesn't work on desktop #27626
Comments
Triggered auto assignment to @bfitzexpensify ( |
Bug0 Triage Checklist (Main S/O)
|
This is a regression so let's ensure it gets added to the regression checklist before it's closed 🙏 |
ProposalPlease re-state the problem that we are trying to solve in this issue.The monospace font is not being used for code blocks on desktop and web. What is the root cause of that problem?On web and desktop, the PreRenderer outputs App/src/components/HTMLEngineProvider/BaseHTMLEngineProvider.js Lines 67 to 69 in be0d9f4
Since the system fonts specified for the HTML engine provider are comma-separated, and it's impossible to apply multiple fonts at the same time, the individual Expensify fonts are not recognised when using the custom HTML renderers. Note that this is not the case on iOS / Android native as custom fonts are handled differently. This is a regression from #19874. What changes do you think we should make in order to solve the problem?Solution 1 -const fallbackFonts = {'ExpensifyNeue-Regular': fontFamily.EXP_NEUE};
+const fallbackFonts = {'ExpensifyNeue-Regular': fontFamily.EXP_NEUE, 'ExpensifyMono-Regular': fontFamily.MONOSPACE}; This is preferred to Solution 2, since it uses the same approach taken in #19874 for the base Expensify Neue font, and it is least likely to cause another regression with the emojis. Solution 2 +MONOSPACE_REGULAR: 'ExpensifyMono-Regular', What alternative solutions did you explore? (Optional)In BasePreRenderer, we can iterate over each text line and line break from the |
It doesn't look like this is a regression (or at least not a recent one). I thought I was going crazy, but I tested with a bunch of earlier releases, and it looks like I've never actually seen the monospace font for code blocks on web and desktop. The monospace font did work fine on iOS / Android native, however. I've figured out a fix. |
How far back did you test? It worked when we first introduced the feature. So it is 100% a regression, recent or not |
Up to 1.3.50-0. I was prepared to go further back. 😅 My first PR related to the feature was about 4 weeks ago, which is where I noticed from the desktop and web screenshots that the code block wasn't actually rendered using a monospace font. |
@rafecolton I think this is where the regression was introduced: #19874 |
ProposalPlease re-state the problem that we are trying to solve in this issue.Monospace font for code block doesn't work on web/desktop. What is the root cause of that problem?As correctly pointed out by @akinwale, this is a regression from #19874 where we set a list of font family alternatives to each font family, for the web platform. In App/src/components/HTMLEngineProvider/BaseHTMLEngineProvider.js Lines 62 to 64 in 60b8dae
It's not because
In our current code, we already pass the font family list to
but the list is the one that contains multiple font family alternatives. So, the which makes why code fence font family is monospace then? That is because we are manually set the font family in CodeRenderer this issue is not limited to monospace font but also to other font family What changes do you think we should make in order to solve the problem?We need to pass the individual list of each of our custom font family. The simplest way is to import the fontFamily/index.native.js file and use it as import singleFontFamily from '../../styles/fontFamily/index.native';
systemFonts={_.values(singleFontFamily)} or We can create new font family file called This way, we don't need the |
Job added to Upwork: https://www.upwork.com/jobs/~01da4c270f6ad4ac3e |
Current assignee @bfitzexpensify is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @mananjadhav ( |
@mananjadhav, @bfitzexpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
Couple of proposals ready for you to review @mananjadhav |
@mananjadhav, @bfitzexpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
Reviewing this. |
@mananjadhav that's really weird. Even your LHN subtitle text has a monospace font. Maybe there are some changes you made in the code? |
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.84-10 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2023-10-23. 🎊 After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
For reference, here are some details about the assignees on this issue:
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.84-10 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2023-10-23. 🎊 After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
For reference, here are some details about the assignees on this issue:
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
Switching this to daily so that I'm on top of it and pay it out when it's due |
Due 10/23 |
@puneetlath, @mananjadhav, @bfitzexpensify, @bernhardoj Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
@bfitzexpensify This is ready for payout, can you please post the payment summary? |
Payment summary: Contributor: @bernhardoj - $750 for completion and urgency bonus (the automation didn't pick it up but I'm seeing assignment on 10/9 and merging on 10/10) to be paid via Upwork |
$750 payment approved for @mananjadhav based on comment above. |
A reminder to complete the BZ checklist when you get a moment @mananjadhav - thanks! |
@bfitzexpensify I couldn't pinpoint to a specific PR that could've caused this. But I think it makes sense to add a regression for this one. Regression Test Proposal
|
Cool, I like that test. Opened https://github.com/Expensify/Expensify/issues/330780 to get it added. We're all done here, thanks everyone. |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Action Performed:
Example:
Expected Result:
Monospace font for code blocks should work on desktop
Actual Result:
Monospace font for code blocks doesn't work on desktop
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.70.5
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
n/a
Expensify/Expensify Issue URL:
Issue reported by: @rafecolton
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1693522327341959
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: