[Discover] Add Footer Bar for Single Line Editor#8565
[Discover] Add Footer Bar for Single Line Editor#8565virajsanghvi merged 9 commits intoopensearch-project:mainfrom
Conversation
❌ Empty Changelog SectionThe 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. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8565 +/- ##
==========================================
- Coverage 60.86% 60.86% -0.01%
==========================================
Files 3793 3793
Lines 90447 90480 +33
Branches 14203 14209 +6
==========================================
+ Hits 55053 55069 +16
- Misses 31906 31922 +16
- Partials 3488 3489 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Signed-off-by: Sean Li <lnse@amazon.com>
Signed-off-by: Sean Li <lnse@amazon.com>
Signed-off-by: Sean Li <lnse@amazon.com>
Signed-off-by: Sean Li <lnse@amazon.com>
This reverts commit 64b5969.
Signed-off-by: Sean Li <lnse@amazon.com>
| } | ||
| } | ||
|
|
||
| .queryEditor__footer { |
|
|
||
| .euiFormControlLayout--group .osdQuerEditor__singleLine .euiText { | ||
| background-color: unset !important; | ||
| line-height: 21px !important; |
There was a problem hiding this comment.
Discover as a whole has a lot of overrides. This was an accepted deviation given the timelines. we will need to discuss how much of this needs to move to OUI vs stay custom long term
| error?: { | ||
| reason?: string; | ||
| details: string; | ||
| statusCode?: number; |
There was a problem hiding this comment.
why do we have this here? We dont want to show the user the status code, but rather the error and the reason
ashwin-pc
left a comment
There was a problem hiding this comment.
The PR is good, has some follow up work though. Lets follow up on how we display the error. I think for now this is better than what we have, but we need to fix:
- Error when the editor is not focussed
- How the error is displayed
- Loading state when the query is run after the initial load
virajsanghvi
left a comment
There was a problem hiding this comment.
Approving. There are some open questions, but none are blocking
| } | ||
| return res.custom({ | ||
| statusCode: err.name, | ||
| statusCode: error.status, |
There was a problem hiding this comment.
all error types above won't necessarily have status, right? Is that okay?
|
The backport to 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-8565-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 c11a801410fff1ea19f1debeb517cd9c5018b7c6
# Push it to GitHub
git push --set-upstream origin backport/backport-8565-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch-Dashboards/backport-2.xThen, create a pull request where the |
|
The backport to 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-8565-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 c11a801410fff1ea19f1debeb517cd9c5018b7c6
# Push it to GitHub
git push --set-upstream origin backport/backport-8565-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch-Dashboards/backport-2.xThen, create a pull request where the |
…8565) * initial commit for single line editor footer Signed-off-by: Sean Li <lnse@amazon.com> * fixing styling and functionality Signed-off-by: Sean Li <lnse@amazon.com> * Changeset file for PR opensearch-project#8565 created/updated * fixing bug with error not showing up in footer Signed-off-by: Sean Li <lnse@amazon.com> * fixing loading state thanks ashwinpc Signed-off-by: Sean Li <lnse@amazon.com> * trying to surface errors Signed-off-by: Sean Li <lnse@amazon.com> * adding new error for error state Signed-off-by: Sean Li <lnse@amazon.com> * Revert "fixing loading state thanks ashwinpc" This reverts commit 64b5969. * correctly passing async search strat errors Signed-off-by: Sean Li <lnse@amazon.com> --------- Signed-off-by: Sean Li <lnse@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
…opensearch-project#8565) Backport PR: opensearch-project#8565 From the original PR: * initial commit for single line editor footer Signed-off-by: Sean Li <lnse@amazon.com> * fixing styling and functionality Signed-off-by: Sean Li <lnse@amazon.com> * Changeset file for PR opensearch-project#8565 created/updated * fixing bug with error not showing up in footer Signed-off-by: Sean Li <lnse@amazon.com> * fixing loading state thanks ashwinpc Signed-off-by: Sean Li <lnse@amazon.com> * trying to surface errors Signed-off-by: Sean Li <lnse@amazon.com> * adding new error for error state Signed-off-by: Sean Li <lnse@amazon.com> * Revert "fixing loading state thanks ashwinpc" This reverts commit 64b5969. * correctly passing async search strat errors Signed-off-by: Sean Li <lnse@amazon.com> --------- Signed-off-by: Sean Li <lnse@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
…#8565) (#8691) * [2.x-manual-backport][Discover] Add Footer Bar for Single Line Editor (#8565) Backport PR: #8565 From the original PR: * initial commit for single line editor footer Signed-off-by: Sean Li <lnse@amazon.com> * fixing styling and functionality Signed-off-by: Sean Li <lnse@amazon.com> * Changeset file for PR #8565 created/updated * fixing bug with error not showing up in footer Signed-off-by: Sean Li <lnse@amazon.com> * fixing loading state thanks ashwinpc Signed-off-by: Sean Li <lnse@amazon.com> * trying to surface errors Signed-off-by: Sean Li <lnse@amazon.com> * adding new error for error state Signed-off-by: Sean Li <lnse@amazon.com> * Revert "fixing loading state thanks ashwinpc" This reverts commit 64b5969. * correctly passing async search strat errors Signed-off-by: Sean Li <lnse@amazon.com> --------- Signed-off-by: Sean Li <lnse@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> * fix snapshot Signed-off-by: Anan Zhuang <ananzh@amazon.com> --------- Signed-off-by: Sean Li <lnse@amazon.com> Signed-off-by: Anan Zhuang <ananzh@amazon.com> Co-authored-by: Sean Li <lnse@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
…8565) * initial commit for single line editor footer Signed-off-by: Sean Li <lnse@amazon.com> * fixing styling and functionality Signed-off-by: Sean Li <lnse@amazon.com> * Changeset file for PR opensearch-project#8565 created/updated * fixing bug with error not showing up in footer Signed-off-by: Sean Li <lnse@amazon.com> * fixing loading state thanks ashwinpc Signed-off-by: Sean Li <lnse@amazon.com> * trying to surface errors Signed-off-by: Sean Li <lnse@amazon.com> * adding new error for error state Signed-off-by: Sean Li <lnse@amazon.com> * Revert "fixing loading state thanks ashwinpc" This reverts commit 64b5969. * correctly passing async search strat errors Signed-off-by: Sean Li <lnse@amazon.com> --------- Signed-off-by: Sean Li <lnse@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
| } catch (err) { | ||
| let error; | ||
| try { | ||
| error = JSON.parse(err.message); |
There was a problem hiding this comment.
the status code might be in err object, not in err.message. If err.message is a valid json string, then status code is lost
| } | ||
| return res.custom({ | ||
| statusCode: err.name, | ||
| statusCode: error.status, |
There was a problem hiding this comment.
where is error.status coming from?
…opensearch-project#8565) (opensearch-project#8691) * [2.x-manual-backport][Discover] Add Footer Bar for Single Line Editor (opensearch-project#8565) Backport PR: opensearch-project#8565 From the original PR: * initial commit for single line editor footer Signed-off-by: Sean Li <lnse@amazon.com> * fixing styling and functionality Signed-off-by: Sean Li <lnse@amazon.com> * Changeset file for PR opensearch-project#8565 created/updated * fixing bug with error not showing up in footer Signed-off-by: Sean Li <lnse@amazon.com> * fixing loading state thanks ashwinpc Signed-off-by: Sean Li <lnse@amazon.com> * trying to surface errors Signed-off-by: Sean Li <lnse@amazon.com> * adding new error for error state Signed-off-by: Sean Li <lnse@amazon.com> * Revert "fixing loading state thanks ashwinpc" This reverts commit 64b5969. * correctly passing async search strat errors Signed-off-by: Sean Li <lnse@amazon.com> --------- Signed-off-by: Sean Li <lnse@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> * fix snapshot Signed-off-by: Anan Zhuang <ananzh@amazon.com> --------- Signed-off-by: Sean Li <lnse@amazon.com> Signed-off-by: Anan Zhuang <ananzh@amazon.com> Co-authored-by: Sean Li <lnse@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> Signed-off-by: Ruchi Sharma <ruchi492@gmail.com>
Description
Issues Resolved
Screenshot
Testing the changes
Changelog
Check List
yarn test:jestyarn test:jest_integration