Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
MBS-10357: React edit diffs #1084
* Handle non-array children. * Remove the incorrect reduce, which called reactTextContent with the wrong argument order.
This is only used for relationship type descriptions. Diffing HTML is complicated, and porting display_html_diff to React for just this single case is not worth the effort. It even seems more useful to me to show the raw HTML, since these are technical edits by their nature and it makes more clear exactly what was changed.
EntityLink currently tries to see if there's a name variation by comparing the entity name with the text content being displayed. Getting the text content of a React element tree is tricky enough (see the `reactTextContent` implementation), but even then, it doesn't work for custom component classes: they aren't rendered so we don't know what their children are yet. Thus, we have to allow setting `nameVariation` where we know one exists and where it can't be guessed otherwise.
mwiencek merged commit
Sep 23, 2019
4 checks passed
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews.