Skip to content

Commit

Permalink
PR review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
jportner committed Nov 23, 2020
1 parent 25ee394 commit 7ecb815
Show file tree
Hide file tree
Showing 9 changed files with 53 additions and 39 deletions.
6 changes: 3 additions & 3 deletions src/core/server/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export class Server {
private readonly i18n: I18nService;

private readonly savedObjectsStartPromise: Promise<SavedObjectsServiceStart>;
private savedObjectsStartPromiseResolver!: (value: SavedObjectsServiceStart) => void;
private resolveSavedObjectsStartPromise!: (value: SavedObjectsServiceStart) => void;

#pluginsInitialized?: boolean;
private coreStart?: InternalCoreStart;
Expand Down Expand Up @@ -117,7 +117,7 @@ export class Server {
this.i18n = new I18nService(core);

this.savedObjectsStartPromise = new Promise((resolve) => {
this.savedObjectsStartPromiseResolver = resolve;
this.resolveSavedObjectsStartPromise = resolve;
});
}

Expand Down Expand Up @@ -253,7 +253,7 @@ export class Server {
elasticsearch: elasticsearchStart,
pluginsInitialized: this.#pluginsInitialized,
});
await this.savedObjectsStartPromiseResolver(savedObjectsStart);
await this.resolveSavedObjectsStartPromise(savedObjectsStart);

soStartSpan?.end();
const capabilitiesStart = this.capabilities.start();
Expand Down

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
Expand Up @@ -758,10 +758,14 @@ export class Flyout extends Component<FlyoutProps, FlyoutState> {
<EuiFormRow
fullWidth
label={
<FormattedMessage
id="savedObjectsManagement.objectsTable.flyout.selectFileToImportFormRowLabel"
defaultMessage="Select a file to import"
/>
<EuiTitle size="xs">
<span>
<FormattedMessage
id="savedObjectsManagement.objectsTable.flyout.selectFileToImportFormRowLabel"
defaultMessage="Select a file to import"
/>
</span>
</EuiTitle>
}
>
<EuiFilePicker
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,15 @@ export const ImportModeControl = ({
}}
data-test-subj="savedObjectsManagement-importModeControl"
>
<EuiCheckableCard
id={createNewCopiesEnabled.id}
label={createLabel(createNewCopiesEnabled)}
checked={createNewCopies}
onChange={() => onChange({ createNewCopies: true })}
/>

<EuiSpacer size="s" />

<EuiCheckableCard
id={createNewCopiesDisabled.id}
label={createLabel(createNewCopiesDisabled)}
Expand All @@ -148,15 +157,6 @@ export const ImportModeControl = ({
>
{overwriteRadio}
</EuiCheckableCard>

<EuiSpacer size="s" />

<EuiCheckableCard
id={createNewCopiesEnabled.id}
label={createLabel(createNewCopiesEnabled)}
checked={createNewCopies}
onChange={() => onChange({ createNewCopies: true })}
/>
</EuiFormFieldset>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,15 @@ export const CopyModeControl = ({ initialValues, updateSelection }: CopyModeCont
),
}}
>
<EuiCheckableCard
id={createNewCopiesEnabled.id}
label={createLabel(createNewCopiesEnabled)}
checked={createNewCopies}
onChange={() => onChange({ createNewCopies: true })}
/>

<EuiSpacer size="s" />

<EuiCheckableCard
id={createNewCopiesDisabled.id}
label={createLabel(createNewCopiesDisabled)}
Expand All @@ -140,15 +149,6 @@ export const CopyModeControl = ({ initialValues, updateSelection }: CopyModeCont
data-test-subj={'cts-copyModeControl-overwriteRadioGroup'}
/>
</EuiCheckableCard>

<EuiSpacer size="s" />

<EuiCheckableCard
id={createNewCopiesEnabled.id}
label={createLabel(createNewCopiesEnabled)}
checked={createNewCopies}
onChange={() => onChange({ createNewCopies: true })}
/>
</EuiFormFieldset>

<EuiSpacer size="m" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

import React from 'react';
import { EuiSpacer, EuiFormRow } from '@elastic/eui';
import { EuiSpacer, EuiTitle, EuiFormRow } from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n/react';
import { CopyOptions } from '../types';
import { SavedObjectsManagementRecord } from '../../../../../../src/plugins/saved_objects_management/public';
Expand Down Expand Up @@ -45,14 +45,18 @@ export const CopyToSpaceForm = (props: Props) => {
updateSelection={(newValues: CopyMode) => changeCopyMode(newValues)}
/>

<EuiSpacer />
<EuiSpacer size="m" />

<EuiFormRow
label={
<FormattedMessage
id="xpack.spaces.management.copyToSpace.selectSpacesLabel"
defaultMessage="Select spaces"
/>
<EuiTitle size="xs">
<span>
<FormattedMessage
id="xpack.spaces.management.copyToSpace.selectSpacesLabel"
defaultMessage="Select spaces"
/>
</span>
</EuiTitle>
}
fullWidth
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export const SelectableSpacesControl = (props: Props) => {
className: 'spcCopyToSpace__spacesList',
'data-test-subj': 'cts-form-space-selector',
}}
searchable
searchable={options.length > 6}
>
{(list, search) => {
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ export const SelectableSpacesControl = (props: Props) => {
'data-test-subj': 'sts-form-space-selector',
}}
height={ROW_HEIGHT * 3.5}
searchable
searchable={options.length > 6}
>
{(list, search) => {
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const ShareToSpaceForm = (props: Props) => {
title={
<FormattedMessage
id="xpack.spaces.management.shareToSpace.shareWarningTitle"
defaultMessage="Editing a shared object applies the changes in all spaces"
defaultMessage="Editing a shared object applies the changes in every space"
/>
}
color="warning"
Expand Down

0 comments on commit 7ecb815

Please sign in to comment.