fix: copy to Clipboard order#16299
Conversation
Codecov Report
@@ Coverage Diff @@
## master #16299 +/- ##
==========================================
- Coverage 76.75% 76.37% -0.39%
==========================================
Files 997 1000 +3
Lines 53195 53494 +299
Branches 6764 6818 +54
==========================================
+ Hits 40830 40855 +25
- Misses 12135 12403 +268
- Partials 230 236 +6
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
a88a393 to
78c0fbe
Compare
There was a problem hiding this comment.
nit: deconstruct all_columns
const { all_columns } = queryFormData
78c0fbe to
1b40fb3
Compare
d28a78a to
0491d42
Compare
9774c97 to
f6e8767
Compare
f6e8767 to
078816e
Compare
|
/testenv up |
|
@junlincc Ephemeral environment spinning up at http://34.220.37.37:8080. Credentials are |
|
Ephemeral environment shutdown and build artifacts deleted. |
* upstream/master: (25 commits) chore(ci): bump pylint to 2.10.2 (apache#16463) fix: prevent page crash when chart can't render (apache#16464) chore: fixed slack invite link (apache#16466) fix(native-filters): handle null values in value filter (apache#16460) feat: add function list to auto-complete to Clickhouse datasource (apache#16234) refactor(explore): improve typing for Dnd controls (apache#16362) fix(explore): update overwrite button on perm change (apache#16437) feat: Draggable and Resizable Modal (apache#16394) refactor: sql_json view endpoint (apache#16441) fix(dashboard): undo and redo buttons weird alignment (apache#16417) fix: setupPlugin in chart list page (apache#16413) fix: Disable Slack notification method if no api token (apache#16367) feat: add Shillelagh DB engine spec (apache#16416) fix: copy to Clipboard order (apache#16299) docs: make FEATURE_FLAGS.md reference a link (apache#16415) chore(viz): bump superset-ui to 0.17.87 (apache#16420) feat: add activate command (apache#16404) Revert "fix(explore): let admin overwrite slice (apache#16290)" (apache#16408) fix(explore): retain chart ownership on query context update (apache#16419) chore: Removes the TODOs and uses the default page size (apache#16422) ...
* copy to Clipboard order * centralized copyToClipboard * fixed table order * fixed tests * added colnames to all viz types * added colnames to all viz types * added colnames to all viz types (cherry picked from commit 631ad02)
|
added test cases |
* copy to Clipboard order * centralized copyToClipboard * fixed table order * fixed tests * added colnames to all viz types * added colnames to all viz types * added colnames to all viz types
* copy to Clipboard order * centralized copyToClipboard * fixed table order * fixed tests * added colnames to all viz types * added colnames to all viz types * added colnames to all viz types
* copy to Clipboard order * centralized copyToClipboard * fixed table order * fixed tests * added colnames to all viz types * added colnames to all viz types * added colnames to all viz types
SUMMARY
This fixes this issue: #16149
The reason for this issue occurring is that Javascript orders objects based on integer and integer-like keys first, and then all strings: https://2ality.com/2015/10/property-traversal-order-es6.html
Therefore to prep the data for copyToClipboard, this code goes through and orders the keys based on the column names.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Also fixed the table order, which was previously wrong.

Before:
After:

TESTING INSTRUCTIONS
To test:
Also-
ADDITIONAL INFORMATION