-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[Index Management] Mappings empty state #231899
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
[Index Management] Mappings empty state #231899
Conversation
ElenaStoeva
left a comment
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.
Thanks for working on this @wildemat! It completelly makes sense to me to have the same empty state for all index pages in Kibana, but I'll first discuss it with the team to see if everyone is onboard - I added this to our next team sync-up agenda.
Also, I noticed that when Kibana is in High contrast mode, a weird border is being displayed - probably surrounding the component below the empty state promp:
|
I'm curious why Search Solution Index Management doesn't have the explanatory text. Not looking to debate it, just want to verify its been considered. |
mattkime
left a comment
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.
There are some relatively minor issues that myself and others have pointed out although it looks like its on the right track overall. I'll take another look when these have been addressed.
I'm not sure I remember why we removed it. I'm good keeping these consistent and showing it on the search views. |
|
But I think our empty state should be doing the job of this block, and only show the right sidebar block when there are mappings. I think we're aligned on that, but wanted to reiterate. |
New changes (diff):
Screenshots:Empty MappingsNon-Empty MappingsindexMappingEmptyState.movSummaryI attempted the conditional display of the extra help content here, but in the current plugin's architecture it may be too much scope to make that happen for now. As a compromise, the various versions of "About" and "Transform" content was consolidated into a single version in the index management mapping component. 2 of the alternate versions were from Search Content Connectors and Stack Mgmt Content Connectors. Both of which are being deprecated. Serverless Search had a different version as well, but it was never being displayed due to |
|
Note, the following data-test-subj items will be removed:
They can be replaced with: However, after grepping, I found no tests that used those |
seialkali
left a comment
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.
LGTM
💔 Build Failed
Failed CI StepsTest Failures
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
Page load bundle
History
|
mattkime
left a comment
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.
Looks good and works well in stack management/ index management
@elastic/kibana-management: I need your input on a display change to index mappings that affects the mapping pages within stack management. This is part of a larger effort to redesign and consolidate index management between search and stack management. See [[Epic][Design] Index Management Improvements](elastic/search-team#9365). ## Summary When a user has no index mappings, we'd like to show a minimalistic prompt ([design](elastic/search-team#9737)) for field creation: <kbd><img width="852" height="421" alt="Screenshot 2025-08-19 at 10 57 44 AM" src="https://github.com/user-attachments/assets/6977be6a-b8e6-4389-b475-c93c32d80a8c" /></kbd> #### There are 4 variations of the mappings tab (screenshots below): 1. Stack Management -> Index Management 2. Stack Management -> Content Connectors 3. Search Solution -> Index Management 4. Search Solution -> Content Connectors Within search, we'd like to just show the new empty prompt (`Add fields to your data...`) and hide the extra context items (`About index mappings...` and `Transform your searchable content`). I'd like to know if @elastic/kibana-management would like the same treatment, or if I should update this PR to only apply the empty state to search solution. We can also try a variation where the right-hand context items do not display in the empty state, but show up again when fields are added. The current state of this PR shows the empty state on every mappings tab, alongside whatever extra context items are already there. There is duplicated code across these various mappings displays. (see elastic#213509 for example). This PR isn't meant to solve that. However I think if we agree on a single version to show, it'll make that task easier. ## Changes * Leverage `EuiEmptyPrompt` to display a CTA to add a field * During field creation, if they have no saved fields yet, hide the "filter" bar and "list/json" buttons. Those don't provide helpful context until after fields exist. * Provide a link to mapping documentation * Added a few unit tests to verify the proper show/hide behavior of the empty prompt ## Screenshots ### Sample interaction: https://github.com/user-attachments/assets/03015f96-9b9d-404d-843b-02b5dfb78f4a ### Stack Management Index Management: #### path: `app/management/data/index_management/indices/index_details?indexName={indexName}&tab=mappings` <kbd> <img width="1487" height="815" alt="stack classic mgmt indexmgmt" src="https://github.com/user-attachments/assets/0808495f-4454-4fd9-9b38-92526899d936" /> </kbd> ### Stack Management Content Connectors: #### path: `app/management/data/content_connectors/connectors/{connectorID}/index_mappings` <kbd> <img width="1442" height="852" alt="stack classic mgmt connectors" src="https://github.com/user-attachments/assets/84ac974d-cfaa-45b5-82cd-69ce6ba2b4d0" /> </kbd> ### Search Solution Index Management: #### path: `search/app/elasticsearch/indices/index_details/{indexName}/mappings` <kbd> <img width="1492" height="687" alt="stack search indices" src="https://github.com/user-attachments/assets/07651902-d7e7-4455-b536-f3c2ac11a72e" /> </kbd> ### Search Solution Content Connectors: #### path: `search/app/elasticsearch/content/connectors/{connectorID}/index_mappings` <kbd> <img width="1476" height="789" alt="stack search connectors entsearch" src="https://github.com/user-attachments/assets/90a1aa5a-d19c-45f9-ade5-ce85507aef52" /> </kbd> ## Tests ```bash ➜ kibana git:(search/indices/mappings/empty-state) ✗ yarn test:jest \ 'x-pack/platform/plugins/shared/index_management/__jest__/client_integration/index_details_page/index_details_page.test.tsx' \ -t '\<IndexDetailsPage /\> Mappings tab' \ -c './x-pack/platform/plugins/shared/index_management/jest.config.js' \ --verbose=false yarn run v1.22.22 PASS x-pack/platform/plugins/shared/index_management/__jest__/client_integration/index_details_page/index_details_page.test.tsx (14.015 s) Test Suites: 1 passed, 1 total Tests: 63 skipped, 25 passed, 88 total Snapshots: 0 total Time: 14.332 s, estimated 15 s Ran all test suites matching /x-pack\/platform\/plugins\/shared\/index_management\/__jest__\/client_integration\/index_details_page\/index_details_page.test.tsx/i with tests matching "\<IndexDetailsPage /\> Mappings tab". debg CIStatsReporter committerHash: 85e34139f9a5740b9cd7 ✨ Done in 17.15s. ``` Closes elastic/search-team#9737 --------- Co-authored-by: kibanamachine <[email protected]>
@elastic/kibana-management: I need your input on a display change to index mappings that affects the mapping pages within stack management. This is part of a larger effort to redesign and consolidate index management between search and stack management. See [[Epic][Design] Index Management Improvements](elastic/search-team#9365). ## Summary When a user has no index mappings, we'd like to show a minimalistic prompt ([design](elastic/search-team#9737)) for field creation: <kbd><img width="852" height="421" alt="Screenshot 2025-08-19 at 10 57 44 AM" src="https://github.com/user-attachments/assets/6977be6a-b8e6-4389-b475-c93c32d80a8c" /></kbd> #### There are 4 variations of the mappings tab (screenshots below): 1. Stack Management -> Index Management 2. Stack Management -> Content Connectors 3. Search Solution -> Index Management 4. Search Solution -> Content Connectors Within search, we'd like to just show the new empty prompt (`Add fields to your data...`) and hide the extra context items (`About index mappings...` and `Transform your searchable content`). I'd like to know if @elastic/kibana-management would like the same treatment, or if I should update this PR to only apply the empty state to search solution. We can also try a variation where the right-hand context items do not display in the empty state, but show up again when fields are added. The current state of this PR shows the empty state on every mappings tab, alongside whatever extra context items are already there. There is duplicated code across these various mappings displays. (see #213509 for example). This PR isn't meant to solve that. However I think if we agree on a single version to show, it'll make that task easier. ## Changes * Leverage `EuiEmptyPrompt` to display a CTA to add a field * During field creation, if they have no saved fields yet, hide the "filter" bar and "list/json" buttons. Those don't provide helpful context until after fields exist. * Provide a link to mapping documentation * Added a few unit tests to verify the proper show/hide behavior of the empty prompt ## Screenshots ### Sample interaction: https://github.com/user-attachments/assets/03015f96-9b9d-404d-843b-02b5dfb78f4a ### Stack Management Index Management: #### path: `app/management/data/index_management/indices/index_details?indexName={indexName}&tab=mappings` <kbd> <img width="1487" height="815" alt="stack classic mgmt indexmgmt" src="https://github.com/user-attachments/assets/0808495f-4454-4fd9-9b38-92526899d936" /> </kbd> ### Stack Management Content Connectors: #### path: `app/management/data/content_connectors/connectors/{connectorID}/index_mappings` <kbd> <img width="1442" height="852" alt="stack classic mgmt connectors" src="https://github.com/user-attachments/assets/84ac974d-cfaa-45b5-82cd-69ce6ba2b4d0" /> </kbd> ### Search Solution Index Management: #### path: `search/app/elasticsearch/indices/index_details/{indexName}/mappings` <kbd> <img width="1492" height="687" alt="stack search indices" src="https://github.com/user-attachments/assets/07651902-d7e7-4455-b536-f3c2ac11a72e" /> </kbd> ### Search Solution Content Connectors: #### path: `search/app/elasticsearch/content/connectors/{connectorID}/index_mappings` <kbd> <img width="1476" height="789" alt="stack search connectors entsearch" src="https://github.com/user-attachments/assets/90a1aa5a-d19c-45f9-ade5-ce85507aef52" /> </kbd> ## Tests ```bash ➜ kibana git:(search/indices/mappings/empty-state) ✗ yarn test:jest \ 'x-pack/platform/plugins/shared/index_management/__jest__/client_integration/index_details_page/index_details_page.test.tsx' \ -t '\<IndexDetailsPage /\> Mappings tab' \ -c './x-pack/platform/plugins/shared/index_management/jest.config.js' \ --verbose=false yarn run v1.22.22 PASS x-pack/platform/plugins/shared/index_management/__jest__/client_integration/index_details_page/index_details_page.test.tsx (14.015 s) Test Suites: 1 passed, 1 total Tests: 63 skipped, 25 passed, 88 total Snapshots: 0 total Time: 14.332 s, estimated 15 s Ran all test suites matching /x-pack\/platform\/plugins\/shared\/index_management\/__jest__\/client_integration\/index_details_page\/index_details_page.test.tsx/i with tests matching "\<IndexDetailsPage /\> Mappings tab". debg CIStatsReporter committerHash: 85e34139f9a5740b9cd7 ✨ Done in 17.15s. ``` Closes elastic/search-team#9737 --------- Co-authored-by: kibanamachine <[email protected]>
@elastic/kibana-management: I need your input on a display change to index mappings that affects the mapping pages within stack management. This is part of a larger effort to redesign and consolidate index management between search and stack management. See [[Epic][Design] Index Management Improvements](elastic/search-team#9365). ## Summary When a user has no index mappings, we'd like to show a minimalistic prompt ([design](elastic/search-team#9737)) for field creation: <kbd><img width="852" height="421" alt="Screenshot 2025-08-19 at 10 57 44 AM" src="https://github.com/user-attachments/assets/6977be6a-b8e6-4389-b475-c93c32d80a8c" /></kbd> #### There are 4 variations of the mappings tab (screenshots below): 1. Stack Management -> Index Management 2. Stack Management -> Content Connectors 3. Search Solution -> Index Management 4. Search Solution -> Content Connectors Within search, we'd like to just show the new empty prompt (`Add fields to your data...`) and hide the extra context items (`About index mappings...` and `Transform your searchable content`). I'd like to know if @elastic/kibana-management would like the same treatment, or if I should update this PR to only apply the empty state to search solution. We can also try a variation where the right-hand context items do not display in the empty state, but show up again when fields are added. The current state of this PR shows the empty state on every mappings tab, alongside whatever extra context items are already there. There is duplicated code across these various mappings displays. (see elastic#213509 for example). This PR isn't meant to solve that. However I think if we agree on a single version to show, it'll make that task easier. ## Changes * Leverage `EuiEmptyPrompt` to display a CTA to add a field * During field creation, if they have no saved fields yet, hide the "filter" bar and "list/json" buttons. Those don't provide helpful context until after fields exist. * Provide a link to mapping documentation * Added a few unit tests to verify the proper show/hide behavior of the empty prompt ## Screenshots ### Sample interaction: https://github.com/user-attachments/assets/03015f96-9b9d-404d-843b-02b5dfb78f4a ### Stack Management Index Management: #### path: `app/management/data/index_management/indices/index_details?indexName={indexName}&tab=mappings` <kbd> <img width="1487" height="815" alt="stack classic mgmt indexmgmt" src="https://github.com/user-attachments/assets/0808495f-4454-4fd9-9b38-92526899d936" /> </kbd> ### Stack Management Content Connectors: #### path: `app/management/data/content_connectors/connectors/{connectorID}/index_mappings` <kbd> <img width="1442" height="852" alt="stack classic mgmt connectors" src="https://github.com/user-attachments/assets/84ac974d-cfaa-45b5-82cd-69ce6ba2b4d0" /> </kbd> ### Search Solution Index Management: #### path: `search/app/elasticsearch/indices/index_details/{indexName}/mappings` <kbd> <img width="1492" height="687" alt="stack search indices" src="https://github.com/user-attachments/assets/07651902-d7e7-4455-b536-f3c2ac11a72e" /> </kbd> ### Search Solution Content Connectors: #### path: `search/app/elasticsearch/content/connectors/{connectorID}/index_mappings` <kbd> <img width="1476" height="789" alt="stack search connectors entsearch" src="https://github.com/user-attachments/assets/90a1aa5a-d19c-45f9-ade5-ce85507aef52" /> </kbd> ## Tests ```bash ➜ kibana git:(search/indices/mappings/empty-state) ✗ yarn test:jest \ 'x-pack/platform/plugins/shared/index_management/__jest__/client_integration/index_details_page/index_details_page.test.tsx' \ -t '\<IndexDetailsPage /\> Mappings tab' \ -c './x-pack/platform/plugins/shared/index_management/jest.config.js' \ --verbose=false yarn run v1.22.22 PASS x-pack/platform/plugins/shared/index_management/__jest__/client_integration/index_details_page/index_details_page.test.tsx (14.015 s) Test Suites: 1 passed, 1 total Tests: 63 skipped, 25 passed, 88 total Snapshots: 0 total Time: 14.332 s, estimated 15 s Ran all test suites matching /x-pack\/platform\/plugins\/shared\/index_management\/__jest__\/client_integration\/index_details_page\/index_details_page.test.tsx/i with tests matching "\<IndexDetailsPage /\> Mappings tab". debg CIStatsReporter committerHash: 85e34139f9a5740b9cd7 ✨ Done in 17.15s. ``` Closes elastic/search-team#9737 --------- Co-authored-by: kibanamachine <[email protected]>





@elastic/kibana-management: I need your input on a display change to index mappings that affects the mapping pages within stack management.
This is part of a larger effort to redesign and consolidate index management between search and stack management. See [Epic][Design] Index Management Improvements.
Summary
When a user has no index mappings, we'd like to show a minimalistic prompt (design) for field creation:
There are 4 variations of the mappings tab (screenshots below):
Within search, we'd like to just show the new empty prompt (
Add fields to your data...) and hide the extra context items (About index mappings...andTransform your searchable content).I'd like to know if @elastic/kibana-management would like the same treatment, or if I should update this PR to only apply the empty state to search solution.
We can also try a variation where the right-hand context items do not display in the empty state, but show up again when fields are added.
The current state of this PR shows the empty state on every mappings tab, alongside whatever extra context items are already there.
There is duplicated code across these various mappings displays. (see #213509 for example). This PR isn't meant to solve that. However I think if we agree on a single version to show, it'll make that task easier.
Changes
EuiEmptyPromptto display a CTA to add a fieldScreenshots
Sample interaction:
indexmgmt.emptystate.mov
Stack Management Index Management:
path:
app/management/data/index_management/indices/index_details?indexName={indexName}&tab=mappingsStack Management Content Connectors:
path:
app/management/data/content_connectors/connectors/{connectorID}/index_mappingsSearch Solution Index Management:
path:
search/app/elasticsearch/indices/index_details/{indexName}/mappingsSearch Solution Content Connectors:
path:
search/app/elasticsearch/content/connectors/{connectorID}/index_mappingsTests
Closes https://github.com/elastic/search-team/issues/9737