-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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][UnifiedFieldList] Integrate unified field list sections into Discover #144412
[Discover][UnifiedFieldList] Integrate unified field list sections into Discover #144412
Conversation
[Discover] Start integrating the new grouped field list [Discover] Render selected fields too [Discover] Remove "Hide empty fields" toggle [Discover] Show popular fields [Discover] Refactor selected fields [Discover] Refactor general grouping [Discover] Update tests [Discover] Update tests and fix some issues [Discover] Update accordion tooltip and fix flags [Discover] Show loading indicators [Discover] Fix stuck field buttons for text-based queries [Discover] Add field search highlights [Discover] Fix Discover icons for meta fields [Discover] Restore icons for text-based queries [Discover] Update tests [Discover] Handle edge cases [Discover] Update tests [Discover] Update tests [Discover] Update tests [Discover] Update tests
…d-list-sections-in-discover-2 # Conflicts: # src/plugins/discover/public/__mocks__/services.ts
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 is a big PR, lots of nice stuff under the hood 👍 , providing quick feedback
As synced offline
- when switching data view, the sections showing the �ields should be cleaned up
- the initial state of the sections is showing a loading spinner, when
discover:searchOnPageLoad
is set toOff
src/plugins/discover/public/application/main/components/sidebar/discover_field.tsx
Show resolved
Hide resolved
src/plugins/discover/public/application/main/components/sidebar/discover_field.tsx
Show resolved
Hide resolved
src/plugins/discover/public/application/main/components/sidebar/discover_sidebar.test.tsx
Show resolved
Hide resolved
src/plugins/unified_field_list/public/hooks/use_existing_fields.ts
Outdated
Show resolved
Hide resolved
src/plugins/unified_field_list/public/components/field_list/field_list_grouped.tsx
Show resolved
Hide resolved
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.
Code LGTM, tested it again, and it works as expected. Lots of work, great work, congrats!
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.
Wow awesome work! The code looks great, lots of nice cleanup, and plenty of tests 👍 I left a couple small nits and questions/comments, but I didn't see anything I'd consider a blocker. I still have to finish my local testing in the morning, and I'll do another quick pass at the code, but overall this is looking really good.
src/plugins/unified_field_list/public/components/field_list/field_list_grouped.tsx
Outdated
Show resolved
Hide resolved
src/plugins/unified_field_list/public/components/field_list/field_list_grouped.tsx
Outdated
Show resolved
Hide resolved
test/functional/apps/discover/group2/_indexpattern_with_unmapped_fields.ts
Show resolved
Hide resolved
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.
Thanks for the latest updates! I finished my local testing today, and it seems to be working great. It's a big step forward in consistency between Discover and Lens, and some of the more subtle changes like field highlighting add polish 👌. Also the testing list was super convenient to help test thoroughly. There's only one thing I saw that I think is a bug, and two questions I have:
I noticed that when discover:searchOnPageLoad
is false
, if I open a saved search and then click 'New', the fields remain in the sidebar when they used to get cleared out:
It looks like it used to be that multifields couldn't become popular, but now they can. Is this something we did intentionally?
And last, I just wanted to check that I understand this point correctly:
discover:searchFieldsFromSource
should show multifields right in the fields list if enabled
This is new, correct? And it's the reason why I now see the .keyword
fields directly in the list when discover:searchFieldsFromSource
is true?
@davismcphee Good catch! Fixed all. |
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 looks great Julia! I was mostly focused on Lens, I tested it with various dataviews for both modes. Visualizations changes LGTM!
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.
I got a chance to review again, thanks for fixing those issues!
I did a final round of testing today and the only thing I encountered was that when I created a new field with no value, it now appears in available fields instead of empty fields. In my local main build, it seems that empty runtime fields are only shown when 'Hide empty fields' is off:
With that said, I consider this a minor non-blocker issue, so I'll leave it up to you to add the fix to this PR or create a small followup issue to fix once merged. Otherwise this LGTM! Great work on this and I'm excited to see it merged soon 🥳
Thanks for all the reviews! @davismcphee Let's discuss it during our next meeting. There was an agreement that runtime fields should be always available. |
💚 Build Succeeded
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
Page load bundle
Unknown metric groupsAPI count
ESLint disabled in files
ESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: cc @jughosta |
) This is a follow up PR for #144412 to fix how "Error" case is handled. Before: the sidebar was stuck in loading state: <img width="600" alt="Screenshot 2022-12-07 at 13 16 21" src="https://user-images.githubusercontent.com/1415710/206183995-9079ee4f-6c7c-4a59-ace3-f2c22807a17b.png"> After: the sidebar is rendered: <img width="600" alt="Screenshot 2022-12-07 at 13 17 06" src="https://user-images.githubusercontent.com/1415710/206184115-abd08241-e0b6-4fff-b257-fe12be2a0006.png">
Closes #135678
Summary
This PR continues the work started in #142758 to bring field list grouping from Lens into Discover.
For testing on Discover page:
Please check different use cases and toggling Advanced Settings:
discover:searchOnPageLoad
should not show fields if turned offdiscover:searchFieldsFromSource
should show multifields right in the fields list if enableddiscover:enableSql
should show Selected and Available fields only when enableddiscover:showLegacyFieldTopValues
should show old (green) field stats in its popoverdoc_table:legacy
On Lens page:
Checklist