-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[Enterprise Search] Update Product Selector and add Setup Guide #78233
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] Update Product Selector and add Setup Guide #78233
Conversation
- Only shows error connectign if host is set - Removes conditional rendering of cards - Changes the action text from “Launch” to “Setup”
| src={GettingStarted} | ||
| alt={i18n.translate('xpack.enterpriseSearch.enterpriseSearch.setupGuide.videoAlt', { | ||
| defaultMessage: | ||
| "Getting started with App Search - in this short video we'll guide you through how to get App Search up and running", |
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.
Fixed in future commit
JasonStoltz
left a comment
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.
Left some comments and feedback. Let me know what you think.
x-pack/plugins/enterprise_search/public/applications/enterprise_search/routes.ts
Show resolved
Hide resolved
...earch/public/applications/enterprise_search/components/product_selector/product_selector.tsx
Show resolved
Hide resolved
x-pack/plugins/enterprise_search/public/applications/enterprise_search/index.test.tsx
Show resolved
Hide resolved
x-pack/plugins/enterprise_search/public/applications/enterprise_search/index.test.tsx
Outdated
Show resolved
Hide resolved
...terprise_search/public/applications/enterprise_search/components/setup_guide/setup_guide.tsx
Show resolved
Hide resolved
...terprise_search/public/applications/enterprise_search/components/setup_guide/setup_guide.tsx
Show resolved
Hide resolved
|
|
||
| import { APP_SEARCH_PLUGIN, WORKPLACE_SEARCH_PLUGIN } from '../../../../../common/constants'; | ||
|
|
||
| import { SetEnterpriseSearchChrome as SetPageChrome } from '../../../shared/kibana_chrome'; |
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.
Why do we alias this? I feel like it confuses things a bit.
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.
Copying Constance's pattern from other components. If we want to change IMO that is beyond the scope of this PR and we should discuss as a team and change all in a separate PR
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.
Hey! This pattern's on me (also one we use in multiple places, e.g., with telemetry, so def open to discussing and refactoring separately from this PR).
Most of these components Set<Product>Chrome, Set<Product>Telemetry are a very very light wrapper around what's essentially a generic function with a product key passed in. Examples:
I thought it would feel and read more nicely from a dev experience perspective - for example, if you're an App Search dev you know you're already working in the App Search plugin, so no need to be overly specific when calling the component - just rename it to a more generic <SetChrome /> component, or <SendTelemetry />, etc. without having to repeat App Search or pass the app search ID again and again.
Definitely happy to discuss the overall pattern and if you have any thoughts on refactoring, but would very likely be in a separate PR if that sounds cool!
| import { shallow } from 'enzyme'; | ||
|
|
||
| import { SetEnterpriseSearchChrome as SetPageChrome } from '../../../shared/kibana_chrome'; | ||
| import { SetupGuide as SetupGuideLayout } from '../../../shared/setup_guide'; |
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 feel we should just rename shared/setup_guide to shared/setup_guide_layout.tsx and export SetupGuideLayout. It's confusing having a file named one way but used another way everywhere.
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.
Copying Constance's pattern from other components. If we want to change IMO that is beyond the scope of this PR and we should discuss as a team and change all in a separate PR
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 one's on me again, and almost definitely an alias we don't need 🤔 Historical context for this shenanigans:
- The (very early) MVP only had a single
<SetupGuide />component - When WS was added, I refactored out the instructions part of the Setup Guide to a reusable component, and left it named as SetupGuide and just alias'ed it
- Here we are today and I look like a fool
EDIT: Went back and actually re-looked at what I was doing, I'm +1 for just renaming this SetupGuideLayout or similar. Thanks @JasonStoltz!
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.
^ Sorry, to clarify - in a separate PR of course
…e_search/index.test.tsx Co-authored-by: Jason Stoltzfus <[email protected]>
...rprise_search/public/applications/enterprise_search/components/product_card/product_card.tsx
Outdated
Show resolved
Hide resolved
...rprise_search/public/applications/enterprise_search/components/product_card/product_card.tsx
Outdated
Show resolved
Hide resolved
Co-authored-by: Constance <[email protected]>
Co-authored-by: Constance <[email protected]>
...rprise_search/public/applications/enterprise_search/components/product_card/product_card.tsx
Outdated
Show resolved
Hide resolved
|
Super duper quick request - can we run the |
2 things:
|
...earch/public/applications/enterprise_search/components/product_selector/product_selector.tsx
Outdated
Show resolved
Hide resolved
.../public/applications/enterprise_search/components/product_selector/product_selector.test.tsx
Outdated
Show resolved
Hide resolved
.../public/applications/enterprise_search/components/product_selector/product_selector.test.tsx
Show resolved
Hide resolved
...e_search/public/applications/enterprise_search/components/product_card/product_card.test.tsx
Show resolved
Hide resolved
Co-authored-by: Constance <[email protected]>
Co-authored-by: Constance <[email protected]>
|
Super good to know re: the images! Also interesting that tinypng re-compressed it for me apparently, normally it's pretty good / only shows single-digit perf improvements when I re-run images through it 🤔 ++ to leaving it alone since Davey will get back to us anyway! |
Yeah, so apparently I uploaded the wrong one because I still had the TinyPng compressed one in my downloads folder. Updated anyway 😂 |
|
Haha I've definitely done the same thing before, good to know I'm not the only one!! |
cee-chen
left a comment
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.
kibanamachine's doin' a yell, I think these removals should fix them
...rprise_search/public/applications/enterprise_search/components/product_card/product_card.tsx
Outdated
Show resolved
Hide resolved
...e_search/public/applications/enterprise_search/components/product_card/product_card.test.tsx
Outdated
Show resolved
Hide resolved
...e_search/public/applications/enterprise_search/components/product_card/product_card.test.tsx
Outdated
Show resolved
Hide resolved
...e_search/public/applications/enterprise_search/components/product_card/product_card.test.tsx
Outdated
Show resolved
Hide resolved
|
Ooo was gonna ask about the lodash imports as well - you read my mind!! Thanks Scotty, you rock 🚀 |
💚 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: |
…tic#78233) * Add conditional button text - Only shows error connectign if host is set - Removes conditional rendering of cards - Changes the action text from “Launch” to “Setup” * Add setup guide * Extract ProductSelector to component * Update index and add routes * Change setup guide text * Fix imports * Add missing mock * Update x-pack/plugins/enterprise_search/public/applications/enterprise_search/index.test.tsx Co-authored-by: Jason Stoltzfus <[email protected]> * Remove Literals Co-authored-by: Constance <[email protected]> * Remove Literals II - The Force Awakens Co-authored-by: Constance <[email protected]> * Add back access checks * Remove hard-coded props 🤦🏼♂️ * Remove data-test-subj attr * Reafactor access check variables * Remove unused beforeEach Co-authored-by: Constance <[email protected]> * Add newline Co-authored-by: Constance <[email protected]> * Update image to compressed * Remove unused things * Update to new way of using lodash things 🤷🏽♀️ Co-authored-by: Jason Stoltzfus <[email protected]> Co-authored-by: Constance <[email protected]>
…) (#78381) * Add conditional button text - Only shows error connectign if host is set - Removes conditional rendering of cards - Changes the action text from “Launch” to “Setup” * Add setup guide * Extract ProductSelector to component * Update index and add routes * Change setup guide text * Fix imports * Add missing mock * Update x-pack/plugins/enterprise_search/public/applications/enterprise_search/index.test.tsx Co-authored-by: Jason Stoltzfus <[email protected]> * Remove Literals Co-authored-by: Constance <[email protected]> * Remove Literals II - The Force Awakens Co-authored-by: Constance <[email protected]> * Add back access checks * Remove hard-coded props 🤦🏼♂️ * Remove data-test-subj attr * Reafactor access check variables * Remove unused beforeEach Co-authored-by: Constance <[email protected]> * Add newline Co-authored-by: Constance <[email protected]> * Update image to compressed * Remove unused things * Update to new way of using lodash things 🤷🏽♀️ Co-authored-by: Jason Stoltzfus <[email protected]> Co-authored-by: Constance <[email protected]> Co-authored-by: Jason Stoltzfus <[email protected]> Co-authored-by: Constance <[email protected]>
Summary
This PR adds for the use-case where a user has not configured Enterprise Search but lands on the Product Selector. It also adds a Enterprise Search-level Setup Guide when there is an error connecting.

(Image to be updated)QA
enterpriseSearch.hostset in the kibana.dev.yml file and visit the Enterprise Search Overview page. Links should say Setup Workplace Search and Setup App Search and link to the setup guide.enterpriseSearch.hostset in the kibana.dev.yml file and make sure Enterprise Search is not running. Visit the Enterprise Search Overview page. Error connecting page should render and button should take you to Enterprise Search setup guide.enterpriseSearch.hostset in the kibana.dev.yml file and make sure Enterprise Search is running. Visit the Enterprise Search Overview page. Product selector should be shown with links that say Launch Workplace Search and Launch App Search and link to the product overview pages.Checklist