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

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

Merged
merged 6 commits into from
Oct 18, 2024

Conversation

ananzh
Copy link
Member

@ananzh ananzh commented Oct 16, 2024

Description

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.

Issues Resolved

NA

Screenshot

  • when query enhancement is on
2024-10-18_07-29-38.mp4
  • same behavior in the legacy discover
2024-10-18_08-32-29.copy.mp4

Testing the changes

Changelog

  • skip

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

Copy link
Contributor

❌ Empty Changelog Section

The Changelog section in your PR description is empty. Please add a valid changelog entry or entries. If you did add a changelog entry, check to make sure that it was not accidentally included inside the comment block in the Changelog section.

Copy link

codecov bot commented Oct 16, 2024

Codecov Report

Attention: Patch coverage is 15.47619% with 71 lines in your changes missing coverage. Please review.

Project coverage is 60.85%. Comparing base (6379548) to head (4003d15).
Report is 3 commits behind head on main.

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 ⚠️
...rns/index_patterns/ensure_default_index_pattern.ts 25.00% 3 Missing ⚠️
...ta/public/ui/dataset_selector/dataset_selector.tsx 0.00% 3 Missing ⚠️
...ry/query_string/dataset_service/dataset_service.ts 0.00% 2 Missing ⚠️
.../data_explorer/public/components/sidebar/index.tsx 75.00% 2 Missing ⚠️
.../plugins/data/public/ui/dataset_selector/index.tsx 50.00% 1 Missing ⚠️
...c/ui/no_index_patterns/no_index_patterns_panel.tsx 50.00% 1 Missing ⚠️
... and 1 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8613      +/-   ##
==========================================
- Coverage   60.89%   60.85%   -0.04%     
==========================================
  Files        3790     3791       +1     
  Lines       90267    90344      +77     
  Branches    14154    14176      +22     
==========================================
+ Hits        54964    54983      +19     
- Misses      31829    31888      +59     
+ Partials     3474     3473       -1     
Flag Coverage Δ
Linux_1 29.09% <3.94%> (-0.03%) ⬇️
Linux_2 56.39% <0.00%> (-0.01%) ⬇️
Linux_3 37.69% <15.47%> (-0.03%) ⬇️
Linux_4 29.80% <3.70%> (-0.02%) ⬇️
Windows_1 29.11% <3.94%> (-0.03%) ⬇️
Windows_2 56.34% <0.00%> (-0.01%) ⬇️
Windows_3 37.69% <15.47%> (-0.03%) ⬇️
Windows_4 29.80% <3.70%> (-0.01%) ⬇️

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.

@ananzh ananzh force-pushed the handle-no-idx-1 branch 5 times, most recently from 1c6001b to c8b9dc8 Compare October 18, 2024 14:43
@ananzh ananzh changed the title [Draft]Handle no index pattern in data set and empty data set Improve Empty State Handling: Add No Index Patterns Panel with Data Selection in Discover View Oct 18, 2024
Copy link
Contributor

❌ Empty Changelog Section

The Changelog section in your PR description is empty. Please add a valid changelog entry or entries. If you did add a changelog entry, check to make sure that it was not accidentally included inside the comment block in the Changelog section.

@github-actions github-actions bot added Skip-Changelog PRs that are too trivial to warrant a changelog or release notes entry and removed failed changeset labels Oct 18, 2024
@ananzh ananzh force-pushed the handle-no-idx-1 branch 2 times, most recently from 1b5b7de to 9927f13 Compare October 18, 2024 15:16
@ananzh ananzh marked this pull request as ready for review October 18, 2024 15:17
ananzh and others added 2 commits October 18, 2024 11:57
Signed-off-by: Anan Zhuang <ananzh@amazon.com>
Signed-off-by: Miki <miki@amazon.com>
Comment on lines +174 to +175
hasBorder={hasNoDataset ? false : true}
color={hasNoDataset ? 'transparent' : 'plain'}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are more conditions that will be added here in a subsequent PR

AMoo-Miki
AMoo-Miki previously approved these changes Oct 18, 2024
@virajsanghvi
Copy link
Collaborator

note: looks like there are lint failures - not sure if it'll block things downstream

@AMoo-Miki
Copy link
Collaborator

Thanks Viraj. i will deal with them.

Signed-off-by: Anan Zhuang <ananzh@amazon.com>
Copy link
Collaborator

@virajsanghvi virajsanghvi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor comments, not blocking

@@ -62,7 +67,8 @@ export const createEnsureDefaultIndexPattern = (
defaultId = patterns[0];
await uiSettings.set('defaultIndex', defaultId);
} else {
return onRedirectNoIndexPattern();
if (shouldRedirect) return onRedirectNoIndexPattern();
else return;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: is the else necessary?

src/plugins/data/public/ui/_common.scss Show resolved Hide resolved
<Configurator
baseDataset={selectedDataset}
baseDataset={currentSelectedDataset}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the difference between selectedDataset and currentSelectedDataset? Are there more accurate names?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1. I think this might be causing some incorrect states on my local

setSelectedDataset(dataset);
setIndexPattern(dataset.id);
setCurrentSelectedDataset(dataset);
if (direct) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: what does "direct" imply? mostly just a comment I don't know what to expect from the argument name

return (
<EuiPanel
panelRef={panelRef}
hasBorder={true}
hasBorder={hasNoDataset ? false : true}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: !hasNodataSet

@AMoo-Miki AMoo-Miki merged commit 6659139 into opensearch-project:main Oct 18, 2024
67 of 68 checks passed
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch-Dashboards/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch-Dashboards/backport-2.x
# Create a new branch
git switch --create backport/backport-8613-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 66591391f631400ec6825c7b6e09659aa0760a5d
# Push it to GitHub
git push --set-upstream origin backport/backport-8613-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch-Dashboards/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-8613-to-2.x.


export const Configurator = ({
baseDataset,
onConfirm,
onCancel,
onPrevious,
queryService,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how come ? getQueryService should have be a singleton

import { IDataPluginServices } from '../../types';

export const AdvancedSelector = ({
services,
onSelect,
onCancel,
selectedDataset,
setSelectedDataset,
setIndexPattern,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ideally index pattern is a subset of datasets types. so it's little bit confusing to have a registered data type of Index Patterns here https://github.com/opensearch-project/OpenSearch-Dashboards/blob/main/src/plugins/data/public/query/query_string/dataset_service/lib/index_pattern_type.ts. so ideally datasets selector shouldn't need to care about index patterns

AMoo-Miki added a commit to AMoo-Miki/OpenSearch-Dashboards that referenced this pull request Oct 19, 2024
…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 <ananzh@amazon.com>
Signed-off-by: Miki <miki@amazon.com>

* Update design of no data selected

Signed-off-by: Miki <miki@amazon.com>

* use i18n

Signed-off-by: Anan Zhuang <ananzh@amazon.com>
Signed-off-by: Miki <miki@amazon.com>

* fix comments

Signed-off-by: Anan Zhuang <ananzh@amazon.com>

* Update design of no data selected

Signed-off-by: Miki <miki@amazon.com>

* fix lint error

Signed-off-by: Anan Zhuang <ananzh@amazon.com>

---------

Signed-off-by: Anan Zhuang <ananzh@amazon.com>
Signed-off-by: Miki <miki@amazon.com>
Co-authored-by: Miki <miki@amazon.com>

(cherry picked from commit 6659139)
Signed-off-by: Miki <miki@amazon.com>
amsiglan pushed a commit to amsiglan/OpenSearch-Dashboards that referenced this pull request Oct 19, 2024
…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 <ananzh@amazon.com>
Signed-off-by: Miki <miki@amazon.com>

* Update design of no data selected

Signed-off-by: Miki <miki@amazon.com>

* use i18n

Signed-off-by: Anan Zhuang <ananzh@amazon.com>
Signed-off-by: Miki <miki@amazon.com>

* fix comments

Signed-off-by: Anan Zhuang <ananzh@amazon.com>

* Update design of no data selected

Signed-off-by: Miki <miki@amazon.com>

* fix lint error

Signed-off-by: Anan Zhuang <ananzh@amazon.com>

---------

Signed-off-by: Anan Zhuang <ananzh@amazon.com>
Signed-off-by: Miki <miki@amazon.com>
Co-authored-by: Miki <miki@amazon.com>
AMoo-Miki added a commit that referenced this pull request Oct 19, 2024
…o Results Page #8616  (#8663)

* Update Discover appearance (#8651)

* Update Discover appearance

Signed-off-by: Miki <miki@amazon.com>

* Changeset file for PR #8651 created/updated

---------

Signed-off-by: Miki <miki@amazon.com>
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 <miki@amazon.com>

* Improve Empty State Handling: Add No Index Patterns Panel with Data Selection in Discover View (#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 <ananzh@amazon.com>
Signed-off-by: Miki <miki@amazon.com>

* Update design of no data selected

Signed-off-by: Miki <miki@amazon.com>

* use i18n

Signed-off-by: Anan Zhuang <ananzh@amazon.com>
Signed-off-by: Miki <miki@amazon.com>

* fix comments

Signed-off-by: Anan Zhuang <ananzh@amazon.com>

* Update design of no data selected

Signed-off-by: Miki <miki@amazon.com>

* fix lint error

Signed-off-by: Anan Zhuang <ananzh@amazon.com>

---------

Signed-off-by: Anan Zhuang <ananzh@amazon.com>
Signed-off-by: Miki <miki@amazon.com>
Co-authored-by: Miki <miki@amazon.com>

(cherry picked from commit 6659139)
Signed-off-by: Miki <miki@amazon.com>

* [Discover]Sample Queries and Saved Queries in No Results Page (#8616)

* Sample Queries and Saved Queries in No Results Page

Signed-off-by: Sean Li <lnse@amazon.com>
Signed-off-by: Miki <miki@amazon.com>

* Changeset file for PR #8616 created/updated

* Update styling

Signed-off-by: Miki <miki@amazon.com>

---------

Signed-off-by: Sean Li <lnse@amazon.com>
Signed-off-by: Miki <miki@amazon.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
Co-authored-by: Miki <miki@amazon.com>
(cherry picked from commit 9da1b77)

---------

Signed-off-by: Miki <miki@amazon.com>
Signed-off-by: Anan Zhuang <ananzh@amazon.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
Co-authored-by: Anan Zhuang <ananzh@amazon.com>
Co-authored-by: Sean Li <lnse@amazon.com>
AMoo-Miki pushed a commit to AMoo-Miki/OpenSearch-Dashboards that referenced this pull request Oct 19, 2024
Also:
* Fix some React errors

Signed-off-by: Miki <miki@amazon.com>

---------

Fix random big number during loading in query editor result (opensearch-project#8650)

* Fix random big number during loading in query editor result

Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com>

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

* Fix initial loading number

Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com>
(cherry picked from commit a7414f0)

---------

[bug] address different issues with dataset selector (opensearch-project#8665)

* [bug] address some issues with dataset selector

Moved the dataset selector back to the search bar and access it by ref in the sidebar.

Avoid out of sync issue.
* update the logic for ensuring index pattern
* dont add ability to open button
* empty state but missing data set selector button
* fix tests
* add back styling

Signed-off-by: Kawika Avilla <kavilla414@gmail.com>
(cherry picked from commit e23f332)

---------

[bug] Discover UI stuck on searching after deleting index pattern (opensearch-project#8659)

* [bug] Discover UI stuck on searching after deleting index pattern

When using Discover with query enhancement enabled, deleting an index pattern from Index Management does not properly update the "Recently selected data" list in Discover. This causes the UI to become stuck in a "Searching" state when attempting to use
Discover after deleting an index pattern.

Handle the error case where the use index patterns hook caught error when
enhancements was enabled.

issue resolved:
opensearch-project#8612

(cherry picked from commit 4808094)

---------

[Discover]Sample Queries and Saved Queries in No Results Page (opensearch-project#8616)

* Sample Queries and Saved Queries in No Results Page

Signed-off-by: Sean Li <lnse@amazon.com>
Signed-off-by: Miki <miki@amazon.com>

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

* Update styling

Signed-off-by: Miki <miki@amazon.com>

(cherry picked from commit 9da1b77)

---------

Improve Empty State Handling: Add No Index Patterns Panel with Data Selection 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.

* Update design of no data selected
* use i18n
* fix comments
* Update design of no data selected
* fix lint error

Signed-off-by: Anan Zhuang <ananzh@amazon.com>

(cherry picked from commit 6659139)

---------

Update Discover appearance (opensearch-project#8651)

* Update Discover appearance

Signed-off-by: Miki <miki@amazon.com>

(cherry picked from commit 17103ba)

---------

Move DatasetSelector from data plugin queryString comp to DataExplorer (opensearch-project#8598)

* Move DatasetSelector to DataExplorer
* Style Disover after moving DatasetSelector to DataExplorer
* fix the test by adding the getUpdates$ method to the mock queryString object

Signed-off-by: Anan Zhuang <ananzh@amazon.com>

(cherry picked from commit 923cce8)
@AMoo-Miki
Copy link
Collaborator

Manually backported to 2.x with #8670

ashwin-pc pushed a commit to ashwin-pc/OpenSearch-Dashboards that referenced this pull request Oct 19, 2024
…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 <ananzh@amazon.com>
Signed-off-by: Miki <miki@amazon.com>

* Update design of no data selected

Signed-off-by: Miki <miki@amazon.com>

* use i18n

Signed-off-by: Anan Zhuang <ananzh@amazon.com>
Signed-off-by: Miki <miki@amazon.com>

* fix comments

Signed-off-by: Anan Zhuang <ananzh@amazon.com>

* Update design of no data selected

Signed-off-by: Miki <miki@amazon.com>

* fix lint error

Signed-off-by: Anan Zhuang <ananzh@amazon.com>

---------

Signed-off-by: Anan Zhuang <ananzh@amazon.com>
Signed-off-by: Miki <miki@amazon.com>
Co-authored-by: Miki <miki@amazon.com>
sejli pushed a commit to sejli/OpenSearch-Dashboards that referenced this pull request Oct 21, 2024
…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 <ananzh@amazon.com>
Signed-off-by: Miki <miki@amazon.com>

* Update design of no data selected

Signed-off-by: Miki <miki@amazon.com>

* use i18n

Signed-off-by: Anan Zhuang <ananzh@amazon.com>
Signed-off-by: Miki <miki@amazon.com>

* fix comments

Signed-off-by: Anan Zhuang <ananzh@amazon.com>

* Update design of no data selected

Signed-off-by: Miki <miki@amazon.com>

* fix lint error

Signed-off-by: Anan Zhuang <ananzh@amazon.com>

---------

Signed-off-by: Anan Zhuang <ananzh@amazon.com>
Signed-off-by: Miki <miki@amazon.com>
Co-authored-by: Miki <miki@amazon.com>
ruanyl pushed a commit that referenced this pull request Oct 22, 2024
…, #8650, #8668  (#8670)

* Fix No data selected appearance (#8668)

Also:
* Fix some React errors

Signed-off-by: Miki <miki@amazon.com>

---------

Fix random big number during loading in query editor result (#8650)

* Fix random big number during loading in query editor result

Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com>

* Changeset file for PR #8650 created/updated

* Fix initial loading number

Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com>
(cherry picked from commit a7414f0)

---------

[bug] address different issues with dataset selector (#8665)

* [bug] address some issues with dataset selector

Moved the dataset selector back to the search bar and access it by ref in the sidebar.

Avoid out of sync issue.
* update the logic for ensuring index pattern
* dont add ability to open button
* empty state but missing data set selector button
* fix tests
* add back styling

Signed-off-by: Kawika Avilla <kavilla414@gmail.com>
(cherry picked from commit e23f332)

---------

[bug] Discover UI stuck on searching after deleting index pattern (#8659)

* [bug] Discover UI stuck on searching after deleting index pattern

When using Discover with query enhancement enabled, deleting an index pattern from Index Management does not properly update the "Recently selected data" list in Discover. This causes the UI to become stuck in a "Searching" state when attempting to use
Discover after deleting an index pattern.

Handle the error case where the use index patterns hook caught error when
enhancements was enabled.

issue resolved:
#8612

(cherry picked from commit 4808094)

---------

[Discover]Sample Queries and Saved Queries in No Results Page (#8616)

* Sample Queries and Saved Queries in No Results Page

Signed-off-by: Sean Li <lnse@amazon.com>
Signed-off-by: Miki <miki@amazon.com>

* Changeset file for PR #8616 created/updated

* Update styling

Signed-off-by: Miki <miki@amazon.com>

(cherry picked from commit 9da1b77)

---------

Improve Empty State Handling: Add No Index Patterns Panel with Data Selection in Discover View (#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.

* Update design of no data selected
* use i18n
* fix comments
* Update design of no data selected
* fix lint error

Signed-off-by: Anan Zhuang <ananzh@amazon.com>

(cherry picked from commit 6659139)

---------

Update Discover appearance (#8651)

* Update Discover appearance

Signed-off-by: Miki <miki@amazon.com>

(cherry picked from commit 17103ba)

---------

Move DatasetSelector from data plugin queryString comp to DataExplorer (#8598)

* Move DatasetSelector to DataExplorer
* Style Disover after moving DatasetSelector to DataExplorer
* fix the test by adding the getUpdates$ method to the mock queryString object

Signed-off-by: Anan Zhuang <ananzh@amazon.com>

(cherry picked from commit 923cce8)

* Resolve merge errors from manual backports

Signed-off-by: Miki <miki@amazon.com>

---------

Signed-off-by: Miki <miki@amazon.com>
Co-authored-by: Anan Zhuang <ananzh@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discover for discover reinvent discover-next distinguished-contributor Skip-Changelog PRs that are too trivial to warrant a changelog or release notes entry v2.18.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants