-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Enterprise Search] Add Overview landing page/plugin #76734
[Enterprise Search] Add Overview landing page/plugin #76734
Conversation
@elastic/kibana-telemetry 👋 It's us again!! Super excited to let you know we're adding a new Enterprise Search plugin and thus a new telemetry bucket. Hopefully you'll get all the info you need from your JSON file, but just in case, I've included a screenshot of the stats output: Here's the most relevant telemetry commit, hope that helps! |
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.
Telemetry changes LGTM!
Super-NIT: I'd appreciate if you could do the Application Usage related changes (we can do it in the telemetry team later on if necessary 🙂)
core.application.register({ | ||
id: ENTERPRISE_SEARCH_PLUGIN.ID, | ||
title: ENTERPRISE_SEARCH_PLUGIN.NAV_TITLE, | ||
appRoute: ENTERPRISE_SEARCH_PLUGIN.URL, | ||
category: DEFAULT_APP_CATEGORIES.enterpriseSearch, | ||
mount: async (params: AppMountParameters) => { | ||
const [coreStart] = await core.getStartServices(); | ||
const { chrome } = coreStart; | ||
chrome.docTitle.change(ENTERPRISE_SEARCH_PLUGIN.NAME); | ||
|
||
await this.getInitialData(coreStart.http); | ||
|
||
const { renderApp } = await import('./applications'); | ||
const { EnterpriseSearch } = await import('./applications/enterprise_search'); | ||
|
||
return renderApp(EnterpriseSearch, params, coreStart, plugins, this.config, this.data); | ||
}, | ||
}); |
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.
Super-NIT: @constancecchen I noticed we are registering a new app. Do you mind adding to this file an entry in the object applicationUsageSchema
with the ENTERPRISE_SEARCH_PLUGIN.ID
as a key?
We are working on an automated way of building that structure, but it has to be done manually for now. It can be done on a follow up PR, if you prefer to 🙂
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 can definitely do this - will push up in a separate commit here shortly!
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.
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 and all QA steps successful.
Hmm, I'm concerned by the large asset size increase. Going to try and see if I can optimize our images |
The background SVG is the main culprit, it looks like 😬 It's about 300kb in size. I ran it through SVGOMG and got it down from 293kb to 236kb, but that's still surprisingly hefty for an SVG. Bizarrely enough, if you convert the SVG to a PNG instead, it drops down to just ~30kb or so... I'm probably going to go ahead and do that here in a follow-up commit. I also ran the AS & WS dashboard images through TinyPNG but those barely went down in size so they appear to have already been optimized. 🎉 |
It's likely worth having @daveyholler inspect that illustration in Figma or Illustrator and see if there are any opportunities to simplify it. |
@zumwalt Great point! I am pretty curious as to what's going on as it's super unusual for an SVG to be significantly larger than a raster image - I'm guessing it's the textures/dots personally. @daveyholler We do have a working and performant workaround (using a 25kb PNG) so don't feel like you have to prioritize this, but if you're curious as well feel free to poke at the old SVG if you want to see if it's possible to get that down to double digits in file size as well. |
+ move new Home strings to constants
- Add SetEnterpriseSearchChrome - Update Enterprise Search breadcrumbs to link to new overview plugin (+ update overview plugin URL per team discussion) - Add ability to break out of React Router basename by not using history.createhref - Update createHref mock to more closely match Kibana urls (adding /app prefix) - Minor documentation fix
- client-side: SendEnterpriseSearchTelemetry - server-side: register saved objects, usage collector, etc.
* Add formatTestSubj util This allows us to correctly format strings into our casing for data-test-subj attrs * Add images and stylesheet * Add product card component * Add index component * Remove unused styles
- by add shouldNotCreateHref prop to RR helpers - similiar to breadcrumb change
- Prefer EUI components over bespoke CSS (e.g. EuiCard) - Remove unused or unspecific CSS - Pull out product card CSS to its component - Fix kebab-cased CSS classes to camelCased
- Prefer passing in our plugin consts instead of separate props - Move productCardDescription to constants - Update tests
+ revert data-test-subj strings to previous implementation + prune format_test_subj helper by using lodash util directly
- adds access checks - fixes flex/CSS to show one card at a time
82cef3f
to
8718473
Compare
💚 Build SucceededBuild metrics@kbn/optimizer bundle module count
async chunks size
miscellaneous assets size
page load bundle size
distributable file count
History
To update your PR or re-run it, just comment with: |
* [public] Register Enterprise search plugin + move new Home strings to constants * [server] Register plugin access/visibility * Set up Enterprise Search Kibana Chrome - Add SetEnterpriseSearchChrome - Update Enterprise Search breadcrumbs to link to new overview plugin (+ update overview plugin URL per team discussion) - Add ability to break out of React Router basename by not using history.createhref - Update createHref mock to more closely match Kibana urls (adding /app prefix) - Minor documentation fix * Set up Enterprise Search plugin telemetry - client-side: SendEnterpriseSearchTelemetry - server-side: register saved objects, usage collector, etc. * Enterprise search overview views (#23) * Add formatTestSubj util This allows us to correctly format strings into our casing for data-test-subj attrs * Add images and stylesheet * Add product card component * Add index component * Remove unused styles * Fix inter-plugin links - by add shouldNotCreateHref prop to RR helpers - similiar to breadcrumb change * Fix/clean up CSS - Prefer EUI components over bespoke CSS (e.g. EuiCard) - Remove unused or unspecific CSS - Pull out product card CSS to its component - Fix kebab-cased CSS classes to camelCased * Clean up ProductCard props - Prefer passing in our plugin consts instead of separate props - Move productCardDescription to constants - Update tests * Add telemetry clicked actions to product buttons + revert data-test-subj strings to previous implementation + prune format_test_subj helper by using lodash util directly * [PR feedback] Add new plugin to applicationUsageSchema per telemetry team request * Fix failing functional navLinks test * Fix telemetry schema test * [Perf] Optimize assets size by switching from 300kb SVG to 25kb PNG * Only show product cards if the user has access to that product - adds access checks - fixes flex/CSS to show one card at a time Co-authored-by: Scotty Bollinger <[email protected]> Co-authored-by: Scotty Bollinger <[email protected]>
* master: (25 commits) [bugfix] Replace panel flyout opens 2 flyouts (elastic#76931) clean up test (elastic#76887) [Enterprise Search] Update shared API request handler (elastic#77112) [Maps] convert ESAggSource to TS (elastic#76999) Add plugin status API - take 2 (elastic#76732) Adds lens as a readable saved object for read-only dashboard users (elastic#77067) Skip checking for the reserved realm (elastic#76687) Reporting/diagnostics (elastic#74314) Reporting/Test: unskip non-screenshot tests (elastic#77088) Move metrics to setup and add cgroup metrics (elastic#76730) [Enterprise Search] Add Overview landing page/plugin (elastic#76734) First pass. Change TS type. Update OpenAPI (elastic#76434) [CI] Balance xpack ci groups a bit (elastic#77068) [Security_solution][Detections] Refactor signal ancestry to allow multiple parents (elastic#76531) [Maps] convert MetricsEditor to TS (elastic#76727) IndexMigrator: fix non blocking migration wrapper promise rejection (elastic#77018) [Enterprise Search] Update config data endpoint to v2 (elastic#76970) [ML] Add decision path charts to exploration results table (elastic#73561) Bump eventemitter3 from 4.0.0 to 4.0.7 (elastic#77016) [Ingest Pipelines] Add descriptions for ingest processors K-S (elastic#76981) ...
* master: (41 commits) [bugfix] Replace panel flyout opens 2 flyouts (elastic#76931) clean up test (elastic#76887) [Enterprise Search] Update shared API request handler (elastic#77112) [Maps] convert ESAggSource to TS (elastic#76999) Add plugin status API - take 2 (elastic#76732) Adds lens as a readable saved object for read-only dashboard users (elastic#77067) Skip checking for the reserved realm (elastic#76687) Reporting/diagnostics (elastic#74314) Reporting/Test: unskip non-screenshot tests (elastic#77088) Move metrics to setup and add cgroup metrics (elastic#76730) [Enterprise Search] Add Overview landing page/plugin (elastic#76734) First pass. Change TS type. Update OpenAPI (elastic#76434) [CI] Balance xpack ci groups a bit (elastic#77068) [Security_solution][Detections] Refactor signal ancestry to allow multiple parents (elastic#76531) [Maps] convert MetricsEditor to TS (elastic#76727) IndexMigrator: fix non blocking migration wrapper promise rejection (elastic#77018) [Enterprise Search] Update config data endpoint to v2 (elastic#76970) [ML] Add decision path charts to exploration results table (elastic#73561) Bump eventemitter3 from 4.0.0 to 4.0.7 (elastic#77016) [Ingest Pipelines] Add descriptions for ingest processors K-S (elastic#76981) ...
…rok/new-patterns-component-use-array * 'master' of github.com:elastic/kibana: (39 commits) [APM] Always load esarchives from common (elastic#77139) [Ingest Manager] Handle Legacy ES client errors (elastic#76865) [Docs] URL Drilldown (elastic#76529) [bugfix] Replace panel flyout opens 2 flyouts (elastic#76931) clean up test (elastic#76887) [Enterprise Search] Update shared API request handler (elastic#77112) [Maps] convert ESAggSource to TS (elastic#76999) Add plugin status API - take 2 (elastic#76732) Adds lens as a readable saved object for read-only dashboard users (elastic#77067) Skip checking for the reserved realm (elastic#76687) Reporting/diagnostics (elastic#74314) Reporting/Test: unskip non-screenshot tests (elastic#77088) Move metrics to setup and add cgroup metrics (elastic#76730) [Enterprise Search] Add Overview landing page/plugin (elastic#76734) First pass. Change TS type. Update OpenAPI (elastic#76434) [CI] Balance xpack ci groups a bit (elastic#77068) [Security_solution][Detections] Refactor signal ancestry to allow multiple parents (elastic#76531) [Maps] convert MetricsEditor to TS (elastic#76727) IndexMigrator: fix non blocking migration wrapper promise rejection (elastic#77018) [Enterprise Search] Update config data endpoint to v2 (elastic#76970) ... # Conflicts: # src/plugins/es_ui_shared/static/forms/hook_form_lib/components/use_array.ts
* master: (38 commits) Reporting/Test: unskip non-screenshot tests (elastic#77088) Move metrics to setup and add cgroup metrics (elastic#76730) [Enterprise Search] Add Overview landing page/plugin (elastic#76734) First pass. Change TS type. Update OpenAPI (elastic#76434) [CI] Balance xpack ci groups a bit (elastic#77068) [Security_solution][Detections] Refactor signal ancestry to allow multiple parents (elastic#76531) [Maps] convert MetricsEditor to TS (elastic#76727) IndexMigrator: fix non blocking migration wrapper promise rejection (elastic#77018) [Enterprise Search] Update config data endpoint to v2 (elastic#76970) [ML] Add decision path charts to exploration results table (elastic#73561) Bump eventemitter3 from 4.0.0 to 4.0.7 (elastic#77016) [Ingest Pipelines] Add descriptions for ingest processors K-S (elastic#76981) [Metrics UI] Replace Snapshot API with Metrics API (elastic#76253) legacy utils cleanup (elastic#76608) [ML] Account for "properties" layer in find_file_structure mappings (elastic#77035) fixed typo Upgrade to Kea 2.2 (elastic#77047) a11y tests on spaces home page including feature control (elastic#76515) [ML] Transforms list: persist pagination through refresh interval (elastic#76786) [ML] Replace all use of date_histogram interval with fixed_interval (elastic#76876) ...
Summary
This adds an Enterprise Search Overview plugin/landing page for the new Kibana home to link to. 🎉
Changes:
shouldNotCreateHref
flag - this allows us to create RR paths outside of the plugin basename while still navigating within Kibana/between Kibana plugins.public/plugin.ts
tocommon/constants.ts
Please note that this is an MVP plugin that mimics the current Enterprise Search Home (http://localhost:3002/ent/select) - however, @johnbarrierwilson will eventually customize it at some point.
Screencaps
Dark mode:
Side nav:
Telemetry:
QA
enterprise_search
plugin is present, and that it has non-zero numbers forui_viewed.overview
andui_clicked.app_search
andui_clicked.workplace_search
that correspond to the number of times you've clicked said buttons (try clicking, then refreshing the stats page and confirming the count increments).test
) with only Dashboard/Discover permissionstest_as_access
) with the above role. In App Search, create a role mapping for that username with an access of admin etc. (or dev)test_ws_access
) with the above role. In Workplace Search, create a role mapping for that username with an access of admin or usertest_no_access
with the above role. Do not add any role mappings in either product for this username.test_as_access
App Search user and confirm that:test_ws_access
Workplace Search user and confirm that:test_no_access
user and confirm that:Checklist
Release note
Adds a new Enterprise Search overview plugin, which introduces and guides users to the App Search and Workplace Search plugins.