Skip to content

Commit

Permalink
i18n fixes; maps color selection position
Browse files Browse the repository at this point in the history
  • Loading branch information
thompsongl committed Jun 10, 2019
1 parent e5b38f6 commit 55cfac0
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 24 deletions.
24 changes: 10 additions & 14 deletions src/core/public/i18n/i18n_service.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,13 @@ export class I18nService {
'Message when the color picker popover is opened. Describes the interaction with the elements in the popover.',
}
),
'euiColorPicker.swatchAriaLabel': ({ swatch }: EuiValues) => (
<FormattedMessage
id="core.euiColorPicker.swatchAriaLabel"
defaultMessage="Select {swatch} as the color"
description="Screen reader text to describe the action and hex value of the selectable option"
values={{ swatch }}
/>
),
'euiColorPicker.swatchAriaLabel': ({ swatch }: EuiValues) =>
i18n.translate('core.euiColorPicker.swatchAriaLabel', {
defaultMessage: 'Select {swatch} as the color',
values: { swatch },
description:
'Screen reader text to describe the action and hex value of the selectable option',
}),
'euiComboBoxOptionsList.allOptionsSelected': i18n.translate(
'core.euiComboBoxOptionsList.allOptionsSelected',
{
Expand Down Expand Up @@ -213,12 +212,9 @@ export class I18nService {
defaultMessage: 'You are in a popup. To exit this popup, hit Escape.',
}
),
'euiSaturation.roleDescription': () => (
<FormattedMessage
id="core.euiSaturation.roleDescription"
defaultMessage="HSV color mode saturation and value selection"
/>
),
'euiSaturation.roleDescription': i18n.translate('core.euiSaturation.roleDescription', {
defaultMessage: 'HSV color mode saturation and value selection',
}),
'euiSaturation.screenReaderAnnouncement': i18n.translate(
'core.euiSaturation.screenReaderAnnouncement',
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"license": "Apache-2.0",
"dependencies": {
"@elastic/eui": "11.0.1",
"@elastic/eui": "11.3.1",
"react": "^16.8.0"
},
"scripts": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
.mapColorPicker {
padding-top: 9px;

.euiColorPickerPopUp {
z-index: $euiZLevel3;
.euiColorPicker__popoverPanel {
position: fixed;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import {
EuiColorPicker,
EuiFormControlLayout
EuiColorPicker
} from '@elastic/eui';
import { staticColorShape } from '../style_option_shapes';

Expand All @@ -18,13 +17,13 @@ export function StaticColorSelection({ onChange, styleOptions }) {
};

return (
<EuiFormControlLayout>
<div className="mapColorPicker">
<EuiColorPicker
onChange={onColorChange}
color={styleOptions.color}
className="mapColorPicker euiFieldText"
popoverZIndex={9000}
/>
</EuiFormControlLayout>
</div>
);
}

Expand Down

0 comments on commit 55cfac0

Please sign in to comment.