Skip to content

Commit 7231bcd

Browse files
authored
[Background search] Update warning icons (elastic#237675)
## Summary Closes elastic#237280 This adds a flex group to the background search name / warning icons so they gave some gutter between them. This also updates the tooltips for the warnings to say "background search" instead of "search session" | Before | After | |--------|------| | <img width="267" height="79" alt="image" src="https://github.com/user-attachments/assets/368dbbcd-be36-4416-92b7-83fb3917f9f6" /> | <img width="290" height="83" alt="image" src="https://github.com/user-attachments/assets/fae14034-93e7-4db1-8a9d-10b81164c1e0" /> | | <img width="386" height="137" alt="Captura de pantalla 2025-10-06 a las 17 14 32" src="https://github.com/user-attachments/assets/18c46c40-27f5-46e8-ae98-1748e1e59c71" /> | <img width="403" height="145" alt="image" src="https://github.com/user-attachments/assets/bc00e0e8-2404-41f3-8c07-233746ec640f" /> | | <img width="395" height="155" alt="image" src="https://github.com/user-attachments/assets/03b93e27-c86c-42f6-a4d1-9ef241868666" /> | <img width="405" height="158" alt="image" src="https://github.com/user-attachments/assets/c6b372b4-9e7f-4d45-8468-2cbec2152867" /> | ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [x] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels.
1 parent e0f928f commit 7231bcd

1 file changed

Lines changed: 38 additions & 28 deletions

File tree

  • src/platform/plugins/shared/data/public/search/session/sessions_mgmt/components/table/columns

src/platform/plugins/shared/data/public/search/session/sessions_mgmt/components/table/columns/name.tsx

Lines changed: 38 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@
88
*/
99

1010
import type { EuiBasicTableColumn } from '@elastic/eui';
11-
import { EuiIconTip, EuiLink, EuiText } from '@elastic/eui';
11+
import { EuiFlexGroup, EuiFlexItem, EuiIconTip, EuiLink, EuiText } from '@elastic/eui';
1212
import { i18n } from '@kbn/i18n';
1313
import React from 'react';
1414
import { FormattedMessage } from '@kbn/i18n-react';
1515
import { RedirectAppLinks } from '@kbn/shared-ux-link-redirect-app';
1616
import type { CoreStart } from '@kbn/core/public';
17+
import { css } from '@emotion/react';
1718
import { SearchSessionStatus } from '../../../../../../../common';
1819
import type { SearchUsageCollector } from '../../../../../collectors';
1920
import type { BackgroundSearchOpenedHandler, UISession } from '../../../types';
@@ -76,17 +77,15 @@ export const nameColumn = ({
7677
? searchUsageCollector.trackSessionViewRestored
7778
: searchUsageCollector.trackSessionReloaded;
7879
const notRestorableWarning = isRestorable ? null : (
79-
<>
80-
<EuiIconTip
81-
type="warning"
82-
content={
83-
<FormattedMessage
84-
id="data.mgmt.searchSessions.table.notRestorableWarning"
85-
defaultMessage="The search session will be executed again. You can then save it for future use."
86-
/>
87-
}
88-
/>
89-
</>
80+
<EuiIconTip
81+
type="warning"
82+
content={
83+
<FormattedMessage
84+
id="data.mgmt.searchSessions.table.notRestorableWarning"
85+
defaultMessage="The background search will be executed again. You can then save it for future use."
86+
/>
87+
}
88+
/>
9089
);
9190

9291
// show version warning only if:
@@ -95,19 +94,16 @@ export const nameColumn = ({
9594
// 2. if still can restore this session: it has IN_PROGRESS or COMPLETE status.
9695
const versionIncompatibleWarning =
9796
isRestorable && version !== kibanaVersion ? (
98-
<>
99-
{' '}
100-
<EuiIconTip
101-
type="warning"
102-
iconProps={{ 'data-test-subj': 'versionIncompatibleWarningTestSubj' }}
103-
content={
104-
<FormattedMessage
105-
id="data.mgmt.searchSessions.table.versionIncompatibleWarning"
106-
defaultMessage="This search session was created in a Kibana instance running a different version. It may not restore correctly."
107-
/>
108-
}
109-
/>
110-
</>
97+
<EuiIconTip
98+
type="warning"
99+
iconProps={{ 'data-test-subj': 'versionIncompatibleWarningTestSubj' }}
100+
content={
101+
<FormattedMessage
102+
id="data.mgmt.searchSessions.table.versionIncompatibleWarning"
103+
defaultMessage="This background search was created in a Kibana instance running a different version. It may not restore correctly."
104+
/>
105+
}
106+
/>
111107
) : null;
112108

113109
return (
@@ -125,12 +121,26 @@ export const nameColumn = ({
125121
}}
126122
>
127123
<TableText data-test-subj="sessionManagementNameCol">
128-
{name}
129-
{notRestorableWarning}
130-
{versionIncompatibleWarning}
124+
<EuiFlexGroup gutterSize="s" alignItems="center">
125+
<EuiFlexItem grow={false}>{name}</EuiFlexItem>
126+
{notRestorableWarning && (
127+
<EuiFlexItem css={iconCss} grow={false}>
128+
{notRestorableWarning}
129+
</EuiFlexItem>
130+
)}
131+
{versionIncompatibleWarning && (
132+
<EuiFlexItem css={iconCss} grow={false}>
133+
{versionIncompatibleWarning}
134+
</EuiFlexItem>
135+
)}
136+
</EuiFlexGroup>
131137
</TableText>
132138
</NameColumnText>
133139
</RedirectAppLinks>
134140
);
135141
},
136142
});
143+
144+
const iconCss = css`
145+
line-height: 1;
146+
`;

0 commit comments

Comments
 (0)