-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
removing kibana_datatable in favor of
datatable`
#75184
Conversation
Pinging @elastic/kibana-app-arch (Team:AppArch) |
2e505f2
to
54d856d
Compare
5d54df4
to
972a2bc
Compare
dbd57f4
to
c44c509
Compare
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.
Finished a full pass, overall LGTM other than the skipped tests, which I assume were just for debugging
src/plugins/data/public/actions/filters/create_filters_from_value_click.ts
Show resolved
Hide resolved
c44c509
to
9453941
Compare
Fixed the latest merge conflicts |
d609c64
to
03ca92a
Compare
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.
I mostly went through the Lens part of the code. All of the changes look good to me but I'm not 100% happy with the solution of putting the format hint into meta.params
like that - there is no indication this object is allowed to be used like that on the datatable level, right? How is it meant to be used? I'm sure there is some issue describing it, but it would be really to helpful to have that as a comment on the data table types - this is an extremely central type for us and with meta and params and sourceParams and so on I don't think it's intuitive anymore what it's doing. We should document this as well as possible
I fixed a unit test here
7e827bd
And updated snapshots here
03ca92a
There was one failure in the functional tests, not sure whether it's real or not.
@@ -14,8 +14,7 @@ export const desanitizeFilterContext = ( | |||
const emptyTextValue = i18n.translate('xpack.lens.indexpattern.emptyTextColumnValue', { | |||
defaultMessage: '(empty)', | |||
}); | |||
return { | |||
...context, |
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.
What's wrong with spreading the context in here?
@ppisljar I got that test failure locally as well - something is not triggered right on invalid data rendering. Could you take a look at that one? |
# Conflicts: # src/plugins/vis_type_table/public/table_vis_fn.ts
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.
Noticed a regression in Lens data table
@@ -105,8 +140,7 @@ describe('datatable_expression', () => { | |||
value: 'shoes', | |||
}, | |||
], | |||
negate: true, |
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.
This is indicating a real bug - the value should be filtered out but instead it's only filtering for this value.
To reproduce:
- Go to Lens
- Create data table
- Filter out value (clicking on the "-" button appearing when hovering over a cell)
- Filter gets created filtering only for that value
@@ -14,8 +14,7 @@ export const desanitizeFilterContext = ( | |||
const emptyTextValue = i18n.translate('xpack.lens.indexpattern.emptyTextColumnValue', { | |||
defaultMessage: '(empty)', | |||
}); |
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.
@ppisljar The bug in the data table is very likely related to this change - as the rest of the context isn't spreaded anymore, negate
is lost.
type IconType = 'string' | 'number' | 'date' | 'boolean' | 'null'; | ||
|
||
const getIcon = (type: IconType) => { | ||
const getIcon = (type: DatatableColumnType | null) => { |
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.
i think this is the only change relevant to @elastic/kibana-canvas
8864959
to
df06935
Compare
💚 Build SucceededMetrics [docs]@kbn/optimizer bundle module count
async chunks size
distributable file count
page load bundle size
History
To update your PR or re-run it, just comment with: |
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.
Tested in Chrome and Lens parts LGTM - left one nit, but not a blocker
@@ -106,7 +141,7 @@ describe('datatable_expression', () => { | |||
}, | |||
], | |||
negate: true, | |||
timeFieldName: undefined, | |||
timeFieldName: 'a', |
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.
This doesn't look correct - a
is a string field but it ends up as the "timeFieldName".
Seems like the logic here https://github.com/elastic/kibana/pull/75184/files#diff-9579ca4b06d409542e1c027008518abe610abdd3bf7a3b897f408fec7a324e44R177 is flawed. Not blocking this PR as it doesn't seem like it got introduced here, but we should probably fix it.
@@ -36,4 +36,8 @@ export const desanitizeFilterContext = ( | |||
: point | |||
), | |||
}; | |||
if (context.timeFieldName) { |
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.
Do we still need this? seems like the spread takes care of 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.
Canvas changes look fine 👍
@ppisljar sorry, needed to revert this as it includes port numbers in snapshots that change based on different deployment scenarios: https://kibana-ci.elastic.co/job/elastic+kibana+master/8872/execution/node/462/log/ |
…otphase-to-formlib * 'master' of github.com:elastic/kibana: (59 commits) [Security Solution][Resolver] Replace copy-to-clipboard with native navigator.clipboard (elastic#80193) [Security Solution] Reduce initial bundle size (elastic#78992) [Security Solution][Resolver] Fix Resize node box-shadow bug (elastic#80223) Move observability content (elastic#79978) skip flaky suite (elastic#79389) removing kibana_datatable` in favor of `datatable` (elastic#75184) [ML] Fixes for anomaly swim lane (elastic#80299) [Lens] Smokescreen lens test unskip (elastic#80190) Improved AlertsClient tests structure by splitting a huge alerts_client.tests.ts file into a specific files defined by its responsibility. (elastic#80088) [APM] React key warning when opening popover with external resources (elastic#80328) [Step 1] use Observables on server search API (elastic#79874) Apply back pressure in Task Manager whenever Elasticsearch responds with a 429 (elastic#75666) [Lens] Leverage original http request error (elastic#79831) [Security Solution][Case] Improve ServiceConnectorCaseParams type (elastic#80109) [SECURITY_SOLUTION] Fix query on alert histogram (elastic#80219) [DOCS] Update ingest node pipelines doc (elastic#79187) [Ingest Manager] Split up OpenAPI spec file (elastic#80107) [SECURITY_SOLUTION][ENDPOINT] Fix label on Trusted App create name field (elastic#80001) [Ingest Manager] Fix agent policy bump revision to create only one POLICY_CHANGE action (elastic#80081) Grid layout fixes (elastic#80305) ... # Conflicts: # x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/components/phases/shared/data_tier_allocation_field.tsx # x-pack/plugins/index_lifecycle_management/public/shared_imports.ts
Summary
Removes
kibana_datatable
and makes all expression functions/renderers use same format ofdatatable
followup:
Checklist
Delete any items that are not applicable to this PR.
For maintainers