-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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-03-13] [$1000] Whitespace above block quotes is stripped away #14941
Comments
Triggered auto assignment to @abekkala ( |
Bug0 Triage Checklist (Main S/O)
|
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
Job added to Upwork: https://www.upwork.com/jobs/~0162b44ca1f9c03f85 |
Current assignee @abekkala is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @rushatgabhane ( |
Current assignee @thienlnam is eligible for the External assigner, not assigning anyone new. |
ProposalPlease re-state the problem that we are trying to solve in this issue.Writing whitespace above block quotes is stripped away What is the root cause of that problem?Looking at ExpensiMark.js seems like this is the expected behavior.
What changes do you think we should make in order to solve the problem?If we comment out this functionality the problem is resolved. Another solution is to change the regex to capture the lines only inside quotes. Example:
|
ProposalPlease re-state the problem that we are trying to solve in this issue.New line before a block quote is removed automatically What is the root cause of that problem?We have been intentionally removing a new line before a blockquote. For example
here https://github.com/Expensify/expensify-common/blob/5cdfe388a759e063bd86d00440a4bf277b89a3c6/lib/ExpensiMark.js#L186-L190
What changes do you think we should make in order to solve the problem?We should remove the rule to replace br before blockquote from the ExpensiMark.js. This will fix the current issue. But it will regress the issue #9379 it originally tried to solve. So we need to apply the regex replacement before displaying the HTML in the view for native iOS/android alone to fix the original issue. One other reason i prefer to do this change other the alternative listed below is, if we add the issue message above in a chat and try to edit the message in native iOS/android, we would find a new line missing in the edit compose window. But it would change to normal when you save it. We could fix both issues by the above fix. What alternative solutions did you explore? (Optional)I tried to explore if we could do an upstream fix in RenderHTML, but it seems there where multiple issue where people analysed on upstream fix and concluded it has to do more with rendering of blockquote at web vs native layer than the RenderHTML package scope. Also regardless of upstream fix we would be required to remove the br removal at ExpensiMark.js as its leading to the edit issue i mentioned above. |
Hi @tsvetomir-marinov-dreamix, thanks for your proposal. The comment you've attached says, "A single prepending space should be stripped if it exists". Could you please help us understand why this code exists? Or to put in another way, what regression (if any) will we be causing by removing that block of code? Thanks! |
@abdulrahuman5196 could you please give details on how you'll achieve this? Which regex will be used and where? |
@rushatgabhane could you please give details on how you'll achieve this? Which regex will be used and where?
We have to replace the text here before using the html - App/src/pages/home/report/ReportActionItemFragment.js Lines 109 to 119 in a53b274
We can replace the html with the above regex at other ingress before display as well, but this seems best. |
yepp. it's only visual. |
Because the flag was already added in this PR https://github.com/Expensify/App/pull/14822/files and turned on for native code so the additional tests for iOS/Android are working. |
ohhhh wtf. that's awesome makes sense that your PR is just removing the hack. nothing less nothing more |
Ah! That makes much more sense. |
@rushatgabhane @thienlnam The PR #15504 is ready for review. Thanks |
@rushatgabhane Can you help review this PR #15504? Thanks |
Since the PR is already merged. I'm here to propose the regression test. Regression Test ProposalBug: Whitespace above block quotes is stripped away Proposed Test Steps: For all platforms1, Compose a message like this:
2, Post the message Additional test for IOS and Android (to ensure there is no regression bug created by the PR)1, Compose a message like this:
2, Post the message Do we 👍 or 👎 |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.2.78-0 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-03-13. 🎊 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.
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:
|
@tienifr I think your proposed regression test may need some tweaking. |
Payments to be made on MAR 13Issue reported by: @roryabraham 🎉 no payment for you 😉 Accepted Proposal: Feb 22
No regressions! 🎉 |
Offer sent to @rushatgabhane @tienifr I can't seem to find you in Upwork. Can you let me know your profile name within Upwork |
@abekkala I've just applied to the Upwork job, thanks |
Thank you @tienifr I've sent your offer! |
@tienifr payment sent and contract ended - thank you! 🎉 |
@rushatgabhane payment sent and contract ended - thank you! 🎉 |
We're all set here - closing! |
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:
Expected Result:
There should be a blank line (and an even amount of space) above and below the block quote. The same message you sent in step 1 should be shown in the editor.
Actual Result:
There's no blank line above the block quote.
Edit message shown as
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.2.67-4
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:
Recording.1462.mp4
Expensify/Expensify Issue URL:
Issue reported by: @roryabraham
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1675803452308849
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: