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

Saved queries new UI #8469

Merged
merged 18 commits into from
Oct 25, 2024
Merged

Conversation

amsiglan
Copy link
Collaborator

@amsiglan amsiglan commented Oct 3, 2024

Description

This PR updates the UI for saved queries to use Flyouts which give more surface to search and categorize the queries as well as introduce more options when saving them.

Screenshot

  • Saved queries action popup
image
  • Save query action item when clicked opens
image
  • Open query action item when clicked opens
image
  • Templates tab (Note: these queries cannot be deleted from UI)
image

Testing the changes

Tested change with local setup.

Changelog

  • feat: Enhances the saved query UX

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

codecov bot commented Oct 3, 2024

Codecov Report

Attention: Patch coverage is 7.04846% with 211 lines in your changes missing coverage. Please review.

Project coverage is 60.74%. Comparing base (9a25d0d) to head (2ea152b).
Report is 25 commits behind head on main.

Files with missing lines Patch % Lines
...lugins/data/public/ui/saved_query_form/helpers.tsx 0.00% 64 Missing ⚠️
...ui/saved_query_flyouts/open_saved_query_flyout.tsx 0.00% 63 Missing ⚠️
...public/ui/saved_query_flyouts/saved_query_card.tsx 0.00% 42 Missing ⚠️
...ry_management/saved_query_management_component.tsx 21.42% 10 Missing and 1 partial ⚠️
...ta/public/query/saved_query/saved_query_service.ts 56.25% 4 Missing and 3 partials ⚠️
...ublic/ui/saved_query_flyouts/save_query_flyout.tsx 0.00% 7 Missing ⚠️
...c/plugins/data/public/ui/search_bar/search_bar.tsx 0.00% 5 Missing ⚠️
...ugins/data/public/ui/filter_bar/filter_options.tsx 0.00% 2 Missing and 2 partials ⚠️
src/plugins/data/public/plugin.ts 0.00% 3 Missing ⚠️
...ata/public/ui/saved_query_form/save_query_form.tsx 0.00% 3 Missing ⚠️
... and 2 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8469      +/-   ##
==========================================
- Coverage   60.84%   60.74%   -0.11%     
==========================================
  Files        3793     3798       +5     
  Lines       90486    90650     +164     
  Branches    14212    14254      +42     
==========================================
+ Hits        55057    55062       +5     
- Misses      31939    32093     +154     
- Partials     3490     3495       +5     
Flag Coverage Δ
Linux_1 29.07% <8.69%> (-0.01%) ⬇️
Linux_2 56.39% <ø> (ø)
Linux_3 37.57% <7.04%> (-0.10%) ⬇️
Linux_4 29.83% <8.69%> (-0.01%) ⬇️
Windows_1 29.08% <8.69%> (-0.01%) ⬇️
Windows_2 56.35% <ø> (ø)
Windows_3 37.57% <7.04%> (-0.10%) ⬇️
Windows_4 29.83% <8.69%> (-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.

@amsiglan amsiglan force-pushed the saved-queries-new-UI branch from d437eee to 39f92ac Compare October 23, 2024 19:25
virajsanghvi
virajsanghvi previously approved these changes Oct 24, 2024
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.

I did not have time to pull this down to validate, and looks like there are still some more cases of text to be localized, but approving assuming that and unit tests will be followed up with.

@ananzh
Copy link
Member

ananzh commented Oct 24, 2024

So we have two places 1) click showFilterActions button and 2) the new three dot one to save queries? What is the purpose or usage pain to resolve for adding another save query? are we going to remove the old one to make the new one the only place to save query?

Screenshot 2024-10-24 at 12 53 34 PM

@amsiglan
Copy link
Collaborator Author

So we have two places 1) click showFilterActions button and 2) the new three dot one to save queries? What is the purpose or usage pain to resolve for adding another save query? are we going to remove the old one to make the new one the only place to save query?

Screenshot 2024-10-24 at 12 53 34 PM

We are replacing the old button in both the places, the one inside the filter options will also show the two options

  • Save query and Open query

@ananzh
Copy link
Member

ananzh commented Oct 24, 2024

So we have two places 1) click showFilterActions button and 2) the new three dot one to save queries? What is the purpose or usage pain to resolve for adding another save query? are we going to remove the old one to make the new one the only place to save query?
Screenshot 2024-10-24 at 12 53 34 PM

We are replacing the old button in both the places, the one inside the filter options will also show the two options

  • Save query and Open query

Got it. Haven't got time to review it in details, only verify the changes with query enhancement and MDS enabled. Since you have resolve multiple people's comments, I will approve to unblock. Will reach out to you there is any concerns in the future.

ananzh
ananzh previously approved these changes Oct 24, 2024
@kavilla kavilla added v2.19.0 and removed v2.18.0 labels Oct 24, 2024
Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>
@amsiglan amsiglan dismissed stale reviews from ananzh and virajsanghvi via 2ea152b October 24, 2024 23:19
@ashwin-pc
Copy link
Member

Rerunning CI Group 6 since the associated fix has been merged. Will merge once its passed

@ashwin-pc ashwin-pc merged commit 463a6c0 into opensearch-project:main Oct 25, 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-8469-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 463a6c03edcf25285924e84872754cc370cc0cf8
# Push it to GitHub
git push --set-upstream origin backport/backport-8469-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-8469-to-2.x.

amsiglan added a commit to amsiglan/OpenSearch-Dashboards that referenced this pull request Oct 25, 2024
* loading query functional

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

* search bar working; save working

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

* implemented pagination

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

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

* implemented tab for template queries; updated UI elements for new mocks

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

* added i18n; minor refactors

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

* refactored css

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

* addressed comments

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

* fixed i18n error

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

* show template queries tab only when templates present

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

* addressed PR comments

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

* fixed unit tests

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

* introduced a new gate for the changes

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

---------

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
ananzh pushed a commit that referenced this pull request Oct 25, 2024
* loading query functional



* search bar working; save working



* implemented pagination



* Changeset file for PR #8469 created/updated

* implemented tab for template queries; updated UI elements for new mocks



* added i18n; minor refactors



* refactored css



* addressed comments



* fixed i18n error



* show template queries tab only when templates present



* addressed PR comments



* fixed unit tests



* introduced a new gate for the changes



---------

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
Qxisylolo pushed a commit to Qxisylolo/OpenSearch-Dashboards that referenced this pull request Oct 30, 2024
* loading query functional

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

* search bar working; save working

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

* implemented pagination

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

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

* implemented tab for template queries; updated UI elements for new mocks

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

* added i18n; minor refactors

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

* refactored css

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

* addressed comments

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

* fixed i18n error

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

* show template queries tab only when templates present

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

* addressed PR comments

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

* fixed unit tests

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

* introduced a new gate for the changes

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

---------

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
@AMoo-Miki
Copy link
Collaborator

manual backport was merged into 2.x

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.

7 participants