Skip to content
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

[Manual backport 2.x] Improve Empty State Handling: Add No Index Patterns Panel with Data Selection in Discover View #8613 #8662

Closed
wants to merge 2 commits into from

Conversation

AMoo-Miki
Copy link
Collaborator

Cherry-picked commit 6659139 from #8613

To be rebased and merged only after #8661 is merged.

AMoo-Miki and others added 2 commits October 18, 2024 17:22
* Update Discover appearance

Signed-off-by: Miki <[email protected]>

* Changeset file for PR opensearch-project#8651 created/updated

---------

Signed-off-by: Miki <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>

(cherry picked from commit 17103ba)
Signed-off-by: Miki <[email protected]>
…election in Discover View (opensearch-project#8613)

* Improve Empty State Handling: Add No Index Patterns Panel with Data Selection in Discover View

This PR primarily addresses the scenario when no index patterns (general) is available in the Discover view.
Instead of redirecting users to the index management page, it introduces a new "No Index Patterns" panel.
This panel provides users with the option to open a data selector and add index patterns
directly from the Discover view, improving the user experience for new or empty deployments.

To achieve, we move the selectedDataset state from ConnectedDatasetSelector to the app container's
state management. This allows the AdvancedSelector, opened from the AppContainer, to update
the dataset state effectively. Key changes include:

* Implementing NoIndexPatternsPanel and AdvancedSelector components.
* Refactoring dataset state management in AppContainer and Sidebar.
* Modifying DiscoverCanvas to conditionally render NoIndexPatternsPanel.
* Updating ConnectedDatasetSelector to use shared state and dataset change handling.

Signed-off-by: Anan Zhuang <[email protected]>
Signed-off-by: Miki <[email protected]>

* Update design of no data selected

Signed-off-by: Miki <[email protected]>

* use i18n

Signed-off-by: Anan Zhuang <[email protected]>
Signed-off-by: Miki <[email protected]>

* fix comments

Signed-off-by: Anan Zhuang <[email protected]>

* Update design of no data selected

Signed-off-by: Miki <[email protected]>

* fix lint error

Signed-off-by: Anan Zhuang <[email protected]>

---------

Signed-off-by: Anan Zhuang <[email protected]>
Signed-off-by: Miki <[email protected]>
Co-authored-by: Miki <[email protected]>

(cherry picked from commit 6659139)
Signed-off-by: Miki <[email protected]>
Copy link
Contributor

❌ Invalid Changelog Heading

The '## Changelog' heading in your PR description is either missing or malformed. Please make sure that your PR description includes a '## Changelog' heading with proper spelling, capitalization, spacing, and Markdown syntax.

Copy link

codecov bot commented Oct 19, 2024

Codecov Report

Attention: Patch coverage is 22.77228% with 78 lines in your changes missing coverage. Please review.

Project coverage is 60.92%. Comparing base (dff25a9) to head (de2f5f6).
Report is 1 commits behind head on 2.x.

Files with missing lines Patch % Lines
...ublic/application/view_components/canvas/index.tsx 0.00% 28 Missing ⚠️
...a/public/ui/dataset_selector/advanced_selector.tsx 0.00% 14 Missing ⚠️
...lic/application/view_components/canvas/top_nav.tsx 9.09% 10 Missing ⚠️
...plication/components/top_nav/get_top_nav_links.tsx 0.00% 6 Missing ⚠️
...ta/public/ui/dataset_selector/dataset_selector.tsx 44.44% 4 Missing and 1 partial ⚠️
.../data_explorer/public/components/sidebar/index.tsx 58.33% 4 Missing and 1 partial ⚠️
...rns/index_patterns/ensure_default_index_pattern.ts 25.00% 3 Missing ⚠️
...ry/query_string/dataset_service/dataset_service.ts 0.00% 2 Missing ⚠️
.../plugins/data/public/ui/dataset_selector/index.tsx 75.00% 2 Missing ⚠️
...ugins/data/public/ui/filter_bar/filter_options.tsx 0.00% 0 Missing and 1 partial ⚠️
... and 2 more
Additional details and impacted files
@@            Coverage Diff             @@
##              2.x    #8662      +/-   ##
==========================================
- Coverage   60.95%   60.92%   -0.03%     
==========================================
  Files        3786     3787       +1     
  Lines       90212    90279      +67     
  Branches    14126    14147      +21     
==========================================
+ Hits        54988    55002      +14     
- Misses      31758    31810      +52     
- Partials     3466     3467       +1     
Flag Coverage Δ
Linux_1 29.03% <5.68%> (-0.10%) ⬇️
Linux_2 56.53% <0.00%> (-0.01%) ⬇️
Linux_3 37.72% <22.77%> (-0.02%) ⬇️
Linux_4 29.92% <7.69%> (-0.11%) ⬇️
Windows_1 29.04% <5.68%> (-0.10%) ⬇️
Windows_2 56.48% <0.00%> (-0.01%) ⬇️
Windows_3 37.72% <22.77%> (-0.03%) ⬇️
Windows_4 29.92% <7.69%> (-0.11%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@AMoo-Miki
Copy link
Collaborator Author

Combined in #8663

@AMoo-Miki AMoo-Miki closed this Oct 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants