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

allow heading inside a quote #522

Merged
merged 5 commits into from
May 3, 2023
Merged

Conversation

eh2077
Copy link
Contributor

@eh2077 eh2077 commented Apr 25, 2023

Fixed Issues

Expensify/App#17367

Tests

  1. Send a message, > # heading
  2. Verify the text is displayed in as header inside the quote
  3. Send following message
========= test case 1 ========
> [quote] case 1
> # heading
> [quote] case 1

[normal] case 1
# heading
[normal] case 1

========= test case 2 ========
> [quote] case 2
> 
> # heading
> 
> [quote] case 2

[normal] case 2

# heading

[normal] case 2
  1. Verify normal heading and heading inside quote have the same line break handling
Screen.Recording.2023-04-25.at.11.57.42.AM.mov

QA

Same as Tests above

@eh2077 eh2077 requested a review from a team as a code owner April 25, 2023 05:21
@melvin-bot melvin-bot bot requested review from hayata-suenaga and removed request for a team April 25, 2023 05:22
@pecanoro
Copy link
Contributor

pecanoro commented Apr 25, 2023

@Santhosh-Sellavel I think if you leave a comment I will be able to add you as a reviewer, I think the settings for this repo are not properly set so I can't add external people.

@pecanoro pecanoro self-requested a review April 25, 2023 14:56
Copy link
Contributor

@Santhosh-Sellavel Santhosh-Sellavel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding myself as a reviewer

hayata-suenaga
hayata-suenaga previously approved these changes Apr 25, 2023
Copy link
Contributor

@hayata-suenaga hayata-suenaga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test cases make sense. I'm not well versed in markdown and string manipulation. I'd wait other people's preview.

Copy link
Contributor

@Santhosh-Sellavel Santhosh-Sellavel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, @pecanoro all yours!

Will test PR against E/APP!

Copy link
Contributor

@pecanoro pecanoro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested well!

@pecanoro
Copy link
Contributor

pecanoro commented May 1, 2023

@Santhosh-Sellavel @eh2077 Do you know why we remove the empty line after the heading in case 2 but we leave the one above the heading? I mean, that's the behavior with and without quotes but I find it pretty odd.

@eh2077
Copy link
Contributor Author

eh2077 commented May 1, 2023

@Santhosh-Sellavel @eh2077 Do you know why we remove the empty line after the heading in case 2 but we leave the one above the heading? I mean, that's the behavior with and without quotes but I find it pretty odd.

@pecanoro That's an interesting question. I guessed it's just because the product team want to have line breaks before heading and want to keep content after heading look compact(so removing line breaks after heading).

hayata-suenaga
hayata-suenaga previously approved these changes May 1, 2023
Copy link
Contributor

@hayata-suenaga hayata-suenaga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@eh2077
Copy link
Contributor Author

eh2077 commented May 1, 2023

@Santhosh-Sellavel @eh2077 Do you know why we remove the empty line after the heading in case 2 but we leave the one above the heading? I mean, that's the behavior with and without quotes but I find it pretty odd.

@pecanoro I just encountered this again in another issue when addressing proposal review feedback from C+ team, see Expensify/App#17998 (comment). I think it's possible to improve this weird line break handling issue in that issue.

@Santhosh-Sellavel
Copy link
Contributor

I believe we are good to go here, for now. We have an active issue to fix or improve that behavior

@pecanoro Do you got your query resolved or still need clarfications?

@pecanoro
Copy link
Contributor

pecanoro commented May 3, 2023

Yes! Sorry, all comments are solved! I took a day off so I couldn't get back to this until today!

@pecanoro pecanoro merged commit afe4697 into Expensify:main May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants