KibanaContext in index pattern managment ui#66985
KibanaContext in index pattern managment ui#66985VladLasitsa merged 12 commits intoelastic:masterfrom
Conversation
|
Pinging @elastic/kibana-app-arch (Team:AppArch) |
726d5e3 to
280aa24
Compare
.../components/create_index_pattern_wizard/components/step_index_pattern/step_index_pattern.tsx
Outdated
Show resolved
Hide resolved
src/plugins/index_pattern_management/public/components/edit_index_pattern/tabs/tabs.tsx
Outdated
Show resolved
Hide resolved
.../components/create_index_pattern_wizard/components/step_index_pattern/step_index_pattern.tsx
Show resolved
Hide resolved
.../components/create_index_pattern_wizard/components/step_index_pattern/step_index_pattern.tsx
Outdated
Show resolved
Hide resolved
| export class StepIndexPattern extends Component<StepIndexPatternProps, StepIndexPatternState> { | ||
| static contextType = contextType; | ||
|
|
||
| declare readonly context: IndexPatternManagmentContextValue; |
There was a problem hiding this comment.
Nit, maybe it is more future-proof to use withKibana higher order component instead of this legacy context API.
export const StepIndexPattern = withKibana(StepIndexPatternPure);There was a problem hiding this comment.
Or useKibana hook
export const StepIndexPattern = props => {
const {services} = useKibana();
return <StepIndexPatternPure {...props} services={services} />;
};There was a problem hiding this comment.
I think it's just a different way to pass the context. I found out that we use both ways in the application. Regarding use Kibana hook, I used it for functional components.
|
overall the changes look good but this could use another pass to use |
…_index_pattern_managment_ui
|
@elasticmachine merge upstream |
|
@elasticmachine merge upstream |
|
@elasticmachine merge upstream |
|
@elasticmachine merge upstream |
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
* Using KibanaContext instead of passing dependencies. * Fixed comments * Delete index.scss * Added comment for workaround * Fixed tests * Fixed eslint Co-authored-by: Alexey Antonov <alexwizp@gmail.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Using KibanaContext instead of passing dependencies. * Fixed comments * Delete index.scss * Added comment for workaround * Fixed tests * Fixed eslint Co-authored-by: Alexey Antonov <alexwizp@gmail.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Alexey Antonov <alexwizp@gmail.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
…ine-editor * 'master' of github.com:elastic/kibana: (129 commits) [Canvas] Force embeddables to refresh when renderable reevaluated (#67133) [Canvas] Better handling navigating to/from canvas (#66407) [Ingest pipelines] Fix schema validation for simulate and update routes (#67199) do not use es from setup (#67277) Auto expand replicas for event log (#67286) Observability & APM do not use elasticsearch client provided via setup contract (#67263) Fix privileges check when security is not enabled (#67308) add IIS home (#66918) [ML] Adding additional job service endpoint tests (#66892) [Ingest Manager] Update fleet internal doc with latest flags (#67193) [Discover] Deangularize the loading spinner (#67165) Add `application.navigateToUrl` core API (#67110) Improve indexpattern without timefield functional test (#67031) KibanaContext in index pattern managment ui (#66985) Fix Azure metrics tutorial inside the App Home/ Add data area (#66901) add azure logs home (#66910) fix: rum agent should work correctly on new platform (#67037) [test_utils/Testbed] Move to src/test_utils folder (OSS) (#66898) only block registration when appRoute contains the exact basePath (#67125) Changed actions API endpoints urls to follow Kibana STYLEGUIDE (#65936) ... # Conflicts: # x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/pipeline_form_fields.tsx
Summary
Simplified component dependencies with KibanaContext