refactor attempt with extension service#3
Closed
wildemat wants to merge 3 commits intosearch/indices/mappings/empty-statefrom
Closed
refactor attempt with extension service#3wildemat wants to merge 3 commits intosearch/indices/mappings/empty-statefrom
wildemat wants to merge 3 commits intosearch/indices/mappings/empty-statefrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As part of adding index mapping empty state: PR
We want to conditionally hide the extra about/help text when there are no mappings.
To do this, we have to have the rendering of this content happen in the place that we know about whether or not mappings exist (only here: https://github.com/elastic/kibana/blob/db0b92448b751e3f8accee34f4e1cfe19309701d/x-pack/platform/plugins/shared/index_management/public/application/sections/home/index_list/details_page/details_page_mappings_content.tsx#L188)
That text is rendered in several places:
showAboutMappingsas false onIndexMappingComponentindexManagement?.extensionsServiceto populate the "Transform" sectionThis Draft PR is an attempt to consolidate some duplicated code. I tried adding to the Index Managment plugin's extension service. adding a method to set
AboutandExtracontent. Then all the users of the plugin could populate those items with just the unique text or link they want to use forAboutandExtra.This doesn't work because extension service cannot call the same method twice. When two plugins are loaded that depend on Index Management plugin, they both try to set that content and one fails.
Solutions: