-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…81503) * Misc enterprise search overview cleanup - remove extra comment block - tests - use setMockValues - remove unused EuiPage - error connecting test - clarify assertion * Add Setup Guide CTA component * Update Product Selector to show Setup Guide CTAs + tests clean up - use setMockValues, import reorder * Add EuiPanel RR link to setup guide
- Loading branch information
Constance
authored
Oct 22, 2020
1 parent
d81fcd5
commit 462d37f
Showing
11 changed files
with
154 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ | |
*/ | ||
|
||
export { SetupGuide } from './setup_guide'; | ||
export { SetupGuideCta } from './setup_guide_cta'; |
29 changes: 29 additions & 0 deletions
29
..._search/public/applications/enterprise_search/components/setup_guide/setup_guide_cta.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
.enterpriseSearchSetupCta { | ||
margin: $euiSize auto $euiSizeXL; | ||
|
||
// Clickable EuiPanel override - line panel up with product cards | ||
&.euiPanel--isClickable { | ||
width: calc(100% - #{$euiSize}); | ||
} | ||
|
||
&__text { | ||
max-width: $euiSize * 40; | ||
} | ||
|
||
&__image { | ||
display: block; | ||
max-width: 100%; | ||
width: $euiSize * 10; | ||
margin: 0 auto; | ||
|
||
@include euiBreakpoint('xs', 's') { | ||
width: $euiSize * 15; | ||
} | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
...rch/public/applications/enterprise_search/components/setup_guide/setup_guide_cta.test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import React from 'react'; | ||
import { shallow } from 'enzyme'; | ||
|
||
import { SetupGuideCta } from './'; | ||
|
||
describe('SetupGuideCta', () => { | ||
it('renders', () => { | ||
const wrapper = shallow(<SetupGuideCta />); | ||
|
||
expect(wrapper.find('.enterpriseSearchSetupCta')).toHaveLength(1); | ||
expect(wrapper.find('img')).toHaveLength(1); | ||
}); | ||
}); |
38 changes: 38 additions & 0 deletions
38
...e_search/public/applications/enterprise_search/components/setup_guide/setup_guide_cta.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import React from 'react'; | ||
import { i18n } from '@kbn/i18n'; | ||
import { EuiFlexGroup, EuiFlexItem, EuiTitle, EuiText } from '@elastic/eui'; | ||
import { EuiPanel } from '../../../shared/react_router_helpers'; | ||
|
||
import CtaImage from './assets/getting_started.png'; | ||
import './setup_guide_cta.scss'; | ||
|
||
export const SetupGuideCta: React.FC = () => ( | ||
<EuiPanel to="/setup_guide" paddingSize="l" className="enterpriseSearchSetupCta"> | ||
<EuiFlexGroup alignItems="center" justifyContent="spaceBetween"> | ||
<EuiFlexItem className="enterpriseSearchSetupCta__text"> | ||
<EuiTitle size="s"> | ||
<h2> | ||
{i18n.translate('xpack.enterpriseSearch.overview.setupCta.title', { | ||
defaultMessage: 'Enterprise-grade functionality for teams big and small', | ||
})} | ||
</h2> | ||
</EuiTitle> | ||
<EuiText size="s" color="subdued"> | ||
{i18n.translate('xpack.enterpriseSearch.overview.setupCta.description', { | ||
defaultMessage: | ||
'Add search to your app or internal organization with Elastic App Search and Workplace Search. Watch the video to see what you can do when search is made easy.', | ||
})} | ||
</EuiText> | ||
</EuiFlexItem> | ||
<EuiFlexItem grow={false}> | ||
<img src={CtaImage} alt="" className="enterpriseSearchSetupCta__image" /> | ||
</EuiFlexItem> | ||
</EuiFlexGroup> | ||
</EuiPanel> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters