Skip to content

Commit

Permalink
Deprecate Search Session UX (#187923)
Browse files Browse the repository at this point in the history
## Summary

Part of #186334.

Adds a deprecation message to the main components of the Search Sessions
feature: the pop-up indicator (used to save search sessions) and the
management page (used to restore search sessions).

Search sessions indicator:


![image](https://github.com/elastic/kibana/assets/1178348/78c9f078-f01c-4a80-bc30-b60016586a76)

Search sessions management UX:


![image](https://github.com/elastic/kibana/assets/1178348/8bbe483a-94e7-41d6-98ca-3e82872a6057)

### Checklist

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

### Release note

Search Sessions are deprecated and will be removed in a future version.
  • Loading branch information
lukasolson authored Jul 15, 2024
1 parent 37845b0 commit 523e304
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/

import React from 'react';
import { i18n } from '@kbn/i18n';
import { FormattedMessage } from '@kbn/i18n-react';
import { EuiCallOut } from '@elastic/eui';

const searchSessionsDeprecatedWarningTitle = i18n.translate(
'data.searchSessionIndicator.deprecationWarning.title',
{
defaultMessage: 'Deprecated in 8.15.0',
}
);

export interface SearchSessionsDeprecatedWarningProps {
size?: 's' | 'm';
}

export const SearchSessionsDeprecatedWarning = ({
size = 'm',
}: SearchSessionsDeprecatedWarningProps) => (
<EuiCallOut
title={searchSessionsDeprecatedWarningTitle}
size={size}
color="warning"
iconType="help"
data-test-subj="searchSessionsDeprecatedWarningTitle"
>
<FormattedMessage
id="data.searchSessionIndicator.deprecationWarning.textParagraphOne"
defaultMessage="Search Sessions are deprecated and will be removed in a future version."
/>
</EuiCallOut>
);
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import { CheckInEmptyCircle, PartialClock } from './custom_icons';
import './search_session_indicator.scss';
import { SearchSessionName } from './components';
import { SearchSessionState } from '../../search_session_state';
import { SearchSessionsDeprecatedWarning } from '../../search_sessions_deprecation_message';

export interface SearchSessionIndicatorProps {
state: SearchSessionState;
Expand Down Expand Up @@ -404,6 +405,9 @@ export const SearchSessionIndicator = React.forwardRef<
}
>
<div data-test-subj="searchSessionIndicatorPopoverContainer">
<SearchSessionsDeprecatedWarning size="s" />
<EuiSpacer size="m" />

{props.searchSessionName && props.saveSearchSessionNameFn ? (
<SearchSessionName
name={props.searchSessionName}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import type { CoreStart, HttpStart } from '@kbn/core/public';
import type { SearchSessionsMgmtAPI } from '../lib/api';
import type { AsyncSearchIntroDocumentation } from '../lib/documentation';
import { SearchSessionsMgmtTable } from './table';
import { SearchSessionsDeprecatedWarning } from '../../search_sessions_deprecation_message';
import { SearchSessionsConfigSchema } from '../../../../../config';
import { SearchUsageCollector } from '../../../collectors';

Expand Down Expand Up @@ -58,6 +59,9 @@ export function SearchSessionsMgmtMain({ documentation, ...tableProps }: Props)
]}
/>

<EuiSpacer size="l" />
<SearchSessionsDeprecatedWarning />

<EuiSpacer size="l" />
<SearchSessionsMgmtTable data-test-subj="search-sessions-mgmt-table" {...tableProps} />
</>
Expand Down

0 comments on commit 523e304

Please sign in to comment.