@atlaskit/link-picker 1.27.1 → 1.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/compass.yml +1 -1
  3. package/dist/cjs/common/constants.js +1 -9
  4. package/dist/cjs/common/ui/min-height-container/styled.js +1 -1
  5. package/dist/cjs/ui/link-picker/form-footer/feature-discovery/index.js +52 -0
  6. package/dist/cjs/ui/link-picker/form-footer/feature-discovery/styled.js +16 -0
  7. package/dist/cjs/ui/link-picker/form-footer/index.js +21 -11
  8. package/dist/cjs/ui/link-picker/index.js +13 -4
  9. package/dist/cjs/ui/link-picker/search-results/index.js +6 -5
  10. package/dist/cjs/ui/link-picker/search-results/link-search-list/index.js +3 -1
  11. package/dist/cjs/ui/link-picker/search-results/link-search-list/styled.js +2 -2
  12. package/dist/cjs/ui/link-picker/search-results/search-results-container/index.js +28 -0
  13. package/dist/cjs/ui/link-picker/search-results/search-results-container/styled.js +12 -0
  14. package/dist/cjs/ui/link-picker/search-results/styled.js +1 -1
  15. package/dist/cjs/ui/link-picker/styled.js +3 -7
  16. package/dist/cjs/ui/loader-fallback/index.js +15 -5
  17. package/dist/cjs/ui/loader-fallback/styled.js +12 -0
  18. package/dist/cjs/version.json +1 -1
  19. package/dist/es2019/common/constants.js +0 -4
  20. package/dist/es2019/common/ui/min-height-container/styled.js +1 -1
  21. package/dist/es2019/ui/link-picker/form-footer/feature-discovery/index.js +41 -0
  22. package/dist/es2019/ui/link-picker/form-footer/feature-discovery/styled.js +15 -0
  23. package/dist/es2019/ui/link-picker/form-footer/index.js +15 -8
  24. package/dist/es2019/ui/link-picker/index.js +12 -3
  25. package/dist/es2019/ui/link-picker/search-results/index.js +7 -6
  26. package/dist/es2019/ui/link-picker/search-results/link-search-list/index.js +3 -1
  27. package/dist/es2019/ui/link-picker/search-results/link-search-list/styled.js +3 -5
  28. package/dist/es2019/ui/link-picker/search-results/search-results-container/index.js +19 -0
  29. package/dist/es2019/ui/link-picker/search-results/search-results-container/styled.js +7 -0
  30. package/dist/es2019/ui/link-picker/search-results/styled.js +1 -0
  31. package/dist/es2019/ui/link-picker/styled.js +0 -9
  32. package/dist/es2019/ui/loader-fallback/index.js +13 -3
  33. package/dist/es2019/ui/loader-fallback/styled.js +4 -0
  34. package/dist/es2019/version.json +1 -1
  35. package/dist/esm/common/constants.js +0 -4
  36. package/dist/esm/common/ui/min-height-container/styled.js +1 -1
  37. package/dist/esm/ui/link-picker/form-footer/feature-discovery/index.js +44 -0
  38. package/dist/esm/ui/link-picker/form-footer/feature-discovery/styled.js +8 -0
  39. package/dist/esm/ui/link-picker/form-footer/index.js +21 -11
  40. package/dist/esm/ui/link-picker/index.js +13 -4
  41. package/dist/esm/ui/link-picker/search-results/index.js +7 -6
  42. package/dist/esm/ui/link-picker/search-results/link-search-list/index.js +3 -1
  43. package/dist/esm/ui/link-picker/search-results/link-search-list/styled.js +2 -2
  44. package/dist/esm/ui/link-picker/search-results/search-results-container/index.js +20 -0
  45. package/dist/esm/ui/link-picker/search-results/search-results-container/styled.js +4 -0
  46. package/dist/esm/ui/link-picker/search-results/styled.js +1 -1
  47. package/dist/esm/ui/link-picker/styled.js +2 -4
  48. package/dist/esm/ui/loader-fallback/index.js +13 -3
  49. package/dist/esm/ui/loader-fallback/styled.js +4 -0
  50. package/dist/esm/version.json +1 -1
  51. package/dist/types/common/constants.d.ts +0 -4
  52. package/dist/types/common/types.d.ts +1 -0
  53. package/dist/types/ui/link-picker/form-footer/feature-discovery/index.d.ts +15 -0
  54. package/dist/types/ui/link-picker/form-footer/feature-discovery/styled.d.ts +1 -0
  55. package/dist/types/ui/link-picker/form-footer/index.d.ts +4 -1
  56. package/dist/types/ui/link-picker/index.d.ts +1 -0
  57. package/dist/types/ui/link-picker/search-results/search-results-container/index.d.ts +5 -0
  58. package/dist/types/ui/link-picker/search-results/search-results-container/styled.d.ts +1 -0
  59. package/dist/types/ui/link-picker/styled.d.ts +0 -2
  60. package/dist/types/ui/loader-fallback/styled.d.ts +1 -0
  61. package/dist/types-ts4.5/common/constants.d.ts +0 -4
  62. package/dist/types-ts4.5/common/types.d.ts +1 -0
  63. package/dist/types-ts4.5/ui/link-picker/form-footer/feature-discovery/index.d.ts +15 -0
  64. package/dist/types-ts4.5/ui/link-picker/form-footer/feature-discovery/styled.d.ts +1 -0
  65. package/dist/types-ts4.5/ui/link-picker/form-footer/index.d.ts +4 -1
  66. package/dist/types-ts4.5/ui/link-picker/index.d.ts +1 -0
  67. package/dist/types-ts4.5/ui/link-picker/search-results/search-results-container/index.d.ts +5 -0
  68. package/dist/types-ts4.5/ui/link-picker/search-results/search-results-container/styled.d.ts +1 -0
  69. package/dist/types-ts4.5/ui/link-picker/styled.d.ts +0 -2
  70. package/dist/types-ts4.5/ui/loader-fallback/styled.d.ts +1 -0
  71. package/package.json +9 -6
  72. package/tmp/api-report-tmp.d.ts +123 -0
@@ -5,6 +5,7 @@ import { FormattedMessage, useIntl } from 'react-intl-next';
5
5
  import { useAnalyticsEvents } from '@atlaskit/analytics-next';
6
6
  import { isSafeUrl, normalizeUrl } from '@atlaskit/linking-common/url';
7
7
  import { browser } from '@atlaskit/linking-common/user-agent';
8
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
8
9
  import VisuallyHidden from '@atlaskit/visually-hidden';
9
10
  import { useLinkPickerAnalytics, withInputFieldTracking, withLinkPickerAnalyticsContext } from '../../common/analytics';
10
11
  import { ANALYTICS_CHANNEL } from '../../common/constants';
@@ -36,7 +37,9 @@ const initState = {
36
37
  selectedIndex: -1,
37
38
  invalidUrl: false,
38
39
  activeTab: 0,
39
- preventHidingRecents: false
40
+ preventHidingRecents: false,
41
+ /** This only allows the feature discovery pulse - to be shown the ff must be on and active tab be Jira */
42
+ allowCreateFeatureDiscovery: true
40
43
  };
41
44
  function reducer(state, payload) {
42
45
  if (payload.url && state.url !== payload.url) {
@@ -44,6 +47,8 @@ function reducer(state, payload) {
44
47
  ...state,
45
48
  invalidUrl: false,
46
49
  selectedIndex: isSafeUrl(payload.url) && payload.url.length ? -1 : state.selectedIndex,
50
+ /** When the user starts entering a url, stop pulsing the create button */
51
+ allowCreateFeatureDiscovery: false,
47
52
  ...payload
48
53
  };
49
54
  }
@@ -93,7 +98,8 @@ export const LinkPicker = withLinkPickerAnalyticsContext( /*#__PURE__*/memo(({
93
98
  url,
94
99
  displayText,
95
100
  invalidUrl,
96
- activeTab
101
+ activeTab,
102
+ allowCreateFeatureDiscovery
97
103
  } = state;
98
104
  const intl = useIntl();
99
105
  const queryState = useSearchQuery(state);
@@ -316,7 +322,7 @@ export const LinkPicker = withLinkPickerAnalyticsContext( /*#__PURE__*/memo(({
316
322
  "aria-label": intl.formatMessage(linkTextMessages.linkTextAriaLabel),
317
323
  onClear: handleClear,
318
324
  onChange: handleChangeText
319
- }), !!queryState && jsx(SearchResults, {
325
+ }), !!queryState && (isLoadingPlugins || isActivePlugin) && jsx(SearchResults, {
320
326
  activeTab: activeTab,
321
327
  tabs: tabs,
322
328
  activePlugin: activePlugin,
@@ -345,5 +351,8 @@ export const LinkPicker = withLinkPickerAnalyticsContext( /*#__PURE__*/memo(({
345
351
  onCancel: onCancel,
346
352
  action: pluginAction,
347
353
  css: !queryState || !(plugins !== null && plugins !== void 0 && plugins.length) ? formFooterMargin : undefined
354
+ /* Show the feature discovery pulse when we're on the Jira tab, we haven't started typing a url and
355
+ the feature flag is enabled */,
356
+ createFeatureDiscovery: (activePlugin === null || activePlugin === void 0 ? void 0 : activePlugin.tabKey) === 'jira' && allowCreateFeatureDiscovery && getBooleanFF('platform.linking-platform.link-picker.enable-jira-create')
348
357
  }));
349
358
  }));
@@ -8,7 +8,8 @@ import { useFixHeight } from '../../../controllers/use-fix-height';
8
8
  import { LinkSearchError, testIds as searchErrorTestIds } from './link-search-error';
9
9
  import { LinkSearchList, testIds as listTestIds } from './link-search-list';
10
10
  import { ScrollingTabList } from './scrolling-tabs';
11
- import { flexColumnStyles, spinnerContainerStyles, tabsWrapperStyles } from './styled';
11
+ import { SearchResultsContainer } from './search-results-container';
12
+ import { spinnerContainerStyles, tabsWrapperStyles } from './styled';
12
13
  import { TrackTabViewed } from './track-tab-viewed';
13
14
  export const testIds = {
14
15
  ...searchErrorTestIds,
@@ -45,7 +46,9 @@ export const SearchResults = ({
45
46
  key: tab.tabTitle,
46
47
  testId: testIds.tabItem
47
48
  }, tab.tabTitle)));
48
- return jsx(Fragment, null, isLoadingPlugins && !!queryState && jsx("div", {
49
+ return jsx(SearchResultsContainer, _extends({
50
+ hasTabs: !!tabs.length || isLoadingPlugins
51
+ }, fixListHeightProps), isLoadingPlugins && !!queryState && jsx("div", {
49
52
  css: spinnerContainerStyles
50
53
  }, jsx(Spinner, {
51
54
  testId: testIds.tabsLoadingIndicator,
@@ -59,9 +62,7 @@ export const SearchResults = ({
59
62
  onChange: handleTabChange
60
63
  }, featureFlags !== null && featureFlags !== void 0 && featureFlags.scrollingTabs ? jsx(ScrollingTabList, null, tabList) : tabList), jsx(TrackTabViewed, {
61
64
  activePlugin: activePlugin
62
- })), jsx("div", _extends({
63
- css: flexColumnStyles
64
- }, fixListHeightProps), !error && jsx(LinkSearchList, {
65
+ })), !error && jsx(LinkSearchList, {
65
66
  id: linkSearchListId,
66
67
  role: "listbox",
67
68
  items: items,
@@ -73,5 +74,5 @@ export const SearchResults = ({
73
74
  onKeyDown: handleKeyDown,
74
75
  hasSearchTerm: !!(queryState !== null && queryState !== void 0 && queryState.query.length),
75
76
  activePlugin: activePlugin
76
- }), error && ((_activePlugin$errorFa = activePlugin === null || activePlugin === void 0 ? void 0 : (_activePlugin$errorFa2 = activePlugin.errorFallback) === null || _activePlugin$errorFa2 === void 0 ? void 0 : _activePlugin$errorFa2.call(activePlugin, error, retry)) !== null && _activePlugin$errorFa !== void 0 ? _activePlugin$errorFa : jsx(LinkSearchError, null)))));
77
+ }), error && ((_activePlugin$errorFa = activePlugin === null || activePlugin === void 0 ? void 0 : (_activePlugin$errorFa2 = activePlugin.errorFallback) === null || _activePlugin$errorFa2 === void 0 ? void 0 : _activePlugin$errorFa2.call(activePlugin, error, retry)) !== null && _activePlugin$errorFa !== void 0 ? _activePlugin$errorFa : jsx(LinkSearchError, null))));
77
78
  };
@@ -6,6 +6,7 @@ import { defineMessages, FormattedMessage } from 'react-intl-next';
6
6
  import { getBooleanFF } from '@atlaskit/platform-feature-flags';
7
7
  import Spinner from '@atlaskit/spinner';
8
8
  import VisuallyHidden from '@atlaskit/visually-hidden';
9
+ import { MinHeightContainer } from '../../../../common/ui/min-height-container';
9
10
  import { handleNavKeyDown } from '../../../../common/utils/handleNavKeyDown';
10
11
  import { NoResults, testIds as noResultsTestIds } from './link-search-no-results';
11
12
  import { emptyStateNoResultsWrapper } from './link-search-no-results/styled';
@@ -139,7 +140,8 @@ export const LinkSearchList = /*#__PURE__*/forwardRef(({
139
140
  }))));
140
141
  }
141
142
  if (isLoading) {
142
- loadingContent = jsx("div", {
143
+ loadingContent = jsx(MinHeightContainer, {
144
+ minHeight: getBooleanFF('platform.linking-platform.link-picker.fixed-height-search-results') ? '50px' : '80px',
143
145
  css: spinnerContainerStyles
144
146
  }, jsx(Spinner, {
145
147
  testId: testIds.searchResultLoadingIndicator,
@@ -4,6 +4,7 @@ import { css } from '@emotion/react';
4
4
  // eslint-disable-next-line @atlassian/tangerine/import/entry-points
5
5
  import { typography } from '@atlaskit/theme';
6
6
  export const listContainerStyles = css`
7
+ width: 100%;
7
8
  padding-top: 0;
8
9
  min-height: 80px;
9
10
  margin-top: ${"var(--ds-space-200, 16px)"};
@@ -13,12 +14,9 @@ export const listContainerStyles = css`
13
14
  flex-direction: column;
14
15
  `;
15
16
  export const spinnerContainerStyles = css`
16
- text-align: center;
17
- min-height: 80px;
18
- display: flex;
19
- align-items: center;
20
- justify-content: center;
21
17
  flex-grow: 1;
18
+ flex-direction: column;
19
+ align-items: center;
22
20
  `;
23
21
  export const listStyles = css`
24
22
  padding: 0;
@@ -0,0 +1,19 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ /** @jsx jsx */
3
+ import { forwardRef } from 'react';
4
+ import { jsx } from '@emotion/react';
5
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
6
+ import { MinHeightContainer } from '../../../../common/ui/min-height-container';
7
+ import { flexColumn } from './styled';
8
+ export const SearchResultsContainer = /*#__PURE__*/forwardRef(({
9
+ hasTabs,
10
+ ...props
11
+ }, ref) => {
12
+ const minHeight = hasTabs ? '347px' : '302px';
13
+ const ffMinHeight = getBooleanFF('platform.linking-platform.link-picker.fixed-height-search-results') ? minHeight : 'auto';
14
+ return jsx(MinHeightContainer, _extends({
15
+ ref: ref,
16
+ minHeight: ffMinHeight,
17
+ css: flexColumn
18
+ }, props));
19
+ });
@@ -0,0 +1,7 @@
1
+ import { css } from '@emotion/react';
2
+ export const flexColumn = css`
3
+ display: flex;
4
+ flex-direction: column;
5
+ justify-content: flex-start;
6
+ width: 100%;
7
+ `;
@@ -9,6 +9,7 @@ export const spinnerContainerStyles = css`
9
9
  display: flex;
10
10
  align-items: center;
11
11
  justify-content: center;
12
+ align-self: center;
12
13
  flex-grow: 1;
13
14
  `;
14
15
  export const flexColumnStyles = css`
@@ -12,15 +12,6 @@ export const rootContainerStyles = css`
12
12
  box-sizing: border-box;
13
13
  line-height: initial;
14
14
  `;
15
- export const tabsWrapperStyles = css`
16
- margin-top: ${"var(--ds-space-150, 12px)"};
17
- margin-left: calc(-1 * ${"var(--ds-space-100, 8px)"});
18
- margin-right: calc(-1 * ${"var(--ds-space-100, 8px)"});
19
- `;
20
- export const flexColumnStyles = css`
21
- display: flex;
22
- flex-direction: column;
23
- `;
24
15
  export const formFooterMargin = css`
25
16
  margin-top: ${"var(--ds-space-200, 16px)"};
26
17
  `;
@@ -2,8 +2,14 @@
2
2
  import { jsx } from '@emotion/react';
3
3
  import { getBooleanFF } from '@atlaskit/platform-feature-flags';
4
4
  import Spinner from '@atlaskit/spinner';
5
- import { LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_TABS_WITH_DISPLAYTEXT, LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_TABS_WITHOUT_DISPLAYTEXT, LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_TABS_WITH_DISPLAYTEXT, LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_TABS_WITHOUT_DISPLAYTEXT } from '../../common/constants';
6
5
  import { MinHeightContainer } from '../../common/ui/min-height-container';
6
+ import { styles } from './styled';
7
+ const LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_TABS_WITHOUT_DISPLAYTEXT = '472px';
8
+ const LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_TABS_WITH_DISPLAYTEXT = '550px';
9
+ const LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_TABS_WITH_PLUGIN_WITH_DISPLAYTEXT = '505px';
10
+ const LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_TABS_WITH_PLUGIN_WITHOUT_DISPLAYTEXT = '429px';
11
+ const LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_TABS_WITH_DISPLAYTEXT = '218px';
12
+ const LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_TABS_WITHOUT_DISPLAYTEXT = '141px';
7
13
  // EDM-7122: can delete these two consts once min height container for link picker is firm for the loader
8
14
  const LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_DISPLAYTEXT = '142px';
9
15
  const LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_DISPLAYTEXT = '220px';
@@ -13,9 +19,12 @@ const getEstimatedMinHeight = ({
13
19
  plugins
14
20
  }) => {
15
21
  if (getBooleanFF('platform.linking-platform.link-picker.fixed-height-search-results')) {
16
- if (plugins !== null && plugins !== void 0 && plugins.length || isLoadingPlugins) {
22
+ if (plugins && plugins.length > 1 || isLoadingPlugins) {
17
23
  return hideDisplayText ? LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_TABS_WITHOUT_DISPLAYTEXT : LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_TABS_WITH_DISPLAYTEXT;
18
24
  }
25
+ if ((plugins === null || plugins === void 0 ? void 0 : plugins.length) === 1) {
26
+ return hideDisplayText ? LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_TABS_WITH_PLUGIN_WITHOUT_DISPLAYTEXT : LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_TABS_WITH_PLUGIN_WITH_DISPLAYTEXT;
27
+ }
19
28
  return hideDisplayText ? LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_TABS_WITHOUT_DISPLAYTEXT : LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_TABS_WITH_DISPLAYTEXT;
20
29
  }
21
30
  return hideDisplayText ? LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_DISPLAYTEXT : LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_DISPLAYTEXT;
@@ -29,7 +38,8 @@ export const LoaderFallback = props => {
29
38
  const minHeight = getEstimatedMinHeight(props);
30
39
  return jsx(MinHeightContainer, {
31
40
  minHeight: minHeight,
32
- "data-testid": "link-picker-root-loader-boundary-ui"
41
+ "data-testid": "link-picker-root-loader-boundary-ui",
42
+ css: styles
33
43
  }, jsx(Spinner, {
34
44
  testId: "link-picker.component-loading-indicator",
35
45
  size: "medium"
@@ -0,0 +1,4 @@
1
+ import { css } from '@emotion/react';
2
+ export const styles = css`
3
+ align-items: center;
4
+ `;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/link-picker",
3
- "version": "1.27.1",
3
+ "version": "1.28.0",
4
4
  "sideEffects": false
5
5
  }
@@ -2,8 +2,4 @@ export var ANALYTICS_CHANNEL = 'media';
2
2
  export var COMPONENT_NAME = 'linkPicker';
3
3
  export var RECENT_SEARCH_LIST_SIZE = 5;
4
4
  export var LINK_PICKER_WIDTH_IN_PX = 342;
5
- export var LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_TABS_WITHOUT_DISPLAYTEXT = '472px';
6
- export var LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_TABS_WITH_DISPLAYTEXT = '550px';
7
- export var LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_TABS_WITH_DISPLAYTEXT = '218px';
8
- export var LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_TABS_WITHOUT_DISPLAYTEXT = '141px';
9
5
  export var LINK_PICKER_MIN_HEIGHT_IN_PX_FALLBACK = '290px';
@@ -1,4 +1,4 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
2
  var _templateObject;
3
3
  import { css } from '@emotion/react';
4
- export var minHeightComponentStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: var(--link-picker-min-height);\n"])));
4
+ export var minHeightComponentStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n align-items: stretch;\n justify-content: center;\n min-height: var(--link-picker-min-height);\n"])));
@@ -0,0 +1,44 @@
1
+ /** @jsx jsx */
2
+ import { useEffect, useMemo } from 'react';
3
+ import { jsx } from '@emotion/react';
4
+ import { StorageClient } from '@atlaskit/frontend-utilities/storage-client';
5
+ import { pulseStyles } from './styled';
6
+ var LOCAL_STORAGE_CLIENT_KEY = '@atlaskit/link-picker';
7
+ var LOCAL_STORAGE_DISCOVERY_KEY = 'action-discovery-jira-create';
8
+ var LOCAL_STORAGE_DISCOVERY_VALUE = 'discovered';
9
+ var LOCAL_STORAGE_DISCOVERY_EXPIRY_IN_MS = 15552000000; // 180 days
10
+
11
+ /**
12
+ * This is a hacky solution to help with the feature discovery.
13
+ * This implementation must be removed once the experiment is completed.
14
+ *
15
+ * Cleanup ticket:
16
+ * https://product-fabric.atlassian.net/browse/EDM-7480
17
+ */
18
+ var FeatureDiscovery = function FeatureDiscovery(_ref) {
19
+ var children = _ref.children,
20
+ testId = _ref.testId;
21
+ var storageClient = useMemo(function () {
22
+ return new StorageClient(LOCAL_STORAGE_CLIENT_KEY);
23
+ }, []);
24
+ // Set this to `false` if you want to always show the feature discovery pulse.
25
+ // (or open Application tab in your devtools and delete the relevent row)
26
+ var discovered = useMemo(function () {
27
+ return storageClient.getItem(LOCAL_STORAGE_DISCOVERY_KEY) === LOCAL_STORAGE_DISCOVERY_VALUE;
28
+ }, [storageClient]);
29
+ useEffect(function () {
30
+ return function () {
31
+ if (!discovered) {
32
+ storageClient.setItemWithExpiry(LOCAL_STORAGE_DISCOVERY_KEY, LOCAL_STORAGE_DISCOVERY_VALUE, LOCAL_STORAGE_DISCOVERY_EXPIRY_IN_MS);
33
+ }
34
+ };
35
+ }, [storageClient, discovered]);
36
+ if (discovered) {
37
+ return children;
38
+ }
39
+ return jsx("span", {
40
+ css: pulseStyles,
41
+ "data-testid": "".concat(testId, "-discovery")
42
+ }, children);
43
+ };
44
+ export default FeatureDiscovery;
@@ -0,0 +1,8 @@
1
+ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
+ var _templateObject, _templateObject2;
3
+ import { css, keyframes } from '@emotion/react';
4
+ var pulseKeyframes = keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n to {\n box-shadow: 0 0 0 7px rgba(0, 0, 0, 0);\n }\n"])));
5
+
6
+ // Styling from atlassian-frontend/packages/design-system/onboarding/src/styled/target.tsx
7
+ var pulseColor = 'rgb(101, 84, 192)';
8
+ export var pulseStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: inline-flex;\n border-radius: 3px;\n box-shadow: 0 0 0 0 ", ";\n animation: ", " 1.45s cubic-bezier(0.5, 0, 0, 1) infinite;\n"])), pulseColor, pulseKeyframes);
@@ -1,6 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- var _excluded = ["isLoading", "error", "url", "queryState", "items", "isEditing", "onCancel", "action"];
3
+ var _excluded = ["isLoading", "error", "url", "queryState", "items", "isEditing", "onCancel", "action", "createFeatureDiscovery"];
4
4
  /** @jsx jsx */
5
5
  import { memo } from 'react';
6
6
  import { jsx } from '@emotion/react';
@@ -8,6 +8,7 @@ import { defineMessages, useIntl } from 'react-intl-next';
8
8
  import Button, { ButtonGroup } from '@atlaskit/button';
9
9
  import EditorAddIcon from '@atlaskit/icon/glyph/editor/add';
10
10
  import { UnauthenticatedError } from '../../../common/utils/errors';
11
+ import FeatureDiscovery from './feature-discovery';
11
12
  import { formFooterActionStyles, formFooterStyles } from './styled';
12
13
  import { checkSubmitDisabled } from './utils';
13
14
  var messages = defineMessages({
@@ -30,7 +31,9 @@ var messages = defineMessages({
30
31
  export var testIds = {
31
32
  insertButton: 'link-picker-insert-button',
32
33
  cancelButton: 'link-picker-cancel-button',
33
- actionButton: 'link-picker-action-button'
34
+ actionButton: 'link-picker-action-button',
35
+ /** Feature discovery for action button (css pulse) */
36
+ actionButtonDiscovery: 'link-picker-action-button-discovery'
34
37
  };
35
38
  export var FormFooter = /*#__PURE__*/memo(function (_ref) {
36
39
  var isLoading = _ref.isLoading,
@@ -41,6 +44,8 @@ export var FormFooter = /*#__PURE__*/memo(function (_ref) {
41
44
  isEditing = _ref.isEditing,
42
45
  onCancel = _ref.onCancel,
43
46
  action = _ref.action,
47
+ _ref$createFeatureDis = _ref.createFeatureDiscovery,
48
+ createFeatureDiscovery = _ref$createFeatureDis === void 0 ? false : _ref$createFeatureDis,
44
49
  restProps = _objectWithoutProperties(_ref, _excluded);
45
50
  var intl = useIntl();
46
51
  if (error && error instanceof UnauthenticatedError) {
@@ -48,19 +53,24 @@ export var FormFooter = /*#__PURE__*/memo(function (_ref) {
48
53
  }
49
54
  var isSubmitDisabled = checkSubmitDisabled(isLoading, error, url, queryState, items);
50
55
  var insertButtonMsg = isEditing ? messages.saveButton : messages.insertButton;
56
+ var createButton = function createButton(pluginAction) {
57
+ return jsx(Button, {
58
+ testId: testIds.actionButton,
59
+ onClick: pluginAction.callback,
60
+ appearance: "default",
61
+ iconBefore: jsx(EditorAddIcon, {
62
+ label: "",
63
+ size: "medium"
64
+ })
65
+ }, typeof pluginAction.label === 'string' ? pluginAction.label : intl.formatMessage(pluginAction.label));
66
+ };
51
67
  return jsx("footer", _extends({
52
68
  css: formFooterStyles
53
69
  }, restProps), action && jsx("div", {
54
70
  css: formFooterActionStyles
55
- }, jsx(Button, {
56
- testId: testIds.actionButton,
57
- onClick: action.callback,
58
- appearance: "default",
59
- iconBefore: jsx(EditorAddIcon, {
60
- label: "",
61
- size: "medium"
62
- })
63
- }, typeof action.label === 'string' ? action.label : intl.formatMessage(action.label))), jsx(ButtonGroup, null, jsx(Button, {
71
+ }, createFeatureDiscovery ? jsx(FeatureDiscovery, {
72
+ testId: testIds.actionButtonDiscovery
73
+ }, createButton(action)) : createButton(action)), jsx(ButtonGroup, null, jsx(Button, {
64
74
  appearance: "subtle",
65
75
  onClick: onCancel,
66
76
  testId: testIds.cancelButton
@@ -9,6 +9,7 @@ import { FormattedMessage, useIntl } from 'react-intl-next';
9
9
  import { useAnalyticsEvents } from '@atlaskit/analytics-next';
10
10
  import { isSafeUrl, normalizeUrl } from '@atlaskit/linking-common/url';
11
11
  import { browser } from '@atlaskit/linking-common/user-agent';
12
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
12
13
  import VisuallyHidden from '@atlaskit/visually-hidden';
13
14
  import { useLinkPickerAnalytics, withInputFieldTracking, withLinkPickerAnalyticsContext } from '../../common/analytics';
14
15
  import { ANALYTICS_CHANNEL } from '../../common/constants';
@@ -37,13 +38,17 @@ var initState = {
37
38
  selectedIndex: -1,
38
39
  invalidUrl: false,
39
40
  activeTab: 0,
40
- preventHidingRecents: false
41
+ preventHidingRecents: false,
42
+ /** This only allows the feature discovery pulse - to be shown the ff must be on and active tab be Jira */
43
+ allowCreateFeatureDiscovery: true
41
44
  };
42
45
  function reducer(state, payload) {
43
46
  if (payload.url && state.url !== payload.url) {
44
47
  return _objectSpread(_objectSpread({}, state), {}, {
45
48
  invalidUrl: false,
46
- selectedIndex: isSafeUrl(payload.url) && payload.url.length ? -1 : state.selectedIndex
49
+ selectedIndex: isSafeUrl(payload.url) && payload.url.length ? -1 : state.selectedIndex,
50
+ /** When the user starts entering a url, stop pulsing the create button */
51
+ allowCreateFeatureDiscovery: false
47
52
  }, payload);
48
53
  }
49
54
  return _objectSpread(_objectSpread({}, state), payload);
@@ -89,7 +94,8 @@ export var LinkPicker = withLinkPickerAnalyticsContext( /*#__PURE__*/memo(functi
89
94
  url = state.url,
90
95
  displayText = state.displayText,
91
96
  invalidUrl = state.invalidUrl,
92
- activeTab = state.activeTab;
97
+ activeTab = state.activeTab,
98
+ allowCreateFeatureDiscovery = state.allowCreateFeatureDiscovery;
93
99
  var intl = useIntl();
94
100
  var queryState = useSearchQuery(state);
95
101
  var _usePlugins = usePlugins(queryState, activeTab, plugins),
@@ -309,7 +315,7 @@ export var LinkPicker = withLinkPickerAnalyticsContext( /*#__PURE__*/memo(functi
309
315
  "aria-label": intl.formatMessage(linkTextMessages.linkTextAriaLabel),
310
316
  onClear: handleClear,
311
317
  onChange: handleChangeText
312
- }), !!queryState && jsx(SearchResults, {
318
+ }), !!queryState && (isLoadingPlugins || isActivePlugin) && jsx(SearchResults, {
313
319
  activeTab: activeTab,
314
320
  tabs: tabs,
315
321
  activePlugin: activePlugin,
@@ -338,5 +344,8 @@ export var LinkPicker = withLinkPickerAnalyticsContext( /*#__PURE__*/memo(functi
338
344
  onCancel: onCancel,
339
345
  action: pluginAction,
340
346
  css: !queryState || !(plugins !== null && plugins !== void 0 && plugins.length) ? formFooterMargin : undefined
347
+ /* Show the feature discovery pulse when we're on the Jira tab, we haven't started typing a url and
348
+ the feature flag is enabled */,
349
+ createFeatureDiscovery: (activePlugin === null || activePlugin === void 0 ? void 0 : activePlugin.tabKey) === 'jira' && allowCreateFeatureDiscovery && getBooleanFF('platform.linking-platform.link-picker.enable-jira-create')
341
350
  }));
342
351
  }));
@@ -11,7 +11,8 @@ import { useFixHeight } from '../../../controllers/use-fix-height';
11
11
  import { LinkSearchError, testIds as searchErrorTestIds } from './link-search-error';
12
12
  import { LinkSearchList, testIds as listTestIds } from './link-search-list';
13
13
  import { ScrollingTabList } from './scrolling-tabs';
14
- import { flexColumnStyles, spinnerContainerStyles, tabsWrapperStyles } from './styled';
14
+ import { SearchResultsContainer } from './search-results-container';
15
+ import { spinnerContainerStyles, tabsWrapperStyles } from './styled';
15
16
  import { TrackTabViewed } from './track-tab-viewed';
16
17
  export var testIds = _objectSpread(_objectSpread(_objectSpread({}, searchErrorTestIds), listTestIds), {}, {
17
18
  tabsLoadingIndicator: 'link-picker.tabs-loading-indicator',
@@ -47,7 +48,9 @@ export var SearchResults = function SearchResults(_ref) {
47
48
  testId: testIds.tabItem
48
49
  }, tab.tabTitle);
49
50
  }));
50
- return jsx(Fragment, null, isLoadingPlugins && !!queryState && jsx("div", {
51
+ return jsx(SearchResultsContainer, _extends({
52
+ hasTabs: !!tabs.length || isLoadingPlugins
53
+ }, fixListHeightProps), isLoadingPlugins && !!queryState && jsx("div", {
51
54
  css: spinnerContainerStyles
52
55
  }, jsx(Spinner, {
53
56
  testId: testIds.tabsLoadingIndicator,
@@ -61,9 +64,7 @@ export var SearchResults = function SearchResults(_ref) {
61
64
  onChange: handleTabChange
62
65
  }, featureFlags !== null && featureFlags !== void 0 && featureFlags.scrollingTabs ? jsx(ScrollingTabList, null, tabList) : tabList), jsx(TrackTabViewed, {
63
66
  activePlugin: activePlugin
64
- })), jsx("div", _extends({
65
- css: flexColumnStyles
66
- }, fixListHeightProps), !error && jsx(LinkSearchList, {
67
+ })), !error && jsx(LinkSearchList, {
67
68
  id: linkSearchListId,
68
69
  role: "listbox",
69
70
  items: items,
@@ -75,5 +76,5 @@ export var SearchResults = function SearchResults(_ref) {
75
76
  onKeyDown: handleKeyDown,
76
77
  hasSearchTerm: !!(queryState !== null && queryState !== void 0 && queryState.query.length),
77
78
  activePlugin: activePlugin
78
- }), error && ((_activePlugin$errorFa = activePlugin === null || activePlugin === void 0 ? void 0 : (_activePlugin$errorFa2 = activePlugin.errorFallback) === null || _activePlugin$errorFa2 === void 0 ? void 0 : _activePlugin$errorFa2.call(activePlugin, error, retry)) !== null && _activePlugin$errorFa !== void 0 ? _activePlugin$errorFa : jsx(LinkSearchError, null)))));
79
+ }), error && ((_activePlugin$errorFa = activePlugin === null || activePlugin === void 0 ? void 0 : (_activePlugin$errorFa2 = activePlugin.errorFallback) === null || _activePlugin$errorFa2 === void 0 ? void 0 : _activePlugin$errorFa2.call(activePlugin, error, retry)) !== null && _activePlugin$errorFa !== void 0 ? _activePlugin$errorFa : jsx(LinkSearchError, null))));
79
80
  };
@@ -11,6 +11,7 @@ import { defineMessages, FormattedMessage } from 'react-intl-next';
11
11
  import { getBooleanFF } from '@atlaskit/platform-feature-flags';
12
12
  import Spinner from '@atlaskit/spinner';
13
13
  import VisuallyHidden from '@atlaskit/visually-hidden';
14
+ import { MinHeightContainer } from '../../../../common/ui/min-height-container';
14
15
  import { handleNavKeyDown } from '../../../../common/utils/handleNavKeyDown';
15
16
  import { NoResults, testIds as noResultsTestIds } from './link-search-no-results';
16
17
  import { emptyStateNoResultsWrapper } from './link-search-no-results/styled';
@@ -147,7 +148,8 @@ export var LinkSearchList = /*#__PURE__*/forwardRef(function (_ref, ref) {
147
148
  })));
148
149
  }
149
150
  if (isLoading) {
150
- loadingContent = jsx("div", {
151
+ loadingContent = jsx(MinHeightContainer, {
152
+ minHeight: getBooleanFF('platform.linking-platform.link-picker.fixed-height-search-results') ? '50px' : '80px',
151
153
  css: spinnerContainerStyles
152
154
  }, jsx(Spinner, {
153
155
  testId: testIds.searchResultLoadingIndicator,
@@ -5,7 +5,7 @@ import { css } from '@emotion/react';
5
5
  // AFP-2532 TODO: Fix automatic suppressions below
6
6
  // eslint-disable-next-line @atlassian/tangerine/import/entry-points
7
7
  import { typography } from '@atlaskit/theme';
8
- export var listContainerStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding-top: 0;\n min-height: 80px;\n margin-top: ", ";\n margin-bottom: ", ";\n flex-grow: 1;\n display: flex;\n flex-direction: column;\n"])), "var(--ds-space-200, 16px)", "var(--ds-space-200, 16px)");
9
- export var spinnerContainerStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n text-align: center;\n min-height: 80px;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-grow: 1;\n"])));
8
+ export var listContainerStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n padding-top: 0;\n min-height: 80px;\n margin-top: ", ";\n margin-bottom: ", ";\n flex-grow: 1;\n display: flex;\n flex-direction: column;\n"])), "var(--ds-space-200, 16px)", "var(--ds-space-200, 16px)");
9
+ export var spinnerContainerStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n flex-grow: 1;\n flex-direction: column;\n align-items: center;\n"])));
10
10
  export var listStyles = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n padding: 0;\n margin: 0 calc(-1 * ", ");\n list-style: none;\n"])), "var(--ds-space-200, 16px)");
11
11
  export var listTitleStyles = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n ", "\n text-transform: uppercase;\n margin-top: 0;\n margin-bottom: ", ";\n"])), typography.h100(), "var(--ds-space-050, 4px)");
@@ -0,0 +1,20 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
+ var _excluded = ["hasTabs"];
4
+ /** @jsx jsx */
5
+ import { forwardRef } from 'react';
6
+ import { jsx } from '@emotion/react';
7
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
8
+ import { MinHeightContainer } from '../../../../common/ui/min-height-container';
9
+ import { flexColumn } from './styled';
10
+ export var SearchResultsContainer = /*#__PURE__*/forwardRef(function (_ref, ref) {
11
+ var hasTabs = _ref.hasTabs,
12
+ props = _objectWithoutProperties(_ref, _excluded);
13
+ var minHeight = hasTabs ? '347px' : '302px';
14
+ var ffMinHeight = getBooleanFF('platform.linking-platform.link-picker.fixed-height-search-results') ? minHeight : 'auto';
15
+ return jsx(MinHeightContainer, _extends({
16
+ ref: ref,
17
+ minHeight: ffMinHeight,
18
+ css: flexColumn
19
+ }, props));
20
+ });
@@ -0,0 +1,4 @@
1
+ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
+ var _templateObject;
3
+ import { css } from '@emotion/react';
4
+ export var flexColumn = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n width: 100%;\n"])));
@@ -2,5 +2,5 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
2
2
  var _templateObject, _templateObject2, _templateObject3;
3
3
  import { css } from '@emotion/react';
4
4
  export var tabsWrapperStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n margin-top: ", ";\n margin-left: calc(-1 * ", ");\n margin-right: calc(-1 * ", ");\n"])), "var(--ds-space-150, 12px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)");
5
- export var spinnerContainerStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n min-height: 80px;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-grow: 1;\n"])));
5
+ export var spinnerContainerStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n min-height: 80px;\n display: flex;\n align-items: center;\n justify-content: center;\n align-self: center;\n flex-grow: 1;\n"])));
6
6
  export var flexColumnStyles = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n"])));
@@ -1,5 +1,5 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
- var _templateObject, _templateObject2, _templateObject3, _templateObject4;
2
+ var _templateObject, _templateObject2;
3
3
  import { css } from '@emotion/react';
4
4
  import { getBooleanFF } from '@atlaskit/platform-feature-flags';
5
5
  import { LINK_PICKER_WIDTH_IN_PX } from '../../common/constants';
@@ -8,6 +8,4 @@ import { LINK_PICKER_WIDTH_IN_PX } from '../../common/constants';
8
8
  * Half padding on the top as the form field has a `gridSize()` margin top that cannot be overridden
9
9
  */
10
10
  export var rootContainerStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: ", ";\n padding: ", " ", "\n ", ";\n box-sizing: border-box;\n line-height: initial;\n"])), getBooleanFF('platform.linking-platform.link-picker.fixed-height-search-results') ? undefined : "".concat(LINK_PICKER_WIDTH_IN_PX, "px"), "var(--ds-space-100, 8px)", "var(--ds-space-200, 16px)", "var(--ds-space-200, 16px)");
11
- export var tabsWrapperStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin-top: ", ";\n margin-left: calc(-1 * ", ");\n margin-right: calc(-1 * ", ");\n"])), "var(--ds-space-150, 12px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)");
12
- export var flexColumnStyles = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n"])));
13
- export var formFooterMargin = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n margin-top: ", ";\n"])), "var(--ds-space-200, 16px)");
11
+ export var formFooterMargin = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin-top: ", ";\n"])), "var(--ds-space-200, 16px)");
@@ -2,8 +2,14 @@
2
2
  import { jsx } from '@emotion/react';
3
3
  import { getBooleanFF } from '@atlaskit/platform-feature-flags';
4
4
  import Spinner from '@atlaskit/spinner';
5
- import { LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_TABS_WITH_DISPLAYTEXT, LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_TABS_WITHOUT_DISPLAYTEXT, LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_TABS_WITH_DISPLAYTEXT, LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_TABS_WITHOUT_DISPLAYTEXT } from '../../common/constants';
6
5
  import { MinHeightContainer } from '../../common/ui/min-height-container';
6
+ import { styles } from './styled';
7
+ var LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_TABS_WITHOUT_DISPLAYTEXT = '472px';
8
+ var LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_TABS_WITH_DISPLAYTEXT = '550px';
9
+ var LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_TABS_WITH_PLUGIN_WITH_DISPLAYTEXT = '505px';
10
+ var LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_TABS_WITH_PLUGIN_WITHOUT_DISPLAYTEXT = '429px';
11
+ var LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_TABS_WITH_DISPLAYTEXT = '218px';
12
+ var LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_TABS_WITHOUT_DISPLAYTEXT = '141px';
7
13
  // EDM-7122: can delete these two consts once min height container for link picker is firm for the loader
8
14
  var LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_DISPLAYTEXT = '142px';
9
15
  var LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_DISPLAYTEXT = '220px';
@@ -12,9 +18,12 @@ var getEstimatedMinHeight = function getEstimatedMinHeight(_ref) {
12
18
  isLoadingPlugins = _ref.isLoadingPlugins,
13
19
  plugins = _ref.plugins;
14
20
  if (getBooleanFF('platform.linking-platform.link-picker.fixed-height-search-results')) {
15
- if (plugins !== null && plugins !== void 0 && plugins.length || isLoadingPlugins) {
21
+ if (plugins && plugins.length > 1 || isLoadingPlugins) {
16
22
  return hideDisplayText ? LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_TABS_WITHOUT_DISPLAYTEXT : LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_TABS_WITH_DISPLAYTEXT;
17
23
  }
24
+ if ((plugins === null || plugins === void 0 ? void 0 : plugins.length) === 1) {
25
+ return hideDisplayText ? LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_TABS_WITH_PLUGIN_WITHOUT_DISPLAYTEXT : LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_TABS_WITH_PLUGIN_WITH_DISPLAYTEXT;
26
+ }
18
27
  return hideDisplayText ? LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_TABS_WITHOUT_DISPLAYTEXT : LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_TABS_WITH_DISPLAYTEXT;
19
28
  }
20
29
  return hideDisplayText ? LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_DISPLAYTEXT : LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_DISPLAYTEXT;
@@ -28,7 +37,8 @@ export var LoaderFallback = function LoaderFallback(props) {
28
37
  var minHeight = getEstimatedMinHeight(props);
29
38
  return jsx(MinHeightContainer, {
30
39
  minHeight: minHeight,
31
- "data-testid": "link-picker-root-loader-boundary-ui"
40
+ "data-testid": "link-picker-root-loader-boundary-ui",
41
+ css: styles
32
42
  }, jsx(Spinner, {
33
43
  testId: "link-picker.component-loading-indicator",
34
44
  size: "medium"
@@ -0,0 +1,4 @@
1
+ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
+ var _templateObject;
3
+ import { css } from '@emotion/react';
4
+ export var styles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n align-items: center;\n"])));
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/link-picker",
3
- "version": "1.27.1",
3
+ "version": "1.28.0",
4
4
  "sideEffects": false
5
5
  }
@@ -2,8 +2,4 @@ export declare const ANALYTICS_CHANNEL = "media";
2
2
  export declare const COMPONENT_NAME = "linkPicker";
3
3
  export declare const RECENT_SEARCH_LIST_SIZE = 5;
4
4
  export declare const LINK_PICKER_WIDTH_IN_PX = 342;
5
- export declare const LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_TABS_WITHOUT_DISPLAYTEXT = "472px";
6
- export declare const LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_TABS_WITH_DISPLAYTEXT = "550px";
7
- export declare const LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_TABS_WITH_DISPLAYTEXT = "218px";
8
- export declare const LINK_PICKER_MIN_HEIGHT_IN_PX_WITHOUT_TABS_WITHOUT_DISPLAYTEXT = "141px";
9
5
  export declare const LINK_PICKER_MIN_HEIGHT_IN_PX_FALLBACK = "290px";