Skip to content
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

[Data Table] Remove extra column in split mode #83193

Merged
merged 5 commits into from
Nov 19, 2020

Conversation

sulemanof
Copy link
Contributor

@sulemanof sulemanof commented Nov 11, 2020

Summary

Fixes #73814

Initial issue:
when using Split table by column mode, the "splitting column" is repeated inside each row of all tables

table_issue

The regression was caused by this pr: #54127

Checked in kibana 7.5.1 - the issue is not reproducible there:

image

After the fix:

image

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@sulemanof sulemanof added Feature:Data Table Data table visualization feature regression release_note:fix Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.10.1 v7.11 v8.0.0 labels Nov 11, 2020
@sulemanof sulemanof marked this pull request as ready for review November 12, 2020 07:26
@sulemanof sulemanof requested a review from a team November 12, 2020 07:26
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)


$scope.formattedColumns = table.columns
.map(function (col, i) {
const isBucket = buckets.find((bucket) => bucket.accessor === i);
const isSplitColumn = splitColumn
Copy link
Contributor

Choose a reason for hiding this comment

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

👍 I didn't find any cases why this code needed.

Copy link
Contributor

@alexwizp alexwizp left a comment

Choose a reason for hiding this comment

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

LGTM! Tested locally. cvs export works correctly

@stratoula
Copy link
Contributor

@sulemanof my only concern is that now the export in CSV doesn't have this column. So while when I split table (rows mode) the exported CSV has the the "splitting column", when I export it from columns mode it doesn't have it.

Rows mode
Screenshot 2020-11-12 at 4 42 03 PM

Columns mode
Screenshot 2020-11-12 at 4 42 11 PM

@alexwizp
Copy link
Contributor

@stratoula Hm... I tested that case. If it's true I should remove my approval.

@sulemanof
Copy link
Contributor Author

@sulemanof my only concern is that now the export in CSV doesn't have this column. So while when I split table (rows mode) the exported CSV has the the "splitting column", when I export it from columns mode it doesn't have it.

Rows mode
Screenshot 2020-11-12 at 4 42 03 PM

Columns mode
Screenshot 2020-11-12 at 4 42 11 PM

The main question is: do we need this column in exported csv if the actual table doesn't have it?
I also want to highlight that this column is presented in a non-formatted exported file

@stratoula
Copy link
Contributor

This is a good question 🙂 From one point of view, it is good that is exported as it contains the splitting column info, from the other hand it is not displayed in the table so we could omit it. But my main point is that if it is not exported on column mode, shouldn't be exported on row mode. Can you check how it worked on 7.5.1?

@spalger spalger added v7.11.0 and removed v7.11 labels Nov 12, 2020
@sulemanof
Copy link
Contributor Author

This is a good question 🙂 From one point of view, it is good that is exported as it contains the splitting column info, from the other hand it is not displayed in the table so we could omit it. But my main point is that if it is not exported on column mode, shouldn't be exported on row mode. Can you check how it worked on 7.5.1?

The problem is in 7.5.1 the formatted export was not working at all, and the fix #54127 introduced the bug of extra column appeared 😄

table_export_error

The same issue is reproducible in earlier versions, I checked in 7.2.1, 7.0.1
You could see the problem in code: the columns is an array without the split column, but rows still have values of the split column:

table_export_code

The working feature was found in 6.8.1 & 6.5.1 : the split column does not exist neither in formatted export nor in raw!

6.5.1 - formatted export :

image

6.8.1 - raw export :

image


FMPOV, the formatted export should not contain the split column in any case, since it is not presented in the table.
But then I found the issue #57096, which describes the opposite 🤷‍♂️
@markov00 do you have anything to add here?

@sulemanof
Copy link
Contributor Author

@elasticmachine merge upstream

@markov00
Copy link
Member

FMPOV, the formatted export should not contain the split column in any case, since it is not presented in the table.
But then I found the issue #57096, which describes the opposite 🤷‍♂️
@markov00 do you have anything to add here?

Hey @sulemanof I think the linked issue doesn't actually indicate if we need that additional column or not, it just points out that there was a missing header on the exported table.

@sulemanof
Copy link
Contributor Author

The PR updated.
Currently a table exports only visible data, as it was in kibana 6.x

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
visTypeTable 67.1KB 66.6KB -512.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

Copy link
Contributor

@stratoula stratoula left a comment

Choose a reason for hiding this comment

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

LGTM! I tested it locally, the splitted column/row is not exported. Thank you @sulemanof ❤️

@sulemanof sulemanof merged commit b263145 into elastic:master Nov 19, 2020
@sulemanof sulemanof deleted the fix/table_split_column branch November 19, 2020 15:02
sulemanof pushed a commit to sulemanof/kibana that referenced this pull request Nov 19, 2020
* Fix extra column in split table

* Update table exports

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
@sulemanof sulemanof removed the v7.10.1 label Nov 19, 2020
gmmorris added a commit to gmmorris/kibana that referenced this pull request Nov 19, 2020
* master:
  skip "Dashboards linked by a drilldown are both copied to a space" (elastic#83824)
  [alerts] adds action group and date to mustache template variables for actions (elastic#83195)
  skip flaky suite (elastic#79389)
  [DOCS] Reallocates limitations to point-of-use (elastic#79582)
  [Enterprise Search] Engine overview layout stub (elastic#83756)
  Disable exporting/importing of templates.  Optimize pitch images a bit (elastic#83098)
  [DOCS] Consolidates plugins (elastic#83712)
  [ML] Space management UI (elastic#83320)
  test just part of the message to avoid updates (elastic#83703)
  [Data Table] Remove extra column in split mode (elastic#83193)
  Improve snapshot error messages (elastic#83785)
  skip flaky suite (elastic#83773)
  skip flaky suite (elastic#83771)
  skip flaky suite (elastic#65278)
  skip flaky suite (elastic#83793)
  [Task Manager] Ensures retries are inferred from the schedule of recurring tasks (elastic#83682)
  [index patterns] improve index pattern cache (elastic#83368)
  [Fleet] Rename ingestManager plugin ID fleet (elastic#83200)
  fixed pagination in connectors list (elastic#83638)
chrisronline pushed a commit to chrisronline/kibana that referenced this pull request Nov 19, 2020
* Fix extra column in split table

* Update table exports

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
sulemanof pushed a commit that referenced this pull request Nov 20, 2020
* Fix extra column in split table

* Update table exports

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Data Table Data table visualization feature regression release_note:fix Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.11.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Table visualization issue with Split table in column mode - Extra column added.
7 participants