Skip to content

Commit

Permalink
Merge branch 'main' into unskipA11yML
Browse files Browse the repository at this point in the history
  • Loading branch information
bhavyarm authored Jun 21, 2023
2 parents ea36862 + ec3b60b commit fd86e97
Show file tree
Hide file tree
Showing 52 changed files with 904 additions and 490 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ examples/developer_examples @elastic/appex-sharedux
examples/discover_customization_examples @elastic/kibana-data-discovery
x-pack/plugins/discover_enhanced @elastic/kibana-data-discovery
src/plugins/discover @elastic/kibana-data-discovery
packages/kbn-doc-links @elastic/kibana-docs
packages/kbn-doc-links @elastic/docs
packages/kbn-docs-utils @elastic/kibana-operations
packages/kbn-dom-drag-drop @elastic/kibana-visualizations @elastic/kibana-data-discovery
packages/kbn-ebt-tools @elastic/kibana-core
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-doc-links/kibana.jsonc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"type": "shared-common",
"id": "@kbn/doc-links",
"owner": "@elastic/kibana-docs"
"owner": "@elastic/docs"
}
2 changes: 1 addition & 1 deletion packages/kbn-dom-drag-drop/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@

export const DEFAULT_DATA_TEST_SUBJ = 'domDragDrop';
export const REORDER_ITEM_HEIGHT = 32;
export const REORDER_ITEM_MARGIN = 8;
export const REORDER_ITEM_MARGIN = 16;
6 changes: 3 additions & 3 deletions packages/kbn-dom-drag-drop/src/drag_drop.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1100,12 +1100,12 @@ describe('DragDrop', () => {
expect(
component.find('[data-test-subj="testDragDrop-translatableDrop"]').at(0).prop('style')
).toEqual({
transform: 'translateY(-4px)',
transform: 'translateY(-8px)',
});
expect(
component.find('[data-test-subj="testDragDrop-translatableDrop"]').at(1).prop('style')
).toEqual({
transform: 'translateY(-4px)',
transform: 'translateY(-8px)',
});

component
Expand Down Expand Up @@ -1258,7 +1258,7 @@ describe('DragDrop', () => {
expect(
component.find('[data-test-subj="testDragDrop-reorderableDrag"]').at(0).prop('style')
).toEqual({
transform: 'translateY(+4px)',
transform: 'translateY(+8px)',
});
expect(
component.find('[data-test-subj="testDragDrop-translatableDrop"]').at(0).prop('style')
Expand Down
10 changes: 5 additions & 5 deletions packages/kbn-dom-drag-drop/src/sass/drag_drop.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
width: 100%;
left: 0;
opacity: .9;
transform: translate($euiSizeXS, $euiSizeXS);
transform: translate($euiSizeS, $euiSizeL);
z-index: $domDragDropZLevel3;
pointer-events: none;
outline: $euiFocusRingSize solid currentColor; // Safari & Firefox
Expand Down Expand Up @@ -138,6 +138,10 @@ $reorderItemMargin: $euiSizeS;
}
}

.domDragDrop--isDragStarted {
opacity: .5;
}

// Draggable item when it is moving
.domDragDrop-isHidden {
opacity: 0;
Expand All @@ -149,10 +153,6 @@ $reorderItemMargin: $euiSizeS;
}
}

.domDragDrop--isDragStarted {
opacity: .5;
}

.domDragDrop__extraDrops {
opacity: 0;
visibility: hidden;
Expand Down
3 changes: 2 additions & 1 deletion test/functional/apps/visualize/group2/_metric_chart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const inspector = getService('inspector');
const PageObjects = getPageObjects(['visualize', 'visEditor', 'visChart', 'timePicker']);

describe('metric chart', function () {
// FAILING ES PROMOTION: https://github.com/elastic/kibana/issues/160164
describe.skip('metric chart', function () {
before(async function () {
await PageObjects.visualize.initTests();
log.debug('navigateToApp visualize');
Expand Down
2 changes: 1 addition & 1 deletion test/functional/services/dashboard/add_panel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export class DashboardAddPanelService extends FtrService {
}

async closeAddPanel() {
await this.flyout.ensureClosed('dashboardAddPanel');
await this.flyout.ensureAllClosed();
}

async filterEmbeddableNames(name: string) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ export default function ({ getService }: PluginFunctionalProviderContext) {
'xpack.upgrade_assistant.featureSet.mlSnapshots (boolean)',
'xpack.upgrade_assistant.featureSet.reindexCorrectiveActions (boolean)',
'xpack.upgrade_assistant.ui.enabled (boolean)',
'xpack.observability.coPilot.enabled (boolean)',
'xpack.observability.aiAssistant.enabled (boolean)',
'xpack.observability.unsafe.alertDetails.metrics.enabled (boolean)',
'xpack.observability.unsafe.alertDetails.logs.enabled (boolean)',
'xpack.observability.unsafe.alertDetails.uptime.enabled (boolean)',
Expand Down
1 change: 1 addition & 0 deletions x-pack/packages/ml/anomaly_utils/custom_urls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export interface MlKibanaUrlConfig extends BaseUrlConfig {
* The optional time range for the custom URL configuration
*/
time_range?: string;
is_custom_time_range?: boolean;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ const pageTitle = i18n.translate(
}
);
const SAFE_SEARCH_API_TAB_TITLE = i18n.translate(
'xpack.enterpriseSearch.content.searchApplications.connect.safeSearchAPITabTitle',
'xpack.enterpriseSearch.content.searchApplications.connect.searchAPITabTitle',
{
defaultMessage: 'Safe Search API',
defaultMessage: 'Search API',
}
);
const DOCUMENTATION_TAB_TITLE = i18n.translate(
Expand All @@ -50,7 +50,7 @@ const DOCUMENTATION_TAB_TITLE = i18n.translate(
const ConnectTabs: string[] = Object.values(SearchApplicationConnectTabs);
const getTabBreadCrumb = (tabId: string) => {
switch (tabId) {
case SearchApplicationConnectTabs.SAFESEARCHAPI:
case SearchApplicationConnectTabs.SEARCHAPI:
return SAFE_SEARCH_API_TAB_TITLE;
case SearchApplicationConnectTabs.DOCUMENTATION:
return DOCUMENTATION_TAB_TITLE;
Expand All @@ -61,7 +61,7 @@ const getTabBreadCrumb = (tabId: string) => {

export const EngineConnect: React.FC = () => {
const { engineName, isLoadingEngine, hasSchemaConflicts } = useValues(EngineViewLogic);
const { connectTabId = SearchApplicationConnectTabs.SAFESEARCHAPI } = useParams<{
const { connectTabId = SearchApplicationConnectTabs.SEARCHAPI } = useParams<{
connectTabId?: string;
}>();

Expand Down Expand Up @@ -106,9 +106,9 @@ export const EngineConnect: React.FC = () => {
rightSideItems: [],
tabs: [
{
isSelected: connectTabId === SearchApplicationConnectTabs.SAFESEARCHAPI,
isSelected: connectTabId === SearchApplicationConnectTabs.SEARCHAPI,
label: SAFE_SEARCH_API_TAB_TITLE,
onClick: onTabClick(SearchApplicationConnectTabs.SAFESEARCHAPI),
onClick: onTabClick(SearchApplicationConnectTabs.SEARCHAPI),
},
{
isSelected: connectTabId === SearchApplicationConnectTabs.DOCUMENTATION,
Expand All @@ -120,7 +120,7 @@ export const EngineConnect: React.FC = () => {
engineName={engineName}
hasSchemaConflicts={hasSchemaConflicts}
>
{connectTabId === SearchApplicationConnectTabs.SAFESEARCHAPI && <SearchApplicationAPI />}
{connectTabId === SearchApplicationConnectTabs.SEARCHAPI && <SearchApplicationAPI />}
{connectTabId === SearchApplicationConnectTabs.DOCUMENTATION && (
<SearchApplicationDocumentation />
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ export const SearchApplicationAPI = () => {
<EuiText>
<p>
<FormattedMessage
id="xpack.enterpriseSearch.content.searchApplication.safeSearchApi.step1.setUpSearchtemplate.description"
id="xpack.enterpriseSearch.content.searchApplication.searchApi.step1.setUpSearchtemplate.description"
defaultMessage="Your search application uses a {searchTemplateDocLink} to control the types of queries it accepts. Run the following command to view your current search template:"
values={{
searchTemplateDocLink: (
<EuiLink href={docLinks.searchTemplates}>
<FormattedMessage
id="xpack.enterpriseSearch.content.searchApplication.safeSearchApi.step1.setUpSearchtemplate.searchTemplateDocLink"
id="xpack.enterpriseSearch.content.searchApplication.searchApi.step1.setUpSearchtemplate.searchTemplateDocLink"
defaultMessage="search template"
/>
</EuiLink>
Expand All @@ -80,13 +80,13 @@ export const SearchApplicationAPI = () => {
<EuiText>
<p>
<FormattedMessage
id="xpack.enterpriseSearch.content.searchApplication.safeSearchApi.step1.setUpSearchtemplate.warning"
id="xpack.enterpriseSearch.content.searchApplication.searchApi.step1.setUpSearchtemplate.warning"
defaultMessage="We provide a basic, default search template to get started, but you'll probably want to update it for your use case. Use the examples in our {searchTemplateExampleDoc} for inspiration."
values={{
searchTemplateExampleDoc: (
<EuiLink href={docLinks.searchApplicationsTemplates}>
<FormattedMessage
id="xpack.enterpriseSearch.content.searchApplication.safeSearchApi.step1.setUpSearchtemplate.warning.searchTemplateExampleDocLink"
id="xpack.enterpriseSearch.content.searchApplication.searchApi.step1.setUpSearchtemplate.warning.searchTemplateExampleDocLink"
defaultMessage="documentation"
/>
</EuiLink>
Expand All @@ -98,7 +98,7 @@ export const SearchApplicationAPI = () => {
</>
),
title: i18n.translate(
'xpack.enterpriseSearch.content.searchApplication.safeSearchApi.step1.setUpSearchtemplate.title',
'xpack.enterpriseSearch.content.searchApplication.searchApi.step1.setUpSearchtemplate.title',
{
defaultMessage: 'Set up your search template',
}
Expand All @@ -110,13 +110,13 @@ export const SearchApplicationAPI = () => {
<EuiText>
<p>
<FormattedMessage
id="xpack.enterpriseSearch.content.searchApplication.safeSearchApi.step2.apiKeyWarning"
defaultMessage="This {apiKeyDocumentation} will only be able to access your Safe Search endpoint."
id="xpack.enterpriseSearch.content.searchApplication.searchApi.step2.apiKeyWarning"
defaultMessage="This {apiKeyDocumentation} will only be able to access your Search endpoint."
values={{
apiKeyDocumentation: (
<EuiLink href={docLinks.apiKeys}>
<FormattedMessage
id="xpack.enterpriseSearch.content.searchApplication.safeSearchApi.step2.apiKeyWarning.documentationLink"
id="xpack.enterpriseSearch.content.searchApplication.searchApi.step2.apiKeyWarning.documentationLink"
defaultMessage="API key"
/>
</EuiLink>
Expand All @@ -132,10 +132,10 @@ export const SearchApplicationAPI = () => {
iconSide="left"
iconType="plusInCircleFilled"
onClick={openGenerateModal}
data-telemetry-id="entSearchApplications-safeSearchApi-step2-createApiKeyButton"
data-telemetry-id="entSearchApplications-searchApi-step2-createApiKeyButton"
>
{i18n.translate(
'xpack.enterpriseSearch.content.searchApplication.safeSearchApi.step2.createAPIKeyButton',
'xpack.enterpriseSearch.content.searchApplication.searchApi.step2.createAPIKeyButton',
{
defaultMessage: 'Create API Key',
}
Expand All @@ -146,15 +146,15 @@ export const SearchApplicationAPI = () => {
<EuiButton
iconSide="left"
iconType="popout"
data-telemetry-id="entSearchApplications-safeSearchApi-step2-viewKeysButton"
data-telemetry-id="entSearchApplications-searchApi-step2-viewKeysButton"
onClick={() =>
KibanaLogic.values.navigateToUrl('/app/management/security/api_keys', {
shouldNotCreateHref: true,
})
}
>
{i18n.translate(
'xpack.enterpriseSearch.content.searchApplication.safeSearchApi.step2.viewKeysButton',
'xpack.enterpriseSearch.content.searchApplication.searchApi.step2.viewKeysButton',
{
defaultMessage: 'View Keys',
}
Expand All @@ -165,7 +165,7 @@ export const SearchApplicationAPI = () => {
</>
),
title: i18n.translate(
'xpack.enterpriseSearch.content.searchApplication.safeSearchApi.step2.title',
'xpack.enterpriseSearch.content.searchApplication.searchApi.step2.title',
{
defaultMessage: 'Generate and save API key',
}
Expand All @@ -177,7 +177,7 @@ export const SearchApplicationAPI = () => {
<EuiText>
<p>
{i18n.translate(
'xpack.enterpriseSearch.content.searchApplication.safeSearchApi.step3.copyEndpointDescription',
'xpack.enterpriseSearch.content.searchApplication.searchApi.step3.copyEndpointDescription',
{
defaultMessage: "Here's the URL for your endpoint:",
}
Expand All @@ -197,16 +197,16 @@ export const SearchApplicationAPI = () => {
</>
),
title: i18n.translate(
'xpack.enterpriseSearch.content.searchApplication.safeSearchApi.step3.title',
'xpack.enterpriseSearch.content.searchApplication.searchApi.step3.title',
{
defaultMessage: 'Copy your Safe Search endpoint',
defaultMessage: 'Copy your Search endpoint',
}
),
},
{
children: <EngineApiIntegrationStage />,
title: i18n.translate(
'xpack.enterpriseSearch.content.searchApplication.safeSearchApi.step4.title',
'xpack.enterpriseSearch.content.searchApplication.searchApi.step4.title',
{
defaultMessage: 'Learn how to call your endpoint',
}
Expand All @@ -226,25 +226,25 @@ export const SearchApplicationAPI = () => {
iconType="iInCircle"
title={
<FormattedMessage
id="xpack.enterpriseSearch.content.searchApplication.safeSearchApi.safeSearchCallout.title"
defaultMessage="What is Safe Search API?"
id="xpack.enterpriseSearch.content.searchApplication.searchApi.searchApiCallout.title"
defaultMessage="What is Search API?"
/>
}
>
<FormattedMessage
id="xpack.enterpriseSearch.content.searchApplication.safeSearchApi.safeSearchCallout.body"
defaultMessage="The {safeSearchDocumentation} allows you to create a secure, public-facing search endpoint for your search application. This endpoint only accepts queries that match the parameters defined in your {searchTemplateDocumenation}."
id="xpack.enterpriseSearch.content.searchApplication.searchApi.searchApiCallout.body"
defaultMessage="The {searchApiDocumentation} allows you to create a secure, public-facing search endpoint for your search application. This endpoint only accepts queries that match the parameters defined in your {searchTemplateDocumenation}."
values={{
safeSearchDocumentation: (
searchApiDocumentation: (
<EuiLink
data-test-subj="safe-search-documentation-link"
href="#" // replace with safe search api doc link
data-telemetry-id="entSearchApplications-safeSearchApi-documentation-viewDocumentaion"
data-test-subj="search-documentation-link"
href="#" // replace with search api doc link
data-telemetry-id="entSearchApplications-searchApi-documentation-viewDocumentaion"
>
{i18n.translate(
'xpack.enterpriseSearch.content.searchApplication.safeSearchApi.safeSearchCallout.body.safeSearchDocLink',
'xpack.enterpriseSearch.content.searchApplication.searchApi.searchApiCallout.body.searchApiDocLink',
{
defaultMessage: 'Safe Search API',
defaultMessage: 'Search API',
}
)}
</EuiLink>
Expand All @@ -256,7 +256,7 @@ export const SearchApplicationAPI = () => {
data-telemetry-id="entSearchApplications-searchTemplate-documentation-viewDocumentaion"
>
{i18n.translate(
'xpack.enterpriseSearch.content.searchApplication.safeSearchApi.safeSearchCallout.body.searchTemplateDocLink',
'xpack.enterpriseSearch.content.searchApplication.searchApi.searchApiCallout.body.searchTemplateDocLink',
{
defaultMessage: 'search template',
}
Expand All @@ -267,20 +267,20 @@ export const SearchApplicationAPI = () => {
/>
<EuiSpacer size="l" />
<FormattedMessage
id="xpack.enterpriseSearch.content.searchApplication.safeSearchApi.safeSearchCallout.safeSearchLearnMore"
defaultMessage="{safeSearchDocumentation}"
id="xpack.enterpriseSearch.content.searchApplication.searchApi.searchApiCallout.searchApiLearnMore"
defaultMessage="{searchApiDocumentation}"
values={{
safeSearchDocumentation: (
searchApiDocumentation: (
<EuiLink
data-test-subj="safe-search-documentation-link"
href="#" // replace with safe search api doc link
data-test-subj="search-documentation-link"
href="#" // replace with search api doc link
target="_blank"
data-telemetry-id="entSearchApplications-safeSearchApi-learnMoreDocumentation-viewDocumentaion"
data-telemetry-id="entSearchApplications-searchApi-learnMoreDocumentation-viewDocumentaion"
>
{i18n.translate(
'xpack.enterpriseSearch.content.searchApplication.safeSearchApi.safeSearchCallout.body.safeSearchDocumentationLink',
'xpack.enterpriseSearch.content.searchApplication.searchApi.searchApiCallout.body.searchApiDocumentationLink',
{
defaultMessage: 'Learn more about the Safe Search API',
defaultMessage: 'Learn more about the Search API',
}
)}
</EuiLink>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ const ConfigurationPopover: React.FC<ConfigurationPopOverProps> = ({
onClick={() =>
navigateToUrl(
generateEncodedPath(SEARCH_APPLICATION_CONNECT_PATH, {
connectTabId: SearchApplicationConnectTabs.SAFESEARCHAPI,
connectTabId: SearchApplicationConnectTabs.SEARCHAPI,
engineName,
})
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export const EngineView: React.FC = () => {
<Route path={SEARCH_APPLICATION_CONNECT_PATH} component={EngineConnect} />
<Redirect
from={`${ENGINE_PATH}/${EngineViewTabs.CONNECT}`}
to={`${ENGINE_PATH}/${EngineViewTabs.CONNECT}/${SearchApplicationConnectTabs.SAFESEARCHAPI}`}
to={`${ENGINE_PATH}/${EngineViewTabs.CONNECT}/${SearchApplicationConnectTabs.SEARCHAPI}`}
/>
<Route>
<EnterpriseSearchEnginesPageTemplate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const ENGINE_PATH = `${ENGINES_PATH}/:engineName`;
export const ENGINE_TAB_PATH = `${ENGINE_PATH}/:tabId`;
export const SEARCH_APPLICATION_CONNECT_PATH = `${ENGINE_PATH}/${EngineViewTabs.CONNECT}/:connectTabId`;
export enum SearchApplicationConnectTabs {
SAFESEARCHAPI = 'safe_search_api',
SEARCHAPI = 'search_api',
DOCUMENTATION = 'documentation',
}
export const SEARCH_APPLICATION_CONTENT_PATH = `${ENGINE_PATH}/${EngineViewTabs.CONTENT}/:contentTabId`;
Expand Down
Loading

0 comments on commit fd86e97

Please sign in to comment.