-
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
[Unified Integrations] Clean up empty states, tutorial links and routing to prefer unified integrations #114911
Changes from all commits
177f3d0
040a728
3ea65dc
03e8113
171f889
ac836c4
28c1fa3
6384a1a
7abd79f
9336c01
20066a8
3133485
d237571
e061a7a
b85ec15
013cf67
877d4ec
cc0aecc
c58a8fa
273552a
1a34739
bd68272
961b599
8b5b576
73d0e09
c219990
a3a7125
9142b85
c99e038
54d9fb6
9b052f0
f56b0e8
02d7b81
86294f5
6d3f49c
1f59fe3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,8 +22,6 @@ import { FormattedMessage } from '@kbn/i18n/react'; | |
import { METRIC_TYPE } from '@kbn/analytics'; | ||
import { ApplicationStart } from 'kibana/public'; | ||
import { createAppNavigationHandler } from '../app_navigation_handler'; | ||
// @ts-expect-error untyped component | ||
import { Synopsis } from '../synopsis'; | ||
import { getServices } from '../../kibana_services'; | ||
import { RedirectAppLinks } from '../../../../../kibana_react/public'; | ||
|
||
|
@@ -35,87 +33,91 @@ interface Props { | |
|
||
export const AddData: FC<Props> = ({ addBasePath, application, isDarkMode }) => { | ||
const { trackUiMetric } = getServices(); | ||
const canAccessIntegrations = application.capabilities.navLinks.integrations; | ||
if (canAccessIntegrations) { | ||
Comment on lines
+36
to
+37
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I feel like this is more of a hack than a proper usage of |
||
return ( | ||
<> | ||
<section className="homDataAdd" aria-labelledby="homDataAdd__title"> | ||
<EuiFlexGroup alignItems="flexEnd"> | ||
<EuiFlexItem> | ||
<EuiTitle size="s"> | ||
<h2 id="homDataAdd__title"> | ||
<FormattedMessage | ||
id="home.addData.sectionTitle" | ||
defaultMessage="Get started by adding integrations" | ||
/> | ||
</h2> | ||
</EuiTitle> | ||
|
||
return ( | ||
<> | ||
<section className="homDataAdd" aria-labelledby="homDataAdd__title"> | ||
<EuiFlexGroup alignItems="flexEnd"> | ||
<EuiFlexItem> | ||
<EuiTitle size="s"> | ||
<h2 id="homDataAdd__title"> | ||
<FormattedMessage | ||
id="home.addData.sectionTitle" | ||
defaultMessage="Get started by adding your data" | ||
/> | ||
</h2> | ||
</EuiTitle> | ||
<EuiSpacer /> | ||
|
||
<EuiSpacer /> | ||
<EuiText> | ||
snide marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<p> | ||
<FormattedMessage | ||
id="home.addData.text" | ||
defaultMessage="To start working with your data, use one of our many ingest options. Collect data from an app or service, or upload a file. If you're not ready to use your own data, add a sample data set." | ||
/> | ||
</p> | ||
</EuiText> | ||
|
||
<EuiText> | ||
<p> | ||
<FormattedMessage | ||
id="home.addData.text" | ||
defaultMessage="To start working with your data, use one of our many ingest options. Collect data from an app or service, or upload a file. If you're not ready to use your own data, add a sample data set." | ||
/> | ||
</p> | ||
</EuiText> | ||
<EuiSpacer /> | ||
|
||
<EuiSpacer /> | ||
<EuiFlexGroup gutterSize="m" responsive={false} wrap> | ||
<EuiFlexItem grow={false}> | ||
<RedirectAppLinks application={application}> | ||
{/* eslint-disable-next-line @elastic/eui/href-or-on-click */} | ||
<EuiButton | ||
data-test-subj="homeAddData" | ||
fill | ||
href={addBasePath('/app/integrations/browse')} | ||
iconType="plusInCircle" | ||
onClick={(event: MouseEvent) => { | ||
trackUiMetric(METRIC_TYPE.CLICK, 'home_tutorial_directory'); | ||
createAppNavigationHandler('/app/integrations/browse')(event); | ||
}} | ||
> | ||
<FormattedMessage | ||
id="home.addData.addDataButtonLabel" | ||
defaultMessage="Add integrations" | ||
/> | ||
</EuiButton> | ||
</RedirectAppLinks> | ||
</EuiFlexItem> | ||
|
||
<EuiFlexGroup gutterSize="m" responsive={false} wrap> | ||
<EuiFlexItem grow={false}> | ||
<RedirectAppLinks application={application}> | ||
{/* eslint-disable-next-line @elastic/eui/href-or-on-click */} | ||
<EuiButton | ||
data-test-subj="homeAddData" | ||
fill | ||
href={addBasePath('/app/home#/tutorial_directory')} | ||
iconType="plusInCircle" | ||
onClick={(event: MouseEvent) => { | ||
trackUiMetric(METRIC_TYPE.CLICK, 'home_tutorial_directory'); | ||
createAppNavigationHandler('/app/home#/tutorial_directory')(event); | ||
}} | ||
<EuiFlexItem grow={false}> | ||
<EuiButtonEmpty | ||
data-test-subj="addSampleData" | ||
href={addBasePath('#/tutorial_directory/sampleData')} | ||
iconType="documents" | ||
> | ||
<FormattedMessage | ||
id="home.addData.addDataButtonLabel" | ||
defaultMessage="Add your data" | ||
id="home.addData.sampleDataButtonLabel" | ||
defaultMessage="Try sample data" | ||
/> | ||
</EuiButton> | ||
</RedirectAppLinks> | ||
</EuiFlexItem> | ||
|
||
<EuiFlexItem grow={false}> | ||
<EuiButtonEmpty | ||
data-test-subj="addSampleData" | ||
href={addBasePath('#/tutorial_directory/sampleData')} | ||
iconType="documents" | ||
> | ||
<FormattedMessage | ||
id="home.addData.sampleDataButtonLabel" | ||
defaultMessage="Try sample data" | ||
/> | ||
</EuiButtonEmpty> | ||
</EuiFlexItem> | ||
</EuiFlexGroup> | ||
</EuiFlexItem> | ||
</EuiButtonEmpty> | ||
</EuiFlexItem> | ||
</EuiFlexGroup> | ||
</EuiFlexItem> | ||
|
||
<EuiFlexItem> | ||
<EuiImage | ||
alt="Illustration of Elastic data integrations" | ||
className="homDataAdd__illustration" | ||
src={ | ||
addBasePath('/plugins/kibanaReact/assets/') + | ||
(isDarkMode | ||
? 'illustration_integrations_darkmode.svg' | ||
: 'illustration_integrations_lightmode.svg') | ||
} | ||
/> | ||
</EuiFlexItem> | ||
</EuiFlexGroup> | ||
</section> | ||
<EuiFlexItem> | ||
<EuiImage | ||
alt="Illustration of Elastic data integrations" | ||
className="homDataAdd__illustration" | ||
src={ | ||
addBasePath('/plugins/kibanaReact/assets/') + | ||
(isDarkMode | ||
? 'illustration_integrations_darkmode.svg' | ||
: 'illustration_integrations_lightmode.svg') | ||
} | ||
/> | ||
</EuiFlexItem> | ||
</EuiFlexGroup> | ||
</section> | ||
|
||
<EuiHorizontalRule margin="xxl" /> | ||
</> | ||
); | ||
<EuiHorizontalRule margin="xxl" /> | ||
</> | ||
); | ||
} else { | ||
return 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.
You need to remove from the translation files (
x-pack/plugins/translations/translations
) all the keys/entries that have a change in their default message, for them to be picked for re-translation.Please double check in case I missed any, but from core's owned files:
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 news to me. I thought this happened automatically?
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.
New keys are automatically collected. Keys that were already present in the translation files always required to be removed to be picked again. Unless I'm wrong here cc @Bamieh for confirmation.
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.
If CI is failing the only requirement is to run this locally:
Retranslations and all these details are automatically handled by our scripts so devs dont have to worry about this.
The long answer is that the
--fix
removes it from the translation file if there is a difference in the passedvalues
keys.When we're about to send the labels to the translators we take the fresh messages from the source code and send the diff of the added/changed labels. Translators send us the new strings back and we integrate it back into the translations file.