Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Change ref handling in TextualBody to prevent it parsing generated nodes #3711

Merged
merged 8 commits into from
Jan 9, 2020

Conversation

t3chguy
Copy link
Member

@t3chguy t3chguy commented Dec 8, 2019

Fixes element-hq/element-web#11627
Instead of passing in the entire event span and only looking at its children, only look at the event body and that way we don't end up re-parsing the url previews we created already (when an event edit comes in to update the same tile)

Removes unused paths for getInnerText

Needs further testing around:

  • Spoilers
  • Linkification
  • Pillification

I will write unit tests to support this.

Signed-off-by: Michael Telatynski [email protected]

….com:matrix-org/matrix-react-sdk into t3chguy/clean_up_TextualBody

� Conflicts:
�	src/components/views/messages/TextualBody.js
Signed-off-by: Michael Telatynski <[email protected]>
@t3chguy t3chguy marked this pull request as ready for review January 6, 2020 14:38
@t3chguy t3chguy requested a review from a team January 6, 2020 14:39
Signed-off-by: Michael Telatynski <[email protected]>
src/components/views/context_menus/MessageContextMenu.js Outdated Show resolved Hide resolved
@@ -261,7 +261,7 @@ const Pill = createReactClass({
}

const classes = classNames("mx_Pill", pillClass, {
"mx_UserPill_me": userId === MatrixClientPeg.get().credentials.userId,
"mx_UserPill_me": userId === MatrixClientPeg.get().getUserId(),
Copy link
Member

Choose a reason for hiding this comment

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

This is the second unrelated change in this PR - please try to keep these out for future PRs. Personally I don't mind having one vaguely related thing in the PR, but after a couple it starts to feel like false advertising on the PR.

Copy link
Member Author

Choose a reason for hiding this comment

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

The change is not unrelated, it was to simplify stubbing for the test, any and all changes in this PR are related either to the change or testing it.

https://github.com/matrix-org/matrix-react-sdk/pull/3711/files#diff-c2d1eb236f1e50980bd094446ee76c63R132

Copy link
Member

Choose a reason for hiding this comment

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

things like this should be pointed out so tired eyes don't miss them :(

t3chguy and others added 3 commits January 9, 2020 12:10
….com:matrix-org/matrix-react-sdk into t3chguy/clean_up_TextualBody

� Conflicts:
�	yarn.lock
Signed-off-by: Michael Telatynski <[email protected]>
@t3chguy t3chguy merged commit 71b3005 into develop Jan 9, 2020
@t3chguy t3chguy deleted the t3chguy/clean_up_TextualBody branch May 25, 2020 18:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Edited messages include URL previews for past versions
2 participants