Skip to content
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

[APM] Close popover when open Custom Link flyout. #62577

Merged
merged 1 commit into from
Apr 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const Title = () => (
'xpack.apm.settings.customizeUI.customLink.info',
{
defaultMessage:
"These links will be shown in the 'Actions' context menu for the transaction detail."
'These links will be shown in the Actions context menu for transactions.'
}
)}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ export const CustomizeUI = () => {
<>
<EuiTitle size="l">
<h1>
{i18n.translate('xpack.apm.settings.customizeUI', {
defaultMessage: 'Customize UI'
{i18n.translate('xpack.apm.settings.customizeApp', {
defaultMessage: 'Customize app'
})}
</h1>
</EuiTitle>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ export const Settings: React.FC = props => {
isSelected: pathname === '/settings/apm-indices'
},
{
name: i18n.translate('xpack.apm.settings.customizeUI', {
defaultMessage: 'Customize UI'
name: i18n.translate('xpack.apm.settings.customizeApp', {
defaultMessage: 'Customize app'
}),
id: '3',
href: getAPMHref('/settings/customize-ui', search),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ describe('Custom links', () => {
);

expectTextsInDocument(component, [
'No custom links found. Set up your own custom links i.e. a link to a specific Dashboard or external link.'
'No custom links found. Set up your own custom links, e.g., a link to a specific Dashboard or external link.'
]);
expectTextsNotInDocument(component, ['Create']);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export const CustomLink = ({
<EuiText size="xs" grow={false} style={{ width: px(300) }}>
{i18n.translate('xpack.apm.customLink.empty', {
defaultMessage:
'No custom links found. Set up your own custom links i.e. a link to a specific Dashboard or external link.'
'No custom links found. Set up your own custom links, e.g., a link to a specific Dashboard or external link.'
})}
</EuiText>
<EuiSpacer size="s" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,13 @@ export const TransactionActionMenu: FunctionComponent<Props> = ({
urlParams
});

const closePopover = () => {
setIsActionPopoverOpen(false);
setIsCustomLinksPopoverOpen(false);
};

const toggleCustomLinkFlyout = () => {
closePopover();
setIsCustomLinkFlyoutOpen(isOpen => !isOpen);
};

Expand All @@ -111,10 +117,7 @@ export const TransactionActionMenu: FunctionComponent<Props> = ({
)}
<ActionMenu
id="transactionActionMenu"
closePopover={() => {
setIsActionPopoverOpen(false);
setIsCustomLinksPopoverOpen(false);
}}
closePopover={closePopover}
isOpen={isActionPopoverOpen}
anchorPosition="downRight"
button={
Expand Down