moving visualize/utils to new platform#56650
Conversation
|
Pinging @elastic/kibana-app-arch (Team:AppArch) |
bcf388c to
0b4f53e
Compare
lukeelmers
left a comment
There was a problem hiding this comment.
All LGTM, most of my notes are just around conflicts with #56353. Depending on which merges first, we'll need to update the other PR accordingly.
There was a problem hiding this comment.
You may be able to get rid of as any with !, or by doing if (mapping)
| return npStart.plugins.data.fieldFormats.deserialize(mapping as any); | |
| return mapping ? npStart.plugins.data.fieldFormats.deserialize(mapping) : undefined; |
...or:
| return npStart.plugins.data.fieldFormats.deserialize(mapping as any); | |
| return npStart.plugins.data.fieldFormats.deserialize(mapping!); |
There was a problem hiding this comment.
nit: I'm adding IAggConfig in #56353, so if that merges first, it would be preferable to use it here instead.
There was a problem hiding this comment.
These will also break when #56353 merges; the BWC for imports from agg_types only supports imports from the top level ui/agg_types:
import {
convertDateRangeToString,
DateRangeKey,
convertIPRangeToString,
IpRangeKey,
} from 'ui/agg_types';There was a problem hiding this comment.
Same note re: IAggConfig
5e35f04 to
42bde92
Compare
|
@elasticmachine merge upstream |
353584e to
7e3d5e4
Compare
|
@elasticmachine merge upstream |
347f059 to
693c2dc
Compare
There was a problem hiding this comment.
There should be no legacy imports within the vis types, please re-export those via legacy_imports (same with the type import a little further up). I'm currently working on a separate PR that will break on these changes.
There was a problem hiding this comment.
Should we re-export this from the top level of the data plugin?
|
Also expect breakage on #56975 🙄 |
There was a problem hiding this comment.
Isn't this the same as the TimeRange type?
There was a problem hiding this comment.
And convertDateRangeToString looks like a function that could be exported as a utility from data/public/index, taking in a TimeRange and returning a string
There was a problem hiding this comment.
public deserialize: Function ?
There was a problem hiding this comment.
I removed this file and changed the way we export utils here #56975
# Conflicts: # src/legacy/core_plugins/vis_type_vislib/public/legacy_imports.ts # src/plugins/data/public/index.ts
flash1293
left a comment
There was a problem hiding this comment.
Kibana app changes LGTM
This reverts commit 3d3cbfa
|
@elasticmachine merge upstream |
There was a problem hiding this comment.
The input is not being used here?
src/plugins/data/public/index.ts
Outdated
There was a problem hiding this comment.
No need to export this I think
Use DataPluginPublicStart['fieldFormats'] where needed
d5cca21 to
4554631
Compare
|
@elasticmachine merge upstream |
1 similar comment
|
@elasticmachine merge upstream |
# Conflicts: # x-pack/plugins/translations/translations/ja-JP.json # x-pack/plugins/translations/translations/zh-CN.json
55336d3 to
2c5581e
Compare
|
@elasticmachine merge upstream |
💛 Build succeeded, but was flaky
Test FailuresKibana Pipeline / kibana-xpack-agent / Chrome X-Pack UI Functional Tests.x-pack/test/functional/apps/visualize/feature_controls/visualize_spaces·ts.Visualize visualize space with no features disabled can view existing VisualizationStandard OutStack TraceHistory
To update your PR or re-run it, just comment with: |
# Conflicts: # x-pack/plugins/translations/translations/ja-JP.json # x-pack/plugins/translations/translations/zh-CN.json
…re/files-and-filetree * 'master' of github.com:elastic/kibana: (139 commits) Move Ace XJSON lexer-rules, worker and utils to es_ui_shared (elastic#57563) [Upgrade Assistant] Fix filter deprecations search filter (elastic#57541) [ML] New Platform server shim: update indices routes (elastic#57685) Bump redux dependencies (elastic#53348) [Index management] Client-side NP ready (elastic#57295) change id of x-pack event_log plugin to eventLog (elastic#57612) [eventLog] get kibana.index name from config instead of hard-coding it (elastic#57607) revert allow using any path to generate fixes ui titles (elastic#57535) Fix login redirect for expired sessions (elastic#57157) Expose Vis on the contract as it requires visTypes (elastic#56968) [SIEM][Detection Engine] Fixes queries to ignore errors when signals index is not present [Remote clusters] Migrate client-side code out of legacy (elastic#57365) Fix failed test reporter for SIEM Cypress use (elastic#57240) skip flaky suite (elastic#45244) update chromedriver to 80.0.1 (elastic#57602) change slack action to only report on whitelisted host name (elastic#57582) [kbn/optimizer] throw errors into stream on invalid completion (elastic#57735) moving visualize/utils to new platform (elastic#56650) ...
Summary
moves utils related to fieldFormatters to data/fieldFormatters and moves getTableAggs to vislib legend (last place its used)
Dev Docs
if you are importing
FormatFactory, getFormat or createFormatfromui/visualize/utilitiesyou should upgrade to importing the new platform version of those:
getFormatusenpStart.plugins.data.fieldFormats.deserialize()createFormat(renamed toserialize) and FormatFactory type: