App icon indicating copy to clipboard operation
App copied to clipboard

[HOLD for payment 2021-12-15] Markdown with italic inside bold is visually different from bold inside italic - Reported by: Kürşat Yiğitoğlu

Open isagoico opened this issue 5 years ago • 22 comments

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:

  1. In a conversation, send these 2 messages
*_bold-italic_*
_*italic-bold*_

Expected Result:

Both messages should have the same style

Actual Result:

Messages don't have the same style. The italic-bold message seems to be using a different font-family.

Workaround:

No need for workaround.

Platform:

Where is this issue occurring?

  • Web
  • iOS
  • Android
  • Desktop App
  • Mobile Web

Version Number: 1.1.16-9

Reproducible in staging?: Yes Reproducible in production?: Yes

Logs: https://stackoverflow.com/c/expensify/questions/4856

Notes/Photos/Videos: Any additional supporting documentation
image

Expensify/Expensify Issue URL:

Issue reported by: Kürşat Yiğitoğlu Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1637796876484200

View all open jobs on GitHub

isagoico avatar Nov 25 '21 23:11 isagoico

Triggered auto assignment to @tylerkaraszewski (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

MelvinBot avatar Nov 25 '21 23:11 MelvinBot

Hey @isagoico, my user name is kursat on github.

kursat avatar Nov 26 '21 09:11 kursat

Triggered auto assignment to @kevinksullivan (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

MelvinBot avatar Nov 26 '21 21:11 MelvinBot

Sounds like an external issue to me.

tylerkaraszewski avatar Nov 26 '21 21:11 tylerkaraszewski

Interesting. @Expensify/design is there somewhere I should bring this conversation to ensure we pick the right format of the two before explorting?

kevinksullivan avatar Nov 30 '21 04:11 kevinksullivan

PROPOSAL

  1. Problem:

This problem is occurring because in code em and strong styles in webViewStyles have different fontFamily values.

https://github.com/Expensify/App/blob/c2b96c1042e8055bf8e6c689b5a358245184b5d4/src/styles/styles.js#L55-L58

https://github.com/Expensify/App/blob/c2b96c1042e8055bf8e6c689b5a358245184b5d4/src/styles/styles.js#L65-L68

And when user writes *_bold-italic_* or _*italic-bold*_ both messages text will have fontWeight: "bold" and fontStyle: "italic", but they will have different fontFamily values.

  1. Solution:

We can propose you to change fontFamily of em and strong from fontFamily: fontFamily.GTA_BOLD , fontFamily: fontFamily.GTA_ITALIC to fontFamily: fontFamily.GTA, and text will be displayed correctly:

Output for:

*_bold-italic_*
_*italic-bold*_
*bold*
_italic_
simple

Screenshot 2021-12-01 at 12 19 30

developvsn avatar Dec 01 '21 10:12 developvsn

I agree with @developvsn's analysis above.

shawnborton avatar Dec 01 '21 16:12 shawnborton

@developvsn want to apply for the job and I'll hire you?

https://www.upwork.com/jobs/~018e7f01a0324f9914

kevinksullivan avatar Dec 02 '21 00:12 kevinksullivan

Triggered auto assignment to @parasharrajat (Exported)

MelvinBot avatar Dec 02 '21 00:12 MelvinBot

Triggered auto assignment to @tgolen (Exported), see https://stackoverflow.com/c/expensify/questions/7972 for more details.

MelvinBot avatar Dec 02 '21 00:12 MelvinBot

Based on Shawn's comment https://github.com/Expensify/App/issues/6489#issuecomment-983812521, @developvsn's proposal looks good. But make sure to test your change on all platforms and remove extra font dependency.

parasharrajat avatar Dec 02 '21 07:12 parasharrajat

@developvsn want to apply for the job and I'll hire you?

https://www.upwork.com/jobs/~018e7f01a0324f9914

Yes thanks, applied!

developvsn avatar Dec 02 '21 08:12 developvsn

🟢 on the proposal. Feel free to create the PR

tgolen avatar Dec 02 '21 18:12 tgolen

Hey @kevinksullivan, should I apply to same job for bug report bonus?

kursat avatar Dec 06 '21 19:12 kursat

Yes @kursat , please go ahead and apply as well!

kevinksullivan avatar Dec 08 '21 05:12 kevinksullivan

Great, I've applied, thanks for quick response.

kursat avatar Dec 08 '21 18:12 kursat

The solution for this issue has been :rocket: deployed to production :rocket: in version 1.1.18-3 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:

  • https://github.com/Expensify/App/pull/6561

If no regressions arise, payment will be issued on 2021-12-15. :confetti_ball:

botify avatar Dec 08 '21 19:12 botify

Hey @kevinksullivan, I wanted to remind you that I'm still not hired on upwork.

kursat avatar Dec 14 '21 13:12 kursat

Hey @kevinksullivan, I wanted to remind you that I'm still not hired on upwork.

Not you alone.

But the day is coming this evening for our timezone only

developvsn avatar Dec 14 '21 13:12 developvsn

Both hired @developvsn @kursat ! And payment will happen tomorrow assuming no regressions.

kevinksullivan avatar Dec 14 '21 14:12 kevinksullivan