-
Notifications
You must be signed in to change notification settings - Fork 891
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
[discover-next][bug] add max height to dataset navigator and use memoization #7540
[discover-next][bug] add max height to dataset navigator and use memoization #7540
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7540 +/- ##
==========================================
- Coverage 63.65% 63.64% -0.01%
==========================================
Files 3629 3629
Lines 79519 79520 +1
Branches 12602 12601 -1
==========================================
- Hits 50618 50613 -5
- Misses 25834 25840 +6
Partials 3067 3067
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good and much needed 🙌 . Test failures look unrelated though.
│1) doc views
│ custom doc views with datagrid table
│ should render react doc view:
│
│ Error: expected 'logstash-2015.09.20' to equal 'logstash-2015.09.22'
│ at Assertion.assert (packages\osd-expect\expect.js:111:11)
│ at Assertion.be.Assertion.equal (packages\osd-expect\expect.js:238:8)
│ at Assertion.be (packages\osd-expect\expect.js:80:22)
│ at Context.<anonymous> (test\plugin_functional\test_suites\doc_views\/doc_views.ts:58:54)
│ at processTicksAndRejections (node:internal/process/task_queues:95:5)
│ at Object.apply (packages\osd-test\src\functional_test_runner\lib\mocha\wrap_function.js:95:16)
9d00607
to
a122934
Compare
Signed-off-by: Kawika Avilla <[email protected]> almost working pretty nicely Signed-off-by: Kawika Avilla <[email protected]> a little bit better Signed-off-by: Kawika Avilla <[email protected]> its ok Signed-off-by: Kawika Avilla <[email protected]>
Signed-off-by: Kawika Avilla <[email protected]>
Signed-off-by: Kawika Avilla <[email protected]>
Signed-off-by: Kawika Avilla <[email protected]>
Signed-off-by: Kawika Avilla <[email protected]>
1035ae2
to
aadbe4d
Compare
Signed-off-by: Kawika Avilla <[email protected]>
Signed-off-by: Kawika Avilla <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Has a few fast follows that are needed, but LGTM
return this.defaultDataSet; | ||
}; | ||
|
||
public initWithIndexPattern = (indexPattern: IndexPattern | null) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can just be setDataset
&:not(:hover)::-webkit-scrollbar { | ||
width: 0; | ||
background: transparent; | ||
} | ||
|
||
&::-webkit-scrollbar { | ||
width: 4px; | ||
} | ||
|
||
&::-webkit-scrollbar-track { | ||
background: $euiColorLightestShade; | ||
} | ||
|
||
&::-webkit-scrollbar-thumb { | ||
background-color: $euiColorMediumShade; | ||
border-radius: 4px; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should just use the EUI Scrollbar mixin here
} | ||
|
||
&__menu { | ||
width: 365px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want a fixed width?
core.uiSettings.getUpdate$().subscribe(({ key, newValue }) => { | ||
if (key === UI_SETTINGS.QUERY_ENHANCEMENTS_ENABLED) { | ||
if (newValue) { | ||
core.uiSettings.set(UI_SETTINGS.STATE_STORE_IN_SESSION_STORAGE, true); | ||
} | ||
} | ||
if (key === UI_SETTINGS.STATE_STORE_IN_SESSION_STORAGE) { | ||
if (!newValue) { | ||
core.uiSettings.set(UI_SETTINGS.QUERY_ENHANCEMENTS_ENABLED, false); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should get rid of this limitation
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-7540-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 611f56bc63b56546437b028ae43f76719118aed8
# Push it to GitHub
git push --set-upstream origin backport/backport-7540-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 |
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.16 2.16
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch-Dashboards/backport-2.16
# Create a new branch
git switch --create backport/backport-7540-to-2.16
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 611f56bc63b56546437b028ae43f76719118aed8
# Push it to GitHub
git push --set-upstream origin backport/backport-7540-to-2.16
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch-Dashboards/backport-2.16 Then, create a pull request where the |
After the following PRs: #7492, #7546, #7540 this commit added skip(1) back to dataset manager observable: fef6156, we need to revert changes done in fix(query assist): update reading data source id from dataset manager #7464 (comment) revert dataset manager observable usage in query assist to support skip(1) revert dataset manager tests [Discover Next] Fixes Discover styles #7546 removed query editor header div, this PR adds it back to enable query editor extensions Signed-off-by: Joshua Li <[email protected]>
…ization (opensearch-project#7540) * add max heigh. use memoization Signed-off-by: Kawika Avilla <[email protected]> almost working pretty nicely Signed-off-by: Kawika Avilla <[email protected]> a little bit better Signed-off-by: Kawika Avilla <[email protected]> its ok Signed-off-by: Kawika Avilla <[email protected]> * update mock Signed-off-by: Kawika Avilla <[email protected]> * update another mock Signed-off-by: Kawika Avilla <[email protected]> * fix mock for extension Signed-off-by: Kawika Avilla <[email protected]> * rebase fixes Signed-off-by: Kawika Avilla <[email protected]> * update script Signed-off-by: Kawika Avilla <[email protected]> * fix initial load Signed-off-by: Kawika Avilla <[email protected]> --------- Signed-off-by: Kawika Avilla <[email protected]>
After the following PRs: opensearch-project#7492, opensearch-project#7546, opensearch-project#7540 this commit added skip(1) back to dataset manager observable: fef6156, we need to revert changes done in fix(query assist): update reading data source id from dataset manager opensearch-project#7464 (comment) revert dataset manager observable usage in query assist to support skip(1) revert dataset manager tests [Discover Next] Fixes Discover styles opensearch-project#7546 removed query editor header div, this PR adds it back to enable query editor extensions Signed-off-by: Joshua Li <[email protected]>
* [Discover 2.0] Updating fetch functions to include local cluster (#7542) * Update datasources fetch function to include local cluster * Check for duplicates when fetching external datasources (in the case local cluster is added as a datasource) * Clean up types in DataSetNavigator so items are displayed properly --------- Signed-off-by: Sean Li <[email protected]> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> * [discover-next][bug] add max height to dataset navigator and use memoization (#7540) * add max heigh. use memoization Signed-off-by: Kawika Avilla <[email protected]> almost working pretty nicely Signed-off-by: Kawika Avilla <[email protected]> a little bit better Signed-off-by: Kawika Avilla <[email protected]> its ok Signed-off-by: Kawika Avilla <[email protected]> * update mock Signed-off-by: Kawika Avilla <[email protected]> * update another mock Signed-off-by: Kawika Avilla <[email protected]> * fix mock for extension Signed-off-by: Kawika Avilla <[email protected]> * rebase fixes Signed-off-by: Kawika Avilla <[email protected]> * update script Signed-off-by: Kawika Avilla <[email protected]> * fix initial load Signed-off-by: Kawika Avilla <[email protected]> --------- Signed-off-by: Kawika Avilla <[email protected]> * Fix query assist for query editor (#7552) After the following PRs: #7492, #7546, #7540 this commit added skip(1) back to dataset manager observable: fef6156, we need to revert changes done in fix(query assist): update reading data source id from dataset manager #7464 (comment) revert dataset manager observable usage in query assist to support skip(1) revert dataset manager tests [Discover Next] Fixes Discover styles #7546 removed query editor header div, this PR adds it back to enable query editor extensions Signed-off-by: Joshua Li <[email protected]> * [Discover next] Fixes dataset navigator menu styling & search error toast (#7566) Signed-off-by: Ashwin P Chandran <[email protected]> * [Discover 2.0] Loading fix for databases (#7567) * add back in useeffect for loading databases Signed-off-by: Sean Li <[email protected]> * Changeset file for PR #7567 created/updated --------- Signed-off-by: Sean Li <[email protected]> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> --------- Signed-off-by: Sean Li <[email protected]> Signed-off-by: Kawika Avilla <[email protected]> Signed-off-by: Joshua Li <[email protected]> Signed-off-by: Ashwin P Chandran <[email protected]> Co-authored-by: Sean Li <[email protected]> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> Co-authored-by: Kawika Avilla <[email protected]> Co-authored-by: Joshua Li <[email protected]> Co-authored-by: Ashwin P Chandran <[email protected]>
…ization (opensearch-project#7540) * add max heigh. use memoization Signed-off-by: Kawika Avilla <[email protected]> almost working pretty nicely Signed-off-by: Kawika Avilla <[email protected]> a little bit better Signed-off-by: Kawika Avilla <[email protected]> its ok Signed-off-by: Kawika Avilla <[email protected]> * update mock Signed-off-by: Kawika Avilla <[email protected]> * update another mock Signed-off-by: Kawika Avilla <[email protected]> * fix mock for extension Signed-off-by: Kawika Avilla <[email protected]> * rebase fixes Signed-off-by: Kawika Avilla <[email protected]> * update script Signed-off-by: Kawika Avilla <[email protected]> * fix initial load Signed-off-by: Kawika Avilla <[email protected]> --------- Signed-off-by: Kawika Avilla <[email protected]>
After the following PRs: opensearch-project#7492, opensearch-project#7546, opensearch-project#7540 this commit added skip(1) back to dataset manager observable: fef6156, we need to revert changes done in fix(query assist): update reading data source id from dataset manager opensearch-project#7464 (comment) revert dataset manager observable usage in query assist to support skip(1) revert dataset manager tests [Discover Next] Fixes Discover styles opensearch-project#7546 removed query editor header div, this PR adds it back to enable query editor extensions Signed-off-by: Joshua Li <[email protected]>
Backported with #7574 |
Description
For a lot of indices I give it a max height on the popover. Also using memoization helps a lot with the performance and rerendering.
Issues Resolved
n/a
Screenshot
Testing the changes
locally
Changelog
Check List
yarn test:jest
yarn test:jest_integration