Skip to content

fix: vis editor empty state#11613

Merged
ruanyl merged 2 commits intoopensearch-project:mainfrom
ruanyl:fix-vis-editor-empty-state
Mar 31, 2026
Merged

fix: vis editor empty state#11613
ruanyl merged 2 commits intoopensearch-project:mainfrom
ruanyl:fix-vis-editor-empty-state

Conversation

@ruanyl
Copy link
Copy Markdown
Member

@ruanyl ruanyl commented Mar 27, 2026

Description

Use visualization editor specific empty state component instead of importing from legacy discover app

Issues Resolved

Screenshot

Testing the changes

Changelog

  • fix: vis editor should not import empty state component from legacy discover

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

@github-actions
Copy link
Copy Markdown
Contributor

❌ Entry Too Long

Entry is 102 characters long, which is 2 characters longer than the maximum allowed length of 100 characters. Please revise your entry to be within the maximum length.

@github-actions
Copy link
Copy Markdown
Contributor

Failed to generate code suggestions for PR

opensearch-changeset-bot bot added a commit to ruanyl/OpenSearch-Dashboards that referenced this pull request Mar 27, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Failed to generate code suggestions for PR

@ruanyl ruanyl changed the title Fix vis editor empty state fix: vis editor empty state Mar 27, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 27, 2026

✅ All unit and integration tests passing

🔗 Workflow run · commit a15cd46a3c6e4c0ef395fb7814b4ebd199ab0954

@ruanyl ruanyl force-pushed the fix-vis-editor-empty-state branch from d9ac633 to a15cd46 Compare March 30, 2026 02:56
@github-actions
Copy link
Copy Markdown
Contributor

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

🧪 No relevant tests
🔒 No security concerns identified
✅ No TODO sections
🔀 No multiple PR themes
⚡ Recommended focus areas for review

Unused Variable

The destructuring of queryBuilder from useQueryBuilderState() appears to be unused after the refactor. The onRefresh function that used queryBuilder.executeQuery() was removed, but queryBuilder is still being destructured. This may cause a lint warning or indicate dead code.

const { queryBuilder, queryEditorState } = useQueryBuilderState();
const queryStatus = queryEditorState.queryStatus;
Incomplete Message

The body message for no results ends abruptly: "Try adjusting your query, expanding the time range" — it appears to be an incomplete sentence (missing a period or continuation like "or filters").

  defaultMessage: 'Try adjusting your query, expanding the time range',
})}

@github-actions
Copy link
Copy Markdown
Contributor

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
General
Fix incomplete user-facing message text

The "no results" body message appears to be an incomplete sentence — it ends with
"expanding the time range" without a period or completing the thought (e.g., "or
filtering by different criteria"). This could confuse users about what actions they
can take.

src/plugins/explore/public/application/in_context_vis_editor/component/vis_editor_no_results.tsx [26]

-defaultMessage: 'Try adjusting your query, expanding the time range',
+defaultMessage: 'Try adjusting your query or expanding the time range.',
Suggestion importance[1-10]: 5

__

Why: The message "Try adjusting your query, expanding the time range" is indeed an incomplete sentence that could confuse users. The suggested fix makes it grammatically complete and clearer, improving UX quality.

Low

@ruanyl ruanyl merged commit e11799f into opensearch-project:main Mar 31, 2026
105 of 107 checks passed
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 31, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (7782a80) to head (a15cd46).
⚠️ Report is 30 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main   #11613       +/-   ##
===========================================
- Coverage   61.58%        0   -61.59%     
===========================================
  Files        4995        0     -4995     
  Lines      137542        0   -137542     
  Branches    23901        0    -23901     
===========================================
- Hits        84707        0    -84707     
+ Misses      46692        0    -46692     
+ Partials     6143        0     -6143     
Flag Coverage Δ
Linux_1 ?
Linux_2 ?
Linux_3 ?
Linux_4 ?
Linux_5 ?

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@opensearch-trigger-bot
Copy link
Copy Markdown
Contributor

The backport to 3.6 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-3.6 3.6
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch-Dashboards/backport-3.6
# Create a new branch
git switch --create backport/backport-11613-to-3.6
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 e11799fff92a9187c71c224d26f0c5203d793379
# Push it to GitHub
git push --set-upstream origin backport/backport-11613-to-3.6
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch-Dashboards/backport-3.6

Then, create a pull request where the base branch is 3.6 and the compare/head branch is backport/backport-11613-to-3.6.

ruanyl added a commit to ruanyl/OpenSearch-Dashboards that referenced this pull request Mar 31, 2026
* fix: visualization editor should not use empty state components from
legacy discover app

---------

Signed-off-by: Yulong Ruan <ruanyl@amazon.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
ruanyl added a commit that referenced this pull request Mar 31, 2026
* fix: visualization editor should not use empty state components from
legacy discover app

---------

Signed-off-by: Yulong Ruan <ruanyl@amazon.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
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.

3 participants