-
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
[HOLD for payment 2023-05-16] [$1000] Web - Chat - Inconsistent parsing on occurrence of more than two consecutive styling characters #17665
Comments
Triggered auto assignment to @zanyrenney ( |
Bug0 Triage Checklist (Main S/O)
|
Going to check in the channel. |
Job added to Upwork: https://www.upwork.com/jobs/~01ab464dbcaa9a04d3 |
Current assignee @zanyrenney is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @parasharrajat ( |
Triggered auto assignment to @hayata-suenaga ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Inconsistent parsing of chat for two consecutive styling characters What is the root cause of that problem?The problem is inside
These regex are inconsistent with each other.
Below I am providing the solution for both of these but according to already present industry practices (github, slack) solution 1 should be followed. What changes do you think we should make in order to solve the problem?Make the 1. Parse neither bold nor italicIn the bold regex, we are excluding all * if it's inside * * in this part
Proof after fixing italic regex:Screen.Recording.2023-04-27.at.2.14.16.AM.mov2. Parse both bold and italic regex:As mentioned we need to remove
Proof after fixing bold regex:Screen.Recording.2023-04-27.at.2.20.48.AM.movWhat alternative solutions did you explore? (Optional)NA |
ProposalPlease re-state the problem that we are trying to solve in this issue.While the bold characters (asterisks) isn't parsed, the italic characters (underscores) got parsed and only leave one underscore after parsed.
We should take about what we want to do here first since there're 2 ways mentioned here. If we try some other popular markdown editor (like Github itself), we'll see that the styling character itself will not be included in the final styled text. For example if we try So I think we should do the same here. It also doesn't make sense to style the middle What is the root cause of that problem?
This is because in https://github.com/Expensify/expensify-common/blob/07db321d9dffbc66a56d7d7bf42ba1cbf3df216e/lib/ExpensiMark.js#L143, we're excluding the While in https://github.com/Expensify/expensify-common/blob/07db321d9dffbc66a56d7d7bf42ba1cbf3df216e/lib/ExpensiMark.js#L135, we're not doing that, we still allow the What changes do you think we should make in order to solve the problem?We need to update this regex https://github.com/Expensify/expensify-common/blob/07db321d9dffbc66a56d7d7bf42ba1cbf3df216e/lib/ExpensiMark.js#L135 to not allow the lonely We can use this regex It has 3 changes compared to the current italic regex we're using:
Also we need to update this
(We could have used This will make the behavior the same as Github and other popular markdown editor. Tested with the following cases and all works well:
What alternative solutions did you explore? (Optional)NA |
ProposalPlease re-state the problem that we are trying to solve in this issue.Inconsistent parsing of consecutive styling characters. What is the root cause of that problem?The main cause of this issue is in
What changes do you think we should make in order to solve the problem?We need to extract the most inner match and ignore the empty styles. We can do this by the following rules.
Resultmac_safari.mp4What alternative solutions did you explore? (Optional)N/A |
What is the expected behavior here? @hayata-suenaga
|
I believe both should not be parsed |
Good, Thanks. To confirm asked here https://expensify.slack.com/archives/C01GTK53T8Q/p1682021148507319. |
Heading OOO, reapplying the Bug0 label for active management. |
Triggered auto assignment to @alexpensify ( |
Bug0 Triage Checklist (Main S/O)
|
There is one more PR to upgrade the version in the App which will be done tomorrow. |
Thank you, I updated my comment. |
The new PR is in the works! |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.12-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-05-16. 🎊 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:
|
I wasn't able to figure out the regression PR for this. |
No Regression tests are needed as this is covered with unit tests. |
I request to consider the 50% bonus for this issue. The issue took 4 business days to complete but there were two PRs. We did move very fast to test and merge both in 3 days but we have to wait for updating the hash from the other PR due to the sequential nature which caused us one day. |
@alexpensify can you check @parasharrajat's comments? |
Thank you @parasharrajat for the work here. I'm aware of the two PRs and I'll review the payment breakout later this week since payment is not due until next week. |
Still on hold for payment. |
I've started an internal discussion to confirm the payments. |
I've reviewed the two PRs with the team. We have confirmed that it is common that some GitHubts like this one could require two PRs. One PR to make the update in expensify-common and then another to bring the updated expensify-common version in App. With that said, the bonus will not apply here. The merge was past the 3-business day mark. With that said, this GH has the following payouts. Issue reporter: $250 - @kerupuksambel If anyone has feedback please share. If no response, tomorrow, I’ll complete the next steps in Upwork. Thank you! |
@dylanexpensify is going to step in to help with the payment process in Upwork. I'm OOO until next Wednesday. |
@kerupuksambel, @dukenv0307, and @parasharrajat please apply here! |
@dukenv0307 please apply! @parasharrajat @kerupuksambel sent offers! |
@dylanexpensify applied, thank you! |
@dukenv0307 offer sent! |
Done! |
Thanks for the assist here @dylanexpensify! |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Action Performed:
Expected Result:
Both of the messages should be parsed the same, either all characters styling isn't parsed or the middle character got parsed
Actual Result:
While the bold characters (asterisks) isn't parsed, the italic characters (underscores) got parsed and only leave one underscore after parsed
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.1.3
Reproducible in staging?: Yes
Reproducible in production?: Yes
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
Triple.Underscore.Parsed.mp4
Recording.2525.mp4
Expensify/Expensify Issue URL:
Issue reported by: @kerupuksambel
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1681867484400789
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: