Ensure extra columns are not shown in table vis when showPartialRows:true#25690
Ensure extra columns are not shown in table vis when showPartialRows:true#25690lukeelmers merged 8 commits intoelastic:6.xfrom
Conversation
There was a problem hiding this comment.
Since params are being thrown around willy-nilly and hard to track, I added this to reduce confusion for people working on Tabify in the future. (A TypeScript rewrite would be very helpful here).
There was a problem hiding this comment.
These are split into separate params, because within table vis there is a distinction between the two. For example, the following is possible:
vis.params.showMetricsAtAllLevels === false;
vis.params.showPartialRows === true;
vis.isHierarchical(); // still returns trueThis is due to how we configure the table vis:
https://github.com/elastic/kibana/blob/9b08fc719a9fb4c0c1dce55be73d395e7cd6b54a/src/core_plugins/table_vis/public/table_vis.js#L114-L116
There was a problem hiding this comment.
this is actually wrong i think ....
hierarchical === metricsAtAllLevels (unless someone knows of any reasons it should be ? )
in courier request handler vis.isHierarchical() is used to figure out if we need to build a request with metrics on every level. (or it was, and its now refactored to look at metricsAtAllLevels parameter). we should use this same parameter in tabify (to figure out the same thing) ...
and partialRows should be completely independent ... as its just removing rows where we don't have value for every column.
|
Pinging @elastic/kibana-app |
💔 Build Failed |
|
^^ seems to be a legit failure, looking into it in |
|
Next build should be green 🤞 |
💚 Build Succeeded |
|
I tested this and it looks good. |
|
Thanks for reviewing @trevan! Much appreciated |
There was a problem hiding this comment.
i think this introduces some more confusion with metricsAtAllLevels and isHierarchical ...
hierarchical === metricsAtAllLevels (unless someone knows of any reasons it should be ? )
in courier request handler vis.isHierarchical() is used to figure out if we need to build a request with metrics on every level. (or it was, and its now refactored to look at metricsAtAllLevels parameter). we should use this same parameter in tabify (to figure out the same thing) ...
and partialRows should be completely independent ... as its just removing rows where we don't have value for every column.
d032949 to
ab544ed
Compare
💚 Build Succeeded |
|
@ppisljar I renamed some of the params that are being passed around to reduce confusion. Rather than using the I moved the logic for checking the existence of The overall effect is the same, but hopefully this makes its purpose clearer so it doesn't get mixed up with EDIT: We also used to have a |
💔 Build Failed |
💔 Build Failed |
|
retest |
💔 Build Failed |
440d4f2 to
b999e66
Compare
|
retest |
💔 Build Failed |
💚 Build Succeeded |
snide
left a comment
There was a problem hiding this comment.
Don't know why we got pinged on this one. Normally it's if the Pr has Sass files. In any case, nothing looks off by me.
|
@timroes, it looks good |
💚 Build Succeeded |
Closes #22168
Summary
Resolves a regression where clicking
show partial rowson the data table vis would automatically render columns with metrics at all levels -- even if you didn't checkmetrics at all levels.Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.- [ ] This was checked for cross-browser compatibility, including a check against IE11- [ ] Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support- [ ] Documentation was added for features that require explanation or tutorials- [ ] This was checked for keyboard-only and screenreader accessibility