-
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
Fix paste heading message in chat causes incorrect line breaks #19030
Fix paste heading message in chat causes incorrect line breaks #19030
Conversation
@NikkiWines @0xmiroslav One of you needs to copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
@0xmiroslav The PR is ready for review. |
@tienifr please update PR title to be more friendly |
@0xmiroslav I've updated the PR title |
src/libs/SelectionScraper/index.js
Outdated
@@ -126,7 +127,7 @@ const replaceNodes = (dom) => { | |||
} | |||
|
|||
if (dom.children) { | |||
domChildren = _.map(dom.children, (c) => replaceNodes(c)); | |||
domChildren = _.map(dom.children, (c) => replaceNodes(c, isChildOfEditorElement || !!dom.attribs[tagAttribute])); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
domChildren = _.map(dom.children, (c) => replaceNodes(c, isChildOfEditorElement || !!dom.attribs[tagAttribute])); | |
domChildren = _.map(dom.children, (c) => replaceNodes(c, isChildOfEditorElement || !_.isEmpty(dom.attribs && dom.attribs[tagAttribute]))); |
src/libs/SelectionScraper/index.js
Outdated
@@ -126,7 +127,7 @@ const replaceNodes = (dom) => { | |||
} | |||
|
|||
if (dom.children) { | |||
domChildren = _.map(dom.children, (c) => replaceNodes(c)); | |||
domChildren = _.map(dom.children, (c) => replaceNodes(c, isChildOfEditorElement || !_.isEmpty(dom.attribs[tagAttribute]))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you think attribs
always exists when dom has children?
For safety, !_.isEmpty(dom.attribs && dom.attribs[tagAttribute])
like above code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@0xmiroslav I agree checking both dom.attribs and dom.attribs[tagAttribute] is safer
@tienifr lint failing in PressableWithFeedback component. happening on main so out of scope |
Reviewer Checklist
Screenshots/VideosWebweb.movMobile Web - Chromemchrome.movMobile Web - Safarimsafari.movDesktopdesktop.moviOSios.movAndroidandroid.mov |
@tienifr please pull main. lint fixed now |
@0xmiroslav done! |
0405171
to
0096fc9
Compare
@0xmiroslav hi sorry I think I missed 1 place where we need to pass In that block |
// additional newlines from being added in the HTML to Markdown conversion process. | ||
return replaceNodes(dom.children[0]); | ||
return replaceNodes(dom.children[0], isChildOfEditorElement); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@NikkiWines LGTM!
@NikkiWines could you take a look at the PR? Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/NikkiWines in version: 1.3.17-0 🚀
|
🚀 Deployed to production by https://github.com/chiragsalian in version: 1.3.17-5 🚀
|
Details
Fixed Issues
$ #16921
PROPOSAL: #16921 (comment)
Tests
Offline tests
Same as above
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Web
Screen.Recording.2023-05-16.at.22.36.06.mov
Mobile Web - Chrome
RPReplay_Final1684251887.mp4
Mobile Web - Safari
RPReplay_Final1684251711.mp4
Desktop
Screen.Recording.2023-05-16.at.23.01.56.mov
iOS
Screen.Recording.2023-05-16.at.23.15.23.mp4
Android
Screen.Recording.2023-05-16.at.23.33.01.mov