-
Notifications
You must be signed in to change notification settings - Fork 271
fix(legacy-plugin-chart-pivot-table): fix displaying image inside rows #954
fix(legacy-plugin-chart-pivot-table): fix displaying image inside rows #954
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/superset/superset-ui/bfh4giue3 |
Codecov Report
@@ Coverage Diff @@
## master #954 +/- ##
==========================================
- Coverage 27.67% 27.67% -0.01%
==========================================
Files 401 401
Lines 8249 8250 +1
Branches 1138 1139 +1
==========================================
Hits 2283 2283
- Misses 5830 5831 +1
Partials 136 136
Continue to review full report at Codecov.
|
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.
Could we rather check for $(this)[0].children.length
here? If it's 0 we can assume there are no html tags.
An easier solution to support the hack in apache/superset#12681 (including hyperlinks) is to check whether cell children is a single text node ( The assumption is if someone is advanced enough to add HTML to a cell, they are probably OK with not applying d3 formatting to it. |
Check out this branch: https://github.com/apache-superset/superset-ui/compare/pivot-table-fix It seems sorting on PivotTable is also broken by #880 so I fixed it, too. |
@villebro could you take another look, we need to get the fix out soon. @maloun96 feel free to review any PRs in this repo too. 🙏 @mayurnewase thanks for fixing it! |
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.
LGTM.
@mayurnewase I also added a couple of HTML tests cases with in Storybook. Hope you don't mind.
#954) * fix * lint * lint * complete fix * remove log * Add storybook entry for html Co-authored-by: Jesse Yang <jesse.yang@airbnb.com>
🐛 Bug Fix
fixes apache/superset#12681
This ensures text content of cell is only updated if its not empty,as it also overrides innerHtml property of element.