@atlaskit/link-datasource 6.4.10 → 6.4.11

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 (34) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/cjs/hooks/useDatasourceTableState.js +7 -1
  3. package/dist/cjs/ui/assets-modal/modal/render-assets-content/index.js +6 -2
  4. package/dist/cjs/ui/common/error-state/no-results.compiled.css +2 -0
  5. package/dist/cjs/ui/common/error-state/no-results.js +4 -2
  6. package/dist/cjs/ui/common/modal/display-view-dropdown/display-view-drop-down.js +4 -2
  7. package/dist/cjs/ui/confluence-search-modal/modal/index.js +6 -2
  8. package/dist/cjs/ui/datasource-table-view/datasourceTableView.js +7 -3
  9. package/dist/cjs/ui/issue-like-table/index.compiled.css +2 -0
  10. package/dist/cjs/ui/issue-like-table/index.js +57 -1
  11. package/dist/cjs/ui/jira-issues-modal/modal/index.js +5 -2
  12. package/dist/es2019/hooks/useDatasourceTableState.js +6 -1
  13. package/dist/es2019/ui/assets-modal/modal/render-assets-content/index.js +6 -2
  14. package/dist/es2019/ui/common/error-state/no-results.compiled.css +2 -0
  15. package/dist/es2019/ui/common/error-state/no-results.js +3 -1
  16. package/dist/es2019/ui/common/modal/display-view-dropdown/display-view-drop-down.js +4 -2
  17. package/dist/es2019/ui/confluence-search-modal/modal/index.js +6 -2
  18. package/dist/es2019/ui/datasource-table-view/datasourceTableView.js +7 -3
  19. package/dist/es2019/ui/issue-like-table/index.compiled.css +2 -0
  20. package/dist/es2019/ui/issue-like-table/index.js +51 -1
  21. package/dist/es2019/ui/jira-issues-modal/modal/index.js +5 -2
  22. package/dist/esm/hooks/useDatasourceTableState.js +7 -1
  23. package/dist/esm/ui/assets-modal/modal/render-assets-content/index.js +6 -2
  24. package/dist/esm/ui/common/error-state/no-results.compiled.css +2 -0
  25. package/dist/esm/ui/common/error-state/no-results.js +4 -2
  26. package/dist/esm/ui/common/modal/display-view-dropdown/display-view-drop-down.js +4 -2
  27. package/dist/esm/ui/confluence-search-modal/modal/index.js +6 -2
  28. package/dist/esm/ui/datasource-table-view/datasourceTableView.js +7 -3
  29. package/dist/esm/ui/issue-like-table/index.compiled.css +2 -0
  30. package/dist/esm/ui/issue-like-table/index.js +57 -1
  31. package/dist/esm/ui/jira-issues-modal/modal/index.js +5 -2
  32. package/dist/types/ui/common/error-state/no-results.d.ts +3 -1
  33. package/package.json +4 -1
  34. package/link-datasource.docs.tsx +0 -169
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @atlaskit/link-datasource
2
2
 
3
+ ## 6.4.11
4
+
5
+ ### Patch Changes
6
+
7
+ - [`24e05fa81e0c7`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/24e05fa81e0c7) -
8
+ [ux] When a search resolves with no items but the response still describes its columns, the
9
+ datasource table now keeps its column headers and footer and renders the "no results" message in
10
+ place of the rows, instead of replacing the entire view. Behind the
11
+ platform_lp_sllv_ux_improvements feature gate.
12
+
3
13
  ## 6.4.10
4
14
 
5
15
  ### Patch Changes
@@ -12,6 +12,7 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
12
12
  var _react = require("react");
13
13
  var _isEqual = _interopRequireDefault(require("lodash/isEqual"));
14
14
  var _isFedramp = require("@atlaskit/atlassian-context/is-fedramp");
15
+ var _fg = require("@atlaskit/platform-feature-flags/fg");
15
16
  var _linkClientExtension = require("@atlaskit/link-client-extension");
16
17
  var _analytics = require("../analytics");
17
18
  var _state = require("../state");
@@ -238,6 +239,7 @@ var useDatasourceTableState = exports.useDatasourceTableState = function useData
238
239
  entityType,
239
240
  newIds,
240
241
  aris,
242
+ shouldApplySchemaWithoutItems,
241
243
  isUserLoadingNextPage,
242
244
  currentLoadedItemCount,
243
245
  newlyLoadedItemCount,
@@ -348,7 +350,11 @@ var useDatasourceTableState = exports.useDatasourceTableState = function useData
348
350
  if (fieldKeys.length > 0) {
349
351
  setLastRequestedFieldKeys(fieldKeys);
350
352
  }
351
- if ((isSchemaFromData && schema || fullSchema.properties.length > 0) && items.length > 0) {
353
+
354
+ // A response with no items still describes its columns, so the schema is worth applying
355
+ // to let the table keep its headers while showing the empty state.
356
+ shouldApplySchemaWithoutItems = items.length === 0 && (0, _fg.fg)('platform_lp_sllv_ux_improvements');
357
+ if ((isSchemaFromData && schema || fullSchema.properties.length > 0) && (items.length > 0 || shouldApplySchemaWithoutItems)) {
352
358
  applySchemaProperties(schema || fullSchema, fieldKeys);
353
359
  }
354
360
  isUserLoadingNextPage = responseItems.length !== 0 && !shouldRequestFirstPage;
@@ -10,6 +10,7 @@ require("./index.compiled.css");
10
10
  var _react = _interopRequireWildcard(require("react"));
11
11
  var React = _react;
12
12
  var _runtime = require("@compiled/react/runtime");
13
+ var _fg = require("@atlaskit/platform-feature-flags/fg");
13
14
  var _accessRequired = require("../../../common/error-state/access-required");
14
15
  var _modalLoadingError = require("../../../common/error-state/modal-loading-error");
15
16
  var _noResults = require("../../../common/error-state/no-results");
@@ -62,6 +63,9 @@ var RenderAssetsContent = exports.RenderAssetsContent = function RenderAssetsCon
62
63
  onVisibleColumnKeysChange = props.onVisibleColumnKeysChange,
63
64
  isFetchingInitialData = props.isFetchingInitialData;
64
65
  var resolvedWithNoResults = status === 'resolved' && !responseItems.length;
66
+ // With columns available the table can keep its headers and show the empty state in place of
67
+ // the rows, instead of replacing the whole table with it.
68
+ var shouldRenderTableWithNoResults = resolvedWithNoResults && !!columns.length && (0, _fg.fg)('platform_lp_sllv_ux_improvements');
65
69
  var issueLikeDataTableView = (0, _react.useMemo)(function () {
66
70
  return /*#__PURE__*/React.createElement("div", {
67
71
  className: (0, _runtime.ax)(["_1reo1wug _18m91wug _4t3i1pna _1e0c11p5", "_19itia51 _n7zl1mpn _13li1mok _qrwq1mok _1itkz1kv _12vemgnk _1lrw1sd4 _qmxj1c00"])
@@ -88,12 +92,12 @@ var RenderAssetsContent = exports.RenderAssetsContent = function RenderAssetsCon
88
92
  return /*#__PURE__*/React.createElement(UnauthorizedView, null);
89
93
  } else if (status === 'empty') {
90
94
  return /*#__PURE__*/React.createElement(EmptyView, null);
91
- } else if (resolvedWithNoResults) {
95
+ } else if (resolvedWithNoResults && !shouldRenderTableWithNoResults) {
92
96
  return /*#__PURE__*/React.createElement(NoResultsView, null);
93
97
  } else if (status === 'loading' && !columns.length) {
94
98
  return /*#__PURE__*/React.createElement(LoadingView, null);
95
99
  }
96
100
  return issueLikeDataTableView;
97
- }, [columns.length, isFetchingInitialData, issueLikeDataTableView, resolvedWithNoResults, status]);
101
+ }, [columns.length, isFetchingInitialData, issueLikeDataTableView, resolvedWithNoResults, shouldRenderTableWithNoResults, status]);
98
102
  return renderAssetsContentView();
99
103
  };
@@ -1,11 +1,13 @@
1
1
  ._zulp1ejb{gap:var(--ds-space-300,24px)}
2
2
  ._zulppxbi{gap:var(--ds-space-200,1pc)}._10fp1h6o{justify-self:center}
3
3
  ._18u0oahv{margin-left:var(--ds-space-600,3pc)}
4
+ ._19pk1ejb{margin-top:var(--ds-space-300,24px)}
4
5
  ._19pkoahv{margin-top:var(--ds-space-600,3pc)}
5
6
  ._1wpz1h6o{align-self:center}
6
7
  ._2hwxoahv{margin-right:var(--ds-space-600,3pc)}
7
8
  ._4cvr1h6o{align-items:center}
8
9
  ._6a6z1h6o{justify-items:center}
10
+ ._otyr1ejb{margin-bottom:var(--ds-space-300,24px)}
9
11
  ._otyroahv{margin-bottom:var(--ds-space-600,3pc)}
10
12
  ._p12fko4j{max-width:19pc}
11
13
  ._y3gn1h6o{text-align:center}
@@ -20,11 +20,13 @@ var _messages = require("./messages");
20
20
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
21
21
  var styles = {
22
22
  noResultsContainerStyles: "_4cvr1h6o _6a6z1h6o _1wpz1h6o _10fp1h6o _19pkoahv _2hwxoahv _otyroahv _18u0oahv",
23
+ noResultsCompactContainerStyles: "_4cvr1h6o _6a6z1h6o _1wpz1h6o _10fp1h6o _19pk1ejb _2hwxoahv _otyr1ejb _18u0oahv",
23
24
  noResultsContentStyles: "_zulp1ejb _4cvr1h6o _6a6z1h6o _p12fko4j",
24
25
  noResultsMessageContainerStyles: "_zulppxbi _4cvr1h6o _6a6z1h6o _y3gn1h6o"
25
26
  };
26
27
  var NoResults = exports.NoResults = function NoResults(_ref) {
27
- var onRefresh = _ref.onRefresh;
28
+ var isCompact = _ref.isCompact,
29
+ onRefresh = _ref.onRefresh;
28
30
  var _useDatasourceAnalyti = (0, _analytics.useDatasourceAnalyticsEvents)(),
29
31
  fireEvent = _useDatasourceAnalyti.fireEvent;
30
32
  var _useIntl = (0, _reactIntl.useIntl)(),
@@ -33,7 +35,7 @@ var NoResults = exports.NoResults = function NoResults(_ref) {
33
35
  fireEvent('ui.emptyResult.shown.datasource', {});
34
36
  }, [fireEvent]);
35
37
  return /*#__PURE__*/React.createElement(_compiled.Grid, {
36
- xcss: styles.noResultsContainerStyles,
38
+ xcss: isCompact ? styles.noResultsCompactContainerStyles : styles.noResultsContainerStyles,
37
39
  testId: "datasource-modal--no-results"
38
40
  }, /*#__PURE__*/React.createElement(_compiled.Grid, {
39
41
  xcss: styles.noResultsContentStyles
@@ -16,12 +16,14 @@ var _reactIntl = require("react-intl");
16
16
  var _new = _interopRequireDefault(require("@atlaskit/button/new"));
17
17
  var _dropdownMenu = _interopRequireWildcard(require("@atlaskit/dropdown-menu"));
18
18
  var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/core/chevron-down"));
19
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
19
20
  var _compiled = require("@atlaskit/primitives/compiled");
20
21
  var _messages = require("./messages");
21
22
  var _excluded = ["triggerRef"];
22
23
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
23
24
  var styles = {
24
- dropDownItemGroupStyles: "_2rko12b0 _1bsb1pna _4t3i7iqz"
25
+ dropDownItemGroupStyles: "_2rko12b0 _1bsb1pna _4t3i7iqz",
26
+ dropDownItemGroupStylesWithoutFixedHeight: "_2rko12b0 _1bsb1pna"
25
27
  };
26
28
  var InlineIcon = /*#__PURE__*/_react.default.createElement("svg", {
27
29
  xmlns: "http://www.w3.org/2000/svg",
@@ -71,7 +73,7 @@ var DisplayViewDropDown = exports.DisplayViewDropDown = function DisplayViewDrop
71
73
  },
72
74
  testId: "datasource-modal--view-drop-down"
73
75
  }, /*#__PURE__*/_react.default.createElement(_compiled.Box, {
74
- xcss: styles.dropDownItemGroupStyles
76
+ xcss: (0, _platformFeatureFlags.fg)('platform_lp_sllv_ux_improvements') ? styles.dropDownItemGroupStylesWithoutFixedHeight : styles.dropDownItemGroupStyles
75
77
  }, /*#__PURE__*/_react.default.createElement(_dropdownMenu.DropdownItemGroup, null, /*#__PURE__*/_react.default.createElement(_dropdownMenu.DropdownItem, {
76
78
  testId: "dropdown-item-table",
77
79
  onClick: function onClick() {
@@ -17,6 +17,7 @@ var _featureGateJsClient = _interopRequireDefault(require("@atlaskit/feature-gat
17
17
  var _main = _interopRequireDefault(require("@atlaskit/intl-messages-provider/main"));
18
18
  var _link = _interopRequireDefault(require("@atlaskit/link"));
19
19
  var _modalDialog = require("@atlaskit/modal-dialog");
20
+ var _fg = require("@atlaskit/platform-feature-flags/fg");
20
21
  var _compiled = require("@atlaskit/primitives/compiled");
21
22
  var _analytics = require("../../../analytics");
22
23
  var _types = require("../../../analytics/types");
@@ -160,6 +161,9 @@ var PlainConfluenceSearchConfigModal = exports.PlainConfluenceSearchConfigModal
160
161
  siteSelectorLabel = availableSites && availableSites.length > 1 ? _messages.confluenceSearchModalMessages.insertIssuesTitleManySites : _messages.confluenceSearchModalMessages.insertIssuesTitle;
161
162
  }
162
163
  var resolvedWithNoResults = status === 'resolved' && !responseItems.length;
164
+ // With columns available the table can keep its headers and show the empty state in place of
165
+ // the rows, instead of replacing the whole table with it.
166
+ var shouldRenderTableWithNoResults = resolvedWithNoResults && !!columns.length && (0, _fg.fg)('platform_lp_sllv_ux_improvements');
163
167
  var hasConfluenceSearchParams = selectedConfluenceSite && (parameters === null || parameters === void 0 ? void 0 : parameters.searchString);
164
168
  var selectedConfluenceSiteUrl = selectedConfluenceSite === null || selectedConfluenceSite === void 0 ? void 0 : selectedConfluenceSite.url;
165
169
  var confluenceSearchUrl = (0, _react.useMemo)(function () {
@@ -246,7 +250,7 @@ var PlainConfluenceSearchConfigModal = exports.PlainConfluenceSearchConfigModal
246
250
  return /*#__PURE__*/_react.default.createElement(_accessRequired.AccessRequired, {
247
251
  url: selectedConfluenceSiteUrl || urlBeingEdited
248
252
  });
249
- } else if (resolvedWithNoResults || status === 'forbidden') {
253
+ } else if (resolvedWithNoResults && !shouldRenderTableWithNoResults || status === 'forbidden') {
250
254
  return /*#__PURE__*/_react.default.createElement(_noResults.NoResults, null);
251
255
  } else if (status === 'empty' || !columns.length) {
252
256
  // persist the empty state when making the initial /data request which contains the columns
@@ -269,7 +273,7 @@ var PlainConfluenceSearchConfigModal = exports.PlainConfluenceSearchConfigModal
269
273
  }, /*#__PURE__*/_react.default.createElement(_datasourcesTableInModalPreview.default, {
270
274
  testId: "confluence-search-datasource-table"
271
275
  }));
272
- }, [status, resolvedWithNoResults, columns.length, selectedConfluenceSiteUrl, urlBeingEdited, hasConfluenceSearchParams, formatMessage, reset, selectedConfluenceSite]);
276
+ }, [status, resolvedWithNoResults, shouldRenderTableWithNoResults, columns.length, selectedConfluenceSiteUrl, urlBeingEdited, hasConfluenceSearchParams, formatMessage, reset, selectedConfluenceSite]);
273
277
  var renderInlineLinkModalContent = (0, _react.useCallback)(function () {
274
278
  if (status === 'unauthorized') {
275
279
  return /*#__PURE__*/_react.default.createElement(_accessRequired.AccessRequired, {
@@ -188,7 +188,11 @@ var DatasourceTableViewWithoutAnalytics = function DatasourceTableViewWithoutAna
188
188
  shouldForceRequest: true
189
189
  });
190
190
  }, [reset]);
191
- if (status === 'resolved' && !responseItems.length || status === 'forbidden') {
191
+ var isResolvedWithNoResults = status === 'resolved' && !responseItems.length;
192
+ // With columns available the table can keep its headers and footer and show the empty state
193
+ // in place of the rows, instead of replacing the whole view with it.
194
+ var shouldRenderTableWithNoResults = isResolvedWithNoResults && hasColumns && (0, _platformFeatureFlags.fg)('platform_lp_sllv_ux_improvements');
195
+ if (isResolvedWithNoResults && !shouldRenderTableWithNoResults || status === 'forbidden') {
192
196
  return /*#__PURE__*/React.createElement(_noResults.NoResults, null);
193
197
  }
194
198
  if (status === 'unauthorized') {
@@ -240,9 +244,9 @@ var DatasourceTableViewWithoutAnalytics = function DatasourceTableViewWithoutAna
240
244
  isCompact: true
241
245
  }), /*#__PURE__*/React.createElement(_tableFooter.TableFooter, {
242
246
  datasourceId: datasourceId,
243
- itemCount: isDataReady ? totalCount : undefined,
247
+ itemCount: isDataReady ? totalCount : shouldRenderTableWithNoResults ? 0 : undefined,
244
248
  onRefresh: onRefresh,
245
- isLoading: !isDataReady || status === 'loading',
249
+ isLoading: shouldRenderTableWithNoResults ? false : !isDataReady || status === 'loading',
246
250
  url: url
247
251
  })));
248
252
  };
@@ -78,6 +78,7 @@ thead.has-column-picker ._10i2idpf:nth-last-of-type(2){border-right:0}.ProseMirr
78
78
  ._19bv1b66{padding-left:var(--ds-space-050,4px)}
79
79
  ._19bvze3t{padding-left:var(--ds-space-0,0)}
80
80
  ._19pkidpf{margin-top:0}
81
+ ._1bah1h6o{justify-content:center}
81
82
  ._1bsb1osq{width:100%}
82
83
  ._1bto1l2s{text-overflow:ellipsis}
83
84
  ._1cimn7od [data-testid=button-connect-account]>span{white-space:unset}
@@ -87,6 +88,7 @@ thead.has-column-picker ._10i2idpf:nth-last-of-type(2){border-right:0}.ProseMirr
87
88
  ._1ixkusic:last-of-type{text-align:right}
88
89
  ._1lhc1b66:first-of-type{padding-left:var(--ds-space-050,4px)}
89
90
  ._1lrw1sd4{background-size:40px 100%,14px 100%,40px 100%,14px 100%,100% 75pt,100% 14px,100% 40px,100% 10px}
91
+ ._1ltvidpf{left:0}
90
92
  ._1nd0cs5v [data-testid=datasource-header-content--container]{-webkit-line-clamp:2}
91
93
  ._1o0zidpf{border-bottom-right-radius:0}
92
94
  ._1o59pxbi:last-of-type{padding-right:var(--ds-space-200,1pc)}
@@ -36,6 +36,7 @@ var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
36
36
  var _ufoExperiences = require("../../analytics/ufoExperiences");
37
37
  var _datasourceExperienceId = require("../../contexts/datasource-experience-id");
38
38
  var _useIsInPDFRender = require("../../hooks/useIsInPDFRender");
39
+ var _noResults = require("../common/error-state/no-results");
39
40
  var _columnPicker = require("./column-picker");
40
41
  var _dragColumnPreview = require("./drag-column-preview");
41
42
  var _draggableTableHeading = require("./draggable-table-heading");
@@ -77,6 +78,22 @@ var wrappedStyles = null;
77
78
  var richTextCellStyles = null;
78
79
  var tableContainerStyles = null;
79
80
 
81
+ // The cell spans every column, so it is as wide as the scrollable table rather than the part of it
82
+ // that is on screen. Sticking to the left edge of the scrollport keeps the empty state centred on
83
+ // what the user can actually see while the headers still scroll behind it.
84
+ var noResultsCellContentStyles = null;
85
+ var getHorizontalScrollParent = function getHorizontalScrollParent(element) {
86
+ var current = element;
87
+ while (current) {
88
+ var _getComputedStyle = getComputedStyle(current),
89
+ overflowX = _getComputedStyle.overflowX;
90
+ if (overflowX === 'auto' || overflowX === 'scroll') {
91
+ return current;
92
+ }
93
+ current = current.parentElement;
94
+ }
95
+ };
96
+
80
97
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled
81
98
  var Table = (0, _react.forwardRef)(function (_ref2, __cmplr) {
82
99
  var _ref2$as = _ref2.as,
@@ -344,6 +361,33 @@ var IssueLikeDataTableView = exports.IssueLikeDataTableView = function IssueLike
344
361
  }, [isInPDFRender, onNextPage, status, hasNextPage]);
345
362
  var hasData = items.length > 0;
346
363
 
364
+ // A resolved response with no items still carries column metadata, so the table can keep its
365
+ // headers and render the empty state where the rows would normally be.
366
+ var hasNoResults = status === 'resolved' && !hasData && (0, _platformFeatureFlags.fg)('platform_lp_sllv_ux_improvements');
367
+ var _useState7 = (0, _react.useState)(),
368
+ _useState8 = (0, _slicedToArray2.default)(_useState7, 2),
369
+ noResultsWidth = _useState8[0],
370
+ setNoResultsWidth = _useState8[1];
371
+ (0, _react.useEffect)(function () {
372
+ var container = containerRef.current;
373
+ if (!hasNoResults || !container) {
374
+ return;
375
+ }
376
+ var scrollport = getHorizontalScrollParent(container) || container;
377
+ var updateWidth = function updateWidth() {
378
+ return setNoResultsWidth(scrollport.clientWidth || undefined);
379
+ };
380
+ updateWidth();
381
+ if (typeof ResizeObserver === 'undefined') {
382
+ return;
383
+ }
384
+ var observer = new ResizeObserver(updateWidth);
385
+ observer.observe(scrollport);
386
+ return function () {
387
+ return observer.disconnect();
388
+ };
389
+ }, [hasNoResults]);
390
+
347
391
  // This variable contains initial Y mouse coordinate, so we can restrict
348
392
  // autoScroller in X axis only
349
393
  var initialAutoScrollerClientY = (0, _react.useRef)();
@@ -654,7 +698,19 @@ var IssueLikeDataTableView = exports.IssueLikeDataTableView = function IssueLike
654
698
  })))), /*#__PURE__*/React.createElement("tbody", {
655
699
  "data-testid": testId && "".concat(testId, "--body"),
656
700
  className: (0, _runtime.ax)(["_n7zlidpf"])
657
- }, rows.map(function (_ref16) {
701
+ }, hasNoResults && /*#__PURE__*/React.createElement("tr", {
702
+ "data-testid": testId && "".concat(testId, "--no-results-row")
703
+ }, /*#__PURE__*/React.createElement(InlineEditableTableCell, {
704
+ colSpan: Math.max(headerColumns.length + (onVisibleColumnKeysChange ? 1 : 0), 1)
705
+ }, /*#__PURE__*/React.createElement("div", {
706
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- width is measured from the scrollport at runtime
707
+ style: {
708
+ width: noResultsWidth
709
+ },
710
+ className: (0, _runtime.ax)(["_kqsw1if8 _1ltvidpf _1e0c1txw _1bah1h6o"])
711
+ }, /*#__PURE__*/React.createElement(_noResults.NoResults, {
712
+ isCompact: true
713
+ })))), rows.map(function (_ref16) {
658
714
  var key = _ref16.key,
659
715
  cells = _ref16.cells,
660
716
  ref = _ref16.ref;
@@ -138,6 +138,9 @@ var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(props) {
138
138
  };
139
139
  }, [destinationObjectTypes, extensionKey]);
140
140
  var resolvedWithNoResults = status === 'resolved' && !responseItems.length;
141
+ // With columns available the table can keep its headers and show the empty state in place of
142
+ // the rows, instead of replacing the whole table with it.
143
+ var shouldRenderTableWithNoResults = resolvedWithNoResults && !!columns.length && (0, _platformFeatureFlags.fg)('platform_lp_sllv_ux_improvements');
141
144
  var jqlUrl = selectedJiraSite && jql && "".concat(selectedJiraSite.url, "/issues/?jql=").concat(encodeURI(jql));
142
145
  var shouldShowIssueCount = !!totalCount && totalCount !== 1 && currentViewMode === 'table';
143
146
  var isDataReady = (visibleColumnKeys || []).length > 0;
@@ -316,7 +319,7 @@ var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(props) {
316
319
  return /*#__PURE__*/_react.default.createElement(_accessRequired.AccessRequired, {
317
320
  url: selectedJiraSiteUrl || urlBeingEdited
318
321
  });
319
- } else if (resolvedWithNoResults || status === 'forbidden') {
322
+ } else if (resolvedWithNoResults && !shouldRenderTableWithNoResults || status === 'forbidden') {
320
323
  return /*#__PURE__*/_react.default.createElement(_noResults.NoResults, null);
321
324
  } else if (status === 'empty' || !columns.length) {
322
325
  // persist the empty state when making the initial /data request which contains the columns
@@ -345,7 +348,7 @@ var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(props) {
345
348
  }, /*#__PURE__*/_react.default.createElement(_datasourcesTableInModalPreview.default, {
346
349
  testId: "jira-datasource-table"
347
350
  }));
348
- }, [columns.length, currentSearchMethod, formatMessage, jql, jqlUrl, resolvedWithNoResults, selectedJiraSite === null || selectedJiraSite === void 0 ? void 0 : selectedJiraSite.url, status, urlBeingEdited, reset]);
351
+ }, [columns.length, currentSearchMethod, formatMessage, jql, jqlUrl, resolvedWithNoResults, shouldRenderTableWithNoResults, selectedJiraSite === null || selectedJiraSite === void 0 ? void 0 : selectedJiraSite.url, status, urlBeingEdited, reset]);
349
352
  var siteSelectorLabel = (0, _react.useMemo)(function () {
350
353
  if ((0, _platformFeatureFlags.fg)('confluence-issue-terminology-refresh')) {
351
354
  return availableSites && availableSites.length > 1 ? _messages3.modalMessages.insertIssuesTitleManySitesIssueTermRefresh : _messages3.modalMessages.insertIssuesTitleIssueTermRefresh;
@@ -1,6 +1,7 @@
1
1
  import { useCallback, useEffect, useRef, useState } from 'react';
2
2
  import isEqual from 'lodash/isEqual';
3
3
  import { isFedRamp } from '@atlaskit/atlassian-context/is-fedramp';
4
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
4
5
  import { DEFAULT_GET_DATASOURCE_DATA_PAGE_SIZE, useDatasourceClientExtension } from '@atlaskit/link-client-extension';
5
6
  import { useDatasourceAnalyticsEvents } from '../analytics';
6
7
  import { useDatasourceActions } from '../state';
@@ -230,7 +231,11 @@ export const useDatasourceTableState = ({
230
231
  if (fieldKeys.length > 0) {
231
232
  setLastRequestedFieldKeys(fieldKeys);
232
233
  }
233
- if ((isSchemaFromData && schema || fullSchema.properties.length > 0) && items.length > 0) {
234
+
235
+ // A response with no items still describes its columns, so the schema is worth applying
236
+ // to let the table keep its headers while showing the empty state.
237
+ const shouldApplySchemaWithoutItems = items.length === 0 && fg('platform_lp_sllv_ux_improvements');
238
+ if ((isSchemaFromData && schema || fullSchema.properties.length > 0) && (items.length > 0 || shouldApplySchemaWithoutItems)) {
234
239
  applySchemaProperties(schema || fullSchema, fieldKeys);
235
240
  }
236
241
  const isUserLoadingNextPage = responseItems.length !== 0 && !shouldRequestFirstPage;
@@ -3,6 +3,7 @@ import "./index.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
5
5
  import { useCallback, useMemo } from 'react';
6
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
6
7
  import { AccessRequired } from '../../../common/error-state/access-required';
7
8
  import { ModalLoadingError } from '../../../common/error-state/modal-loading-error';
8
9
  import { NoResults } from '../../../common/error-state/no-results';
@@ -46,6 +47,9 @@ export const RenderAssetsContent = props => {
46
47
  isFetchingInitialData
47
48
  } = props;
48
49
  const resolvedWithNoResults = status === 'resolved' && !responseItems.length;
50
+ // With columns available the table can keep its headers and show the empty state in place of
51
+ // the rows, instead of replacing the whole table with it.
52
+ const shouldRenderTableWithNoResults = resolvedWithNoResults && !!columns.length && fg('platform_lp_sllv_ux_improvements');
49
53
  const issueLikeDataTableView = useMemo(() => /*#__PURE__*/React.createElement("div", {
50
54
  className: ax(["_1reo1wug _18m91wug _4t3i1pna _1e0c11p5", "_19itia51 _n7zl1mpn _13li1mok _qrwq1mok _1itkz1kv _12vemgnk _1lrw1sd4 _qmxj1c00"])
51
55
  }, /*#__PURE__*/React.createElement(IssueLikeDataTableView, {
@@ -70,12 +74,12 @@ export const RenderAssetsContent = props => {
70
74
  return /*#__PURE__*/React.createElement(UnauthorizedView, null);
71
75
  } else if (status === 'empty') {
72
76
  return /*#__PURE__*/React.createElement(EmptyView, null);
73
- } else if (resolvedWithNoResults) {
77
+ } else if (resolvedWithNoResults && !shouldRenderTableWithNoResults) {
74
78
  return /*#__PURE__*/React.createElement(NoResultsView, null);
75
79
  } else if (status === 'loading' && !columns.length) {
76
80
  return /*#__PURE__*/React.createElement(LoadingView, null);
77
81
  }
78
82
  return issueLikeDataTableView;
79
- }, [columns.length, isFetchingInitialData, issueLikeDataTableView, resolvedWithNoResults, status]);
83
+ }, [columns.length, isFetchingInitialData, issueLikeDataTableView, resolvedWithNoResults, shouldRenderTableWithNoResults, status]);
80
84
  return renderAssetsContentView();
81
85
  };
@@ -1,11 +1,13 @@
1
1
  ._zulp1ejb{gap:var(--ds-space-300,24px)}
2
2
  ._zulppxbi{gap:var(--ds-space-200,1pc)}._10fp1h6o{justify-self:center}
3
3
  ._18u0oahv{margin-left:var(--ds-space-600,3pc)}
4
+ ._19pk1ejb{margin-top:var(--ds-space-300,24px)}
4
5
  ._19pkoahv{margin-top:var(--ds-space-600,3pc)}
5
6
  ._1wpz1h6o{align-self:center}
6
7
  ._2hwxoahv{margin-right:var(--ds-space-600,3pc)}
7
8
  ._4cvr1h6o{align-items:center}
8
9
  ._6a6z1h6o{justify-items:center}
10
+ ._otyr1ejb{margin-bottom:var(--ds-space-300,24px)}
9
11
  ._otyroahv{margin-bottom:var(--ds-space-600,3pc)}
10
12
  ._p12fko4j{max-width:19pc}
11
13
  ._y3gn1h6o{text-align:center}
@@ -11,10 +11,12 @@ import { SpotSearchNoResult } from '../../../common/ui/spot/error-state/search-n
11
11
  import { loadingErrorMessages } from './messages';
12
12
  const styles = {
13
13
  noResultsContainerStyles: "_4cvr1h6o _6a6z1h6o _1wpz1h6o _10fp1h6o _19pkoahv _2hwxoahv _otyroahv _18u0oahv",
14
+ noResultsCompactContainerStyles: "_4cvr1h6o _6a6z1h6o _1wpz1h6o _10fp1h6o _19pk1ejb _2hwxoahv _otyr1ejb _18u0oahv",
14
15
  noResultsContentStyles: "_zulp1ejb _4cvr1h6o _6a6z1h6o _p12fko4j",
15
16
  noResultsMessageContainerStyles: "_zulppxbi _4cvr1h6o _6a6z1h6o _y3gn1h6o"
16
17
  };
17
18
  export const NoResults = ({
19
+ isCompact,
18
20
  onRefresh
19
21
  }) => {
20
22
  const {
@@ -27,7 +29,7 @@ export const NoResults = ({
27
29
  fireEvent('ui.emptyResult.shown.datasource', {});
28
30
  }, [fireEvent]);
29
31
  return /*#__PURE__*/React.createElement(Grid, {
30
- xcss: styles.noResultsContainerStyles,
32
+ xcss: isCompact ? styles.noResultsCompactContainerStyles : styles.noResultsContainerStyles,
31
33
  testId: "datasource-modal--no-results"
32
34
  }, /*#__PURE__*/React.createElement(Grid, {
33
35
  xcss: styles.noResultsContentStyles
@@ -7,10 +7,12 @@ import { FormattedMessage, useIntl } from 'react-intl';
7
7
  import Button from '@atlaskit/button/new';
8
8
  import DropdownMenu, { DropdownItem, DropdownItemGroup } from '@atlaskit/dropdown-menu';
9
9
  import ChevronDownIcon from '@atlaskit/icon/core/chevron-down';
10
+ import { fg } from '@atlaskit/platform-feature-flags';
10
11
  import { Box } from '@atlaskit/primitives/compiled';
11
12
  import { displayViewDropDownMessages } from './messages';
12
13
  const styles = {
13
- dropDownItemGroupStyles: "_2rko12b0 _1bsb1pna _4t3i7iqz"
14
+ dropDownItemGroupStyles: "_2rko12b0 _1bsb1pna _4t3i7iqz",
15
+ dropDownItemGroupStylesWithoutFixedHeight: "_2rko12b0 _1bsb1pna"
14
16
  };
15
17
  const InlineIcon = /*#__PURE__*/React.createElement("svg", {
16
18
  xmlns: "http://www.w3.org/2000/svg",
@@ -59,7 +61,7 @@ export const DisplayViewDropDown = ({
59
61
  }), triggerText),
60
62
  testId: "datasource-modal--view-drop-down"
61
63
  }, /*#__PURE__*/React.createElement(Box, {
62
- xcss: styles.dropDownItemGroupStyles
64
+ xcss: fg('platform_lp_sllv_ux_improvements') ? styles.dropDownItemGroupStylesWithoutFixedHeight : styles.dropDownItemGroupStyles
63
65
  }, /*#__PURE__*/React.createElement(DropdownItemGroup, null, /*#__PURE__*/React.createElement(DropdownItem, {
64
66
  testId: "dropdown-item-table",
65
67
  onClick: () => onViewModeChange('table'),
@@ -8,6 +8,7 @@ import FeatureGates from '@atlaskit/feature-gate-js-client';
8
8
  import IntlMessagesProvider from '@atlaskit/intl-messages-provider/main';
9
9
  import LinkComponent from '@atlaskit/link';
10
10
  import { CloseButton, ModalBody, ModalFooter, ModalHeader, ModalTitle } from '@atlaskit/modal-dialog';
11
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
11
12
  import { Box, Flex } from '@atlaskit/primitives/compiled';
12
13
  import { useDatasourceAnalyticsEvents } from '../../../analytics';
13
14
  import { DatasourceAction, DatasourceSearchMethod } from '../../../analytics/types';
@@ -152,6 +153,9 @@ export const PlainConfluenceSearchConfigModal = props => {
152
153
  siteSelectorLabel = availableSites && availableSites.length > 1 ? confluenceSearchModalMessages.insertIssuesTitleManySites : confluenceSearchModalMessages.insertIssuesTitle;
153
154
  }
154
155
  const resolvedWithNoResults = status === 'resolved' && !responseItems.length;
156
+ // With columns available the table can keep its headers and show the empty state in place of
157
+ // the rows, instead of replacing the whole table with it.
158
+ const shouldRenderTableWithNoResults = resolvedWithNoResults && !!columns.length && fg('platform_lp_sllv_ux_improvements');
155
159
  const hasConfluenceSearchParams = selectedConfluenceSite && (parameters === null || parameters === void 0 ? void 0 : parameters.searchString);
156
160
  const selectedConfluenceSiteUrl = selectedConfluenceSite === null || selectedConfluenceSite === void 0 ? void 0 : selectedConfluenceSite.url;
157
161
  const confluenceSearchUrl = useMemo(() => {
@@ -234,7 +238,7 @@ export const PlainConfluenceSearchConfigModal = props => {
234
238
  return /*#__PURE__*/React.createElement(AccessRequired, {
235
239
  url: selectedConfluenceSiteUrl || urlBeingEdited
236
240
  });
237
- } else if (resolvedWithNoResults || status === 'forbidden') {
241
+ } else if (resolvedWithNoResults && !shouldRenderTableWithNoResults || status === 'forbidden') {
238
242
  return /*#__PURE__*/React.createElement(NoResults, null);
239
243
  } else if (status === 'empty' || !columns.length) {
240
244
  // persist the empty state when making the initial /data request which contains the columns
@@ -257,7 +261,7 @@ export const PlainConfluenceSearchConfigModal = props => {
257
261
  }, /*#__PURE__*/React.createElement(DatasourcesTableInModalPreview, {
258
262
  testId: "confluence-search-datasource-table"
259
263
  }));
260
- }, [status, resolvedWithNoResults, columns.length, selectedConfluenceSiteUrl, urlBeingEdited, hasConfluenceSearchParams, formatMessage, reset, selectedConfluenceSite]);
264
+ }, [status, resolvedWithNoResults, shouldRenderTableWithNoResults, columns.length, selectedConfluenceSiteUrl, urlBeingEdited, hasConfluenceSearchParams, formatMessage, reset, selectedConfluenceSite]);
261
265
  const renderInlineLinkModalContent = useCallback(() => {
262
266
  if (status === 'unauthorized') {
263
267
  return /*#__PURE__*/React.createElement(AccessRequired, {
@@ -173,7 +173,11 @@ const DatasourceTableViewWithoutAnalytics = ({
173
173
  shouldForceRequest: true
174
174
  });
175
175
  }, [reset]);
176
- if (status === 'resolved' && !responseItems.length || status === 'forbidden') {
176
+ const isResolvedWithNoResults = status === 'resolved' && !responseItems.length;
177
+ // With columns available the table can keep its headers and footer and show the empty state
178
+ // in place of the rows, instead of replacing the whole view with it.
179
+ const shouldRenderTableWithNoResults = isResolvedWithNoResults && hasColumns && fg('platform_lp_sllv_ux_improvements');
180
+ if (isResolvedWithNoResults && !shouldRenderTableWithNoResults || status === 'forbidden') {
177
181
  return /*#__PURE__*/React.createElement(NoResults, null);
178
182
  }
179
183
  if (status === 'unauthorized') {
@@ -225,9 +229,9 @@ const DatasourceTableViewWithoutAnalytics = ({
225
229
  isCompact: true
226
230
  }), /*#__PURE__*/React.createElement(TableFooter, {
227
231
  datasourceId: datasourceId,
228
- itemCount: isDataReady ? totalCount : undefined,
232
+ itemCount: isDataReady ? totalCount : shouldRenderTableWithNoResults ? 0 : undefined,
229
233
  onRefresh: onRefresh,
230
- isLoading: !isDataReady || status === 'loading',
234
+ isLoading: shouldRenderTableWithNoResults ? false : !isDataReady || status === 'loading',
231
235
  url: url
232
236
  })));
233
237
  };
@@ -78,6 +78,7 @@ thead.has-column-picker ._10i2idpf:nth-last-of-type(2){border-right:0}.ProseMirr
78
78
  ._19bv1b66{padding-left:var(--ds-space-050,4px)}
79
79
  ._19bvze3t{padding-left:var(--ds-space-0,0)}
80
80
  ._19pkidpf{margin-top:0}
81
+ ._1bah1h6o{justify-content:center}
81
82
  ._1bsb1osq{width:100%}
82
83
  ._1bto1l2s{text-overflow:ellipsis}
83
84
  ._1cimn7od [data-testid=button-connect-account]>span{white-space:unset}
@@ -87,6 +88,7 @@ thead.has-column-picker ._10i2idpf:nth-last-of-type(2){border-right:0}.ProseMirr
87
88
  ._1ixkusic:last-of-type{text-align:right}
88
89
  ._1lhc1b66:first-of-type{padding-left:var(--ds-space-050,4px)}
89
90
  ._1lrw1sd4{background-size:40px 100%,14px 100%,40px 100%,14px 100%,100% 75pt,100% 14px,100% 40px,100% 10px}
91
+ ._1ltvidpf{left:0}
90
92
  ._1nd0cs5v [data-testid=datasource-header-content--container]{-webkit-line-clamp:2}
91
93
  ._1o0zidpf{border-bottom-right-radius:0}
92
94
  ._1o59pxbi:last-of-type{padding-right:var(--ds-space-200,1pc)}
@@ -25,6 +25,7 @@ import Tooltip from '@atlaskit/tooltip';
25
25
  import { startUfoExperience, succeedUfoExperience } from '../../analytics/ufoExperiences';
26
26
  import { useDatasourceExperienceId } from '../../contexts/datasource-experience-id';
27
27
  import { useIsInPDFRender } from '../../hooks/useIsInPDFRender';
28
+ import { NoResults } from '../common/error-state/no-results';
28
29
  import { ColumnPicker } from './column-picker';
29
30
  import { DragColumnPreview } from './drag-column-preview';
30
31
  import { DraggableTableHeading } from './draggable-table-heading';
@@ -57,6 +58,23 @@ const wrappedStyles = null;
57
58
  const richTextCellStyles = null;
58
59
  const tableContainerStyles = null;
59
60
 
61
+ // The cell spans every column, so it is as wide as the scrollable table rather than the part of it
62
+ // that is on screen. Sticking to the left edge of the scrollport keeps the empty state centred on
63
+ // what the user can actually see while the headers still scroll behind it.
64
+ const noResultsCellContentStyles = null;
65
+ const getHorizontalScrollParent = element => {
66
+ let current = element;
67
+ while (current) {
68
+ const {
69
+ overflowX
70
+ } = getComputedStyle(current);
71
+ if (overflowX === 'auto' || overflowX === 'scroll') {
72
+ return current;
73
+ }
74
+ current = current.parentElement;
75
+ }
76
+ };
77
+
60
78
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled
61
79
  const Table = forwardRef(({
62
80
  as: C = "table",
@@ -293,6 +311,26 @@ export const IssueLikeDataTableView = ({
293
311
  }, [isInPDFRender, onNextPage, status, hasNextPage]);
294
312
  const hasData = items.length > 0;
295
313
 
314
+ // A resolved response with no items still carries column metadata, so the table can keep its
315
+ // headers and render the empty state where the rows would normally be.
316
+ const hasNoResults = status === 'resolved' && !hasData && fg('platform_lp_sllv_ux_improvements');
317
+ const [noResultsWidth, setNoResultsWidth] = useState();
318
+ useEffect(() => {
319
+ const container = containerRef.current;
320
+ if (!hasNoResults || !container) {
321
+ return;
322
+ }
323
+ const scrollport = getHorizontalScrollParent(container) || container;
324
+ const updateWidth = () => setNoResultsWidth(scrollport.clientWidth || undefined);
325
+ updateWidth();
326
+ if (typeof ResizeObserver === 'undefined') {
327
+ return;
328
+ }
329
+ const observer = new ResizeObserver(updateWidth);
330
+ observer.observe(scrollport);
331
+ return () => observer.disconnect();
332
+ }, [hasNoResults]);
333
+
296
334
  // This variable contains initial Y mouse coordinate, so we can restrict
297
335
  // autoScroller in X axis only
298
336
  const initialAutoScrollerClientY = useRef();
@@ -583,7 +621,19 @@ export const IssueLikeDataTableView = ({
583
621
  })))), /*#__PURE__*/React.createElement("tbody", {
584
622
  "data-testid": testId && `${testId}--body`,
585
623
  className: ax(["_n7zlidpf"])
586
- }, rows.map(({
624
+ }, hasNoResults && /*#__PURE__*/React.createElement("tr", {
625
+ "data-testid": testId && `${testId}--no-results-row`
626
+ }, /*#__PURE__*/React.createElement(InlineEditableTableCell, {
627
+ colSpan: Math.max(headerColumns.length + (onVisibleColumnKeysChange ? 1 : 0), 1)
628
+ }, /*#__PURE__*/React.createElement("div", {
629
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- width is measured from the scrollport at runtime
630
+ style: {
631
+ width: noResultsWidth
632
+ },
633
+ className: ax(["_kqsw1if8 _1ltvidpf _1e0c1txw _1bah1h6o"])
634
+ }, /*#__PURE__*/React.createElement(NoResults, {
635
+ isCompact: true
636
+ })))), rows.map(({
587
637
  key,
588
638
  cells,
589
639
  ref
@@ -120,6 +120,9 @@ const PlainJiraIssuesConfigModal = props => {
120
120
  destinationObjectTypes
121
121
  }), [destinationObjectTypes, extensionKey]);
122
122
  const resolvedWithNoResults = status === 'resolved' && !responseItems.length;
123
+ // With columns available the table can keep its headers and show the empty state in place of
124
+ // the rows, instead of replacing the whole table with it.
125
+ const shouldRenderTableWithNoResults = resolvedWithNoResults && !!columns.length && fg('platform_lp_sllv_ux_improvements');
123
126
  const jqlUrl = selectedJiraSite && jql && `${selectedJiraSite.url}/issues/?jql=${encodeURI(jql)}`;
124
127
  const shouldShowIssueCount = !!totalCount && totalCount !== 1 && currentViewMode === 'table';
125
128
  const isDataReady = (visibleColumnKeys || []).length > 0;
@@ -293,7 +296,7 @@ const PlainJiraIssuesConfigModal = props => {
293
296
  return /*#__PURE__*/React.createElement(AccessRequired, {
294
297
  url: selectedJiraSiteUrl || urlBeingEdited
295
298
  });
296
- } else if (resolvedWithNoResults || status === 'forbidden') {
299
+ } else if (resolvedWithNoResults && !shouldRenderTableWithNoResults || status === 'forbidden') {
297
300
  return /*#__PURE__*/React.createElement(NoResults, null);
298
301
  } else if (status === 'empty' || !columns.length) {
299
302
  // persist the empty state when making the initial /data request which contains the columns
@@ -322,7 +325,7 @@ const PlainJiraIssuesConfigModal = props => {
322
325
  }, /*#__PURE__*/React.createElement(DatasourcesTableInModalPreview, {
323
326
  testId: "jira-datasource-table"
324
327
  }));
325
- }, [columns.length, currentSearchMethod, formatMessage, jql, jqlUrl, resolvedWithNoResults, selectedJiraSite === null || selectedJiraSite === void 0 ? void 0 : selectedJiraSite.url, status, urlBeingEdited, reset]);
328
+ }, [columns.length, currentSearchMethod, formatMessage, jql, jqlUrl, resolvedWithNoResults, shouldRenderTableWithNoResults, selectedJiraSite === null || selectedJiraSite === void 0 ? void 0 : selectedJiraSite.url, status, urlBeingEdited, reset]);
326
329
  const siteSelectorLabel = useMemo(() => {
327
330
  if (fg('confluence-issue-terminology-refresh')) {
328
331
  return availableSites && availableSites.length > 1 ? modalMessages.insertIssuesTitleManySitesIssueTermRefresh : modalMessages.insertIssuesTitleIssueTermRefresh;
@@ -5,6 +5,7 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
5
5
  import { useCallback, useEffect, useRef, useState } from 'react';
6
6
  import isEqual from 'lodash/isEqual';
7
7
  import { isFedRamp } from '@atlaskit/atlassian-context/is-fedramp';
8
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
8
9
  import { DEFAULT_GET_DATASOURCE_DATA_PAGE_SIZE, useDatasourceClientExtension } from '@atlaskit/link-client-extension';
9
10
  import { useDatasourceAnalyticsEvents } from '../analytics';
10
11
  import { useDatasourceActions } from '../state';
@@ -231,6 +232,7 @@ export var useDatasourceTableState = function useDatasourceTableState(_ref) {
231
232
  entityType,
232
233
  newIds,
233
234
  aris,
235
+ shouldApplySchemaWithoutItems,
234
236
  isUserLoadingNextPage,
235
237
  currentLoadedItemCount,
236
238
  newlyLoadedItemCount,
@@ -341,7 +343,11 @@ export var useDatasourceTableState = function useDatasourceTableState(_ref) {
341
343
  if (fieldKeys.length > 0) {
342
344
  setLastRequestedFieldKeys(fieldKeys);
343
345
  }
344
- if ((isSchemaFromData && schema || fullSchema.properties.length > 0) && items.length > 0) {
346
+
347
+ // A response with no items still describes its columns, so the schema is worth applying
348
+ // to let the table keep its headers while showing the empty state.
349
+ shouldApplySchemaWithoutItems = items.length === 0 && fg('platform_lp_sllv_ux_improvements');
350
+ if ((isSchemaFromData && schema || fullSchema.properties.length > 0) && (items.length > 0 || shouldApplySchemaWithoutItems)) {
345
351
  applySchemaProperties(schema || fullSchema, fieldKeys);
346
352
  }
347
353
  isUserLoadingNextPage = responseItems.length !== 0 && !shouldRequestFirstPage;
@@ -3,6 +3,7 @@ import "./index.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
5
5
  import { useCallback, useMemo } from 'react';
6
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
6
7
  import { AccessRequired } from '../../../common/error-state/access-required';
7
8
  import { ModalLoadingError } from '../../../common/error-state/modal-loading-error';
8
9
  import { NoResults } from '../../../common/error-state/no-results';
@@ -54,6 +55,9 @@ export var RenderAssetsContent = function RenderAssetsContent(props) {
54
55
  onVisibleColumnKeysChange = props.onVisibleColumnKeysChange,
55
56
  isFetchingInitialData = props.isFetchingInitialData;
56
57
  var resolvedWithNoResults = status === 'resolved' && !responseItems.length;
58
+ // With columns available the table can keep its headers and show the empty state in place of
59
+ // the rows, instead of replacing the whole table with it.
60
+ var shouldRenderTableWithNoResults = resolvedWithNoResults && !!columns.length && fg('platform_lp_sllv_ux_improvements');
57
61
  var issueLikeDataTableView = useMemo(function () {
58
62
  return /*#__PURE__*/React.createElement("div", {
59
63
  className: ax(["_1reo1wug _18m91wug _4t3i1pna _1e0c11p5", "_19itia51 _n7zl1mpn _13li1mok _qrwq1mok _1itkz1kv _12vemgnk _1lrw1sd4 _qmxj1c00"])
@@ -80,12 +84,12 @@ export var RenderAssetsContent = function RenderAssetsContent(props) {
80
84
  return /*#__PURE__*/React.createElement(UnauthorizedView, null);
81
85
  } else if (status === 'empty') {
82
86
  return /*#__PURE__*/React.createElement(EmptyView, null);
83
- } else if (resolvedWithNoResults) {
87
+ } else if (resolvedWithNoResults && !shouldRenderTableWithNoResults) {
84
88
  return /*#__PURE__*/React.createElement(NoResultsView, null);
85
89
  } else if (status === 'loading' && !columns.length) {
86
90
  return /*#__PURE__*/React.createElement(LoadingView, null);
87
91
  }
88
92
  return issueLikeDataTableView;
89
- }, [columns.length, isFetchingInitialData, issueLikeDataTableView, resolvedWithNoResults, status]);
93
+ }, [columns.length, isFetchingInitialData, issueLikeDataTableView, resolvedWithNoResults, shouldRenderTableWithNoResults, status]);
90
94
  return renderAssetsContentView();
91
95
  };
@@ -1,11 +1,13 @@
1
1
  ._zulp1ejb{gap:var(--ds-space-300,24px)}
2
2
  ._zulppxbi{gap:var(--ds-space-200,1pc)}._10fp1h6o{justify-self:center}
3
3
  ._18u0oahv{margin-left:var(--ds-space-600,3pc)}
4
+ ._19pk1ejb{margin-top:var(--ds-space-300,24px)}
4
5
  ._19pkoahv{margin-top:var(--ds-space-600,3pc)}
5
6
  ._1wpz1h6o{align-self:center}
6
7
  ._2hwxoahv{margin-right:var(--ds-space-600,3pc)}
7
8
  ._4cvr1h6o{align-items:center}
8
9
  ._6a6z1h6o{justify-items:center}
10
+ ._otyr1ejb{margin-bottom:var(--ds-space-300,24px)}
9
11
  ._otyroahv{margin-bottom:var(--ds-space-600,3pc)}
10
12
  ._p12fko4j{max-width:19pc}
11
13
  ._y3gn1h6o{text-align:center}
@@ -11,11 +11,13 @@ import { SpotSearchNoResult } from '../../../common/ui/spot/error-state/search-n
11
11
  import { loadingErrorMessages } from './messages';
12
12
  var styles = {
13
13
  noResultsContainerStyles: "_4cvr1h6o _6a6z1h6o _1wpz1h6o _10fp1h6o _19pkoahv _2hwxoahv _otyroahv _18u0oahv",
14
+ noResultsCompactContainerStyles: "_4cvr1h6o _6a6z1h6o _1wpz1h6o _10fp1h6o _19pk1ejb _2hwxoahv _otyr1ejb _18u0oahv",
14
15
  noResultsContentStyles: "_zulp1ejb _4cvr1h6o _6a6z1h6o _p12fko4j",
15
16
  noResultsMessageContainerStyles: "_zulppxbi _4cvr1h6o _6a6z1h6o _y3gn1h6o"
16
17
  };
17
18
  export var NoResults = function NoResults(_ref) {
18
- var onRefresh = _ref.onRefresh;
19
+ var isCompact = _ref.isCompact,
20
+ onRefresh = _ref.onRefresh;
19
21
  var _useDatasourceAnalyti = useDatasourceAnalyticsEvents(),
20
22
  fireEvent = _useDatasourceAnalyti.fireEvent;
21
23
  var _useIntl = useIntl(),
@@ -24,7 +26,7 @@ export var NoResults = function NoResults(_ref) {
24
26
  fireEvent('ui.emptyResult.shown.datasource', {});
25
27
  }, [fireEvent]);
26
28
  return /*#__PURE__*/React.createElement(Grid, {
27
- xcss: styles.noResultsContainerStyles,
29
+ xcss: isCompact ? styles.noResultsCompactContainerStyles : styles.noResultsContainerStyles,
28
30
  testId: "datasource-modal--no-results"
29
31
  }, /*#__PURE__*/React.createElement(Grid, {
30
32
  xcss: styles.noResultsContentStyles
@@ -9,10 +9,12 @@ import { FormattedMessage, useIntl } from 'react-intl';
9
9
  import Button from '@atlaskit/button/new';
10
10
  import DropdownMenu, { DropdownItem, DropdownItemGroup } from '@atlaskit/dropdown-menu';
11
11
  import ChevronDownIcon from '@atlaskit/icon/core/chevron-down';
12
+ import { fg } from '@atlaskit/platform-feature-flags';
12
13
  import { Box } from '@atlaskit/primitives/compiled';
13
14
  import { displayViewDropDownMessages } from './messages';
14
15
  var styles = {
15
- dropDownItemGroupStyles: "_2rko12b0 _1bsb1pna _4t3i7iqz"
16
+ dropDownItemGroupStyles: "_2rko12b0 _1bsb1pna _4t3i7iqz",
17
+ dropDownItemGroupStylesWithoutFixedHeight: "_2rko12b0 _1bsb1pna"
16
18
  };
17
19
  var InlineIcon = /*#__PURE__*/React.createElement("svg", {
18
20
  xmlns: "http://www.w3.org/2000/svg",
@@ -62,7 +64,7 @@ export var DisplayViewDropDown = function DisplayViewDropDown(_ref) {
62
64
  },
63
65
  testId: "datasource-modal--view-drop-down"
64
66
  }, /*#__PURE__*/React.createElement(Box, {
65
- xcss: styles.dropDownItemGroupStyles
67
+ xcss: fg('platform_lp_sllv_ux_improvements') ? styles.dropDownItemGroupStylesWithoutFixedHeight : styles.dropDownItemGroupStyles
66
68
  }, /*#__PURE__*/React.createElement(DropdownItemGroup, null, /*#__PURE__*/React.createElement(DropdownItem, {
67
69
  testId: "dropdown-item-table",
68
70
  onClick: function onClick() {
@@ -11,6 +11,7 @@ import FeatureGates from '@atlaskit/feature-gate-js-client';
11
11
  import IntlMessagesProvider from '@atlaskit/intl-messages-provider/main';
12
12
  import LinkComponent from '@atlaskit/link';
13
13
  import { CloseButton, ModalBody, ModalFooter, ModalHeader, ModalTitle } from '@atlaskit/modal-dialog';
14
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
14
15
  import { Box, Flex } from '@atlaskit/primitives/compiled';
15
16
  import { useDatasourceAnalyticsEvents } from '../../../analytics';
16
17
  import { DatasourceAction, DatasourceSearchMethod } from '../../../analytics/types';
@@ -151,6 +152,9 @@ export var PlainConfluenceSearchConfigModal = function PlainConfluenceSearchConf
151
152
  siteSelectorLabel = availableSites && availableSites.length > 1 ? confluenceSearchModalMessages.insertIssuesTitleManySites : confluenceSearchModalMessages.insertIssuesTitle;
152
153
  }
153
154
  var resolvedWithNoResults = status === 'resolved' && !responseItems.length;
155
+ // With columns available the table can keep its headers and show the empty state in place of
156
+ // the rows, instead of replacing the whole table with it.
157
+ var shouldRenderTableWithNoResults = resolvedWithNoResults && !!columns.length && fg('platform_lp_sllv_ux_improvements');
154
158
  var hasConfluenceSearchParams = selectedConfluenceSite && (parameters === null || parameters === void 0 ? void 0 : parameters.searchString);
155
159
  var selectedConfluenceSiteUrl = selectedConfluenceSite === null || selectedConfluenceSite === void 0 ? void 0 : selectedConfluenceSite.url;
156
160
  var confluenceSearchUrl = useMemo(function () {
@@ -237,7 +241,7 @@ export var PlainConfluenceSearchConfigModal = function PlainConfluenceSearchConf
237
241
  return /*#__PURE__*/React.createElement(AccessRequired, {
238
242
  url: selectedConfluenceSiteUrl || urlBeingEdited
239
243
  });
240
- } else if (resolvedWithNoResults || status === 'forbidden') {
244
+ } else if (resolvedWithNoResults && !shouldRenderTableWithNoResults || status === 'forbidden') {
241
245
  return /*#__PURE__*/React.createElement(NoResults, null);
242
246
  } else if (status === 'empty' || !columns.length) {
243
247
  // persist the empty state when making the initial /data request which contains the columns
@@ -260,7 +264,7 @@ export var PlainConfluenceSearchConfigModal = function PlainConfluenceSearchConf
260
264
  }, /*#__PURE__*/React.createElement(DatasourcesTableInModalPreview, {
261
265
  testId: "confluence-search-datasource-table"
262
266
  }));
263
- }, [status, resolvedWithNoResults, columns.length, selectedConfluenceSiteUrl, urlBeingEdited, hasConfluenceSearchParams, formatMessage, reset, selectedConfluenceSite]);
267
+ }, [status, resolvedWithNoResults, shouldRenderTableWithNoResults, columns.length, selectedConfluenceSiteUrl, urlBeingEdited, hasConfluenceSearchParams, formatMessage, reset, selectedConfluenceSite]);
264
268
  var renderInlineLinkModalContent = useCallback(function () {
265
269
  if (status === 'unauthorized') {
266
270
  return /*#__PURE__*/React.createElement(AccessRequired, {
@@ -179,7 +179,11 @@ var DatasourceTableViewWithoutAnalytics = function DatasourceTableViewWithoutAna
179
179
  shouldForceRequest: true
180
180
  });
181
181
  }, [reset]);
182
- if (status === 'resolved' && !responseItems.length || status === 'forbidden') {
182
+ var isResolvedWithNoResults = status === 'resolved' && !responseItems.length;
183
+ // With columns available the table can keep its headers and footer and show the empty state
184
+ // in place of the rows, instead of replacing the whole view with it.
185
+ var shouldRenderTableWithNoResults = isResolvedWithNoResults && hasColumns && fg('platform_lp_sllv_ux_improvements');
186
+ if (isResolvedWithNoResults && !shouldRenderTableWithNoResults || status === 'forbidden') {
183
187
  return /*#__PURE__*/React.createElement(NoResults, null);
184
188
  }
185
189
  if (status === 'unauthorized') {
@@ -231,9 +235,9 @@ var DatasourceTableViewWithoutAnalytics = function DatasourceTableViewWithoutAna
231
235
  isCompact: true
232
236
  }), /*#__PURE__*/React.createElement(TableFooter, {
233
237
  datasourceId: datasourceId,
234
- itemCount: isDataReady ? totalCount : undefined,
238
+ itemCount: isDataReady ? totalCount : shouldRenderTableWithNoResults ? 0 : undefined,
235
239
  onRefresh: onRefresh,
236
- isLoading: !isDataReady || status === 'loading',
240
+ isLoading: shouldRenderTableWithNoResults ? false : !isDataReady || status === 'loading',
237
241
  url: url
238
242
  })));
239
243
  };
@@ -78,6 +78,7 @@ thead.has-column-picker ._10i2idpf:nth-last-of-type(2){border-right:0}.ProseMirr
78
78
  ._19bv1b66{padding-left:var(--ds-space-050,4px)}
79
79
  ._19bvze3t{padding-left:var(--ds-space-0,0)}
80
80
  ._19pkidpf{margin-top:0}
81
+ ._1bah1h6o{justify-content:center}
81
82
  ._1bsb1osq{width:100%}
82
83
  ._1bto1l2s{text-overflow:ellipsis}
83
84
  ._1cimn7od [data-testid=button-connect-account]>span{white-space:unset}
@@ -87,6 +88,7 @@ thead.has-column-picker ._10i2idpf:nth-last-of-type(2){border-right:0}.ProseMirr
87
88
  ._1ixkusic:last-of-type{text-align:right}
88
89
  ._1lhc1b66:first-of-type{padding-left:var(--ds-space-050,4px)}
89
90
  ._1lrw1sd4{background-size:40px 100%,14px 100%,40px 100%,14px 100%,100% 75pt,100% 14px,100% 40px,100% 10px}
91
+ ._1ltvidpf{left:0}
90
92
  ._1nd0cs5v [data-testid=datasource-header-content--container]{-webkit-line-clamp:2}
91
93
  ._1o0zidpf{border-bottom-right-radius:0}
92
94
  ._1o59pxbi:last-of-type{padding-right:var(--ds-space-200,1pc)}
@@ -38,6 +38,7 @@ import Tooltip from '@atlaskit/tooltip';
38
38
  import { startUfoExperience, succeedUfoExperience } from '../../analytics/ufoExperiences';
39
39
  import { useDatasourceExperienceId } from '../../contexts/datasource-experience-id';
40
40
  import { useIsInPDFRender } from '../../hooks/useIsInPDFRender';
41
+ import { NoResults } from '../common/error-state/no-results';
41
42
  import { ColumnPicker } from './column-picker';
42
43
  import { DragColumnPreview } from './drag-column-preview';
43
44
  import { DraggableTableHeading } from './draggable-table-heading';
@@ -70,6 +71,22 @@ var wrappedStyles = null;
70
71
  var richTextCellStyles = null;
71
72
  var tableContainerStyles = null;
72
73
 
74
+ // The cell spans every column, so it is as wide as the scrollable table rather than the part of it
75
+ // that is on screen. Sticking to the left edge of the scrollport keeps the empty state centred on
76
+ // what the user can actually see while the headers still scroll behind it.
77
+ var noResultsCellContentStyles = null;
78
+ var getHorizontalScrollParent = function getHorizontalScrollParent(element) {
79
+ var current = element;
80
+ while (current) {
81
+ var _getComputedStyle = getComputedStyle(current),
82
+ overflowX = _getComputedStyle.overflowX;
83
+ if (overflowX === 'auto' || overflowX === 'scroll') {
84
+ return current;
85
+ }
86
+ current = current.parentElement;
87
+ }
88
+ };
89
+
73
90
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled
74
91
  var Table = forwardRef(function (_ref2, __cmplr) {
75
92
  var _ref2$as = _ref2.as,
@@ -337,6 +354,33 @@ export var IssueLikeDataTableView = function IssueLikeDataTableView(_ref6) {
337
354
  }, [isInPDFRender, onNextPage, status, hasNextPage]);
338
355
  var hasData = items.length > 0;
339
356
 
357
+ // A resolved response with no items still carries column metadata, so the table can keep its
358
+ // headers and render the empty state where the rows would normally be.
359
+ var hasNoResults = status === 'resolved' && !hasData && fg('platform_lp_sllv_ux_improvements');
360
+ var _useState7 = useState(),
361
+ _useState8 = _slicedToArray(_useState7, 2),
362
+ noResultsWidth = _useState8[0],
363
+ setNoResultsWidth = _useState8[1];
364
+ useEffect(function () {
365
+ var container = containerRef.current;
366
+ if (!hasNoResults || !container) {
367
+ return;
368
+ }
369
+ var scrollport = getHorizontalScrollParent(container) || container;
370
+ var updateWidth = function updateWidth() {
371
+ return setNoResultsWidth(scrollport.clientWidth || undefined);
372
+ };
373
+ updateWidth();
374
+ if (typeof ResizeObserver === 'undefined') {
375
+ return;
376
+ }
377
+ var observer = new ResizeObserver(updateWidth);
378
+ observer.observe(scrollport);
379
+ return function () {
380
+ return observer.disconnect();
381
+ };
382
+ }, [hasNoResults]);
383
+
340
384
  // This variable contains initial Y mouse coordinate, so we can restrict
341
385
  // autoScroller in X axis only
342
386
  var initialAutoScrollerClientY = useRef();
@@ -647,7 +691,19 @@ export var IssueLikeDataTableView = function IssueLikeDataTableView(_ref6) {
647
691
  })))), /*#__PURE__*/React.createElement("tbody", {
648
692
  "data-testid": testId && "".concat(testId, "--body"),
649
693
  className: ax(["_n7zlidpf"])
650
- }, rows.map(function (_ref16) {
694
+ }, hasNoResults && /*#__PURE__*/React.createElement("tr", {
695
+ "data-testid": testId && "".concat(testId, "--no-results-row")
696
+ }, /*#__PURE__*/React.createElement(InlineEditableTableCell, {
697
+ colSpan: Math.max(headerColumns.length + (onVisibleColumnKeysChange ? 1 : 0), 1)
698
+ }, /*#__PURE__*/React.createElement("div", {
699
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- width is measured from the scrollport at runtime
700
+ style: {
701
+ width: noResultsWidth
702
+ },
703
+ className: ax(["_kqsw1if8 _1ltvidpf _1e0c1txw _1bah1h6o"])
704
+ }, /*#__PURE__*/React.createElement(NoResults, {
705
+ isCompact: true
706
+ })))), rows.map(function (_ref16) {
651
707
  var key = _ref16.key,
652
708
  cells = _ref16.cells,
653
709
  ref = _ref16.ref;
@@ -130,6 +130,9 @@ var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(props) {
130
130
  };
131
131
  }, [destinationObjectTypes, extensionKey]);
132
132
  var resolvedWithNoResults = status === 'resolved' && !responseItems.length;
133
+ // With columns available the table can keep its headers and show the empty state in place of
134
+ // the rows, instead of replacing the whole table with it.
135
+ var shouldRenderTableWithNoResults = resolvedWithNoResults && !!columns.length && fg('platform_lp_sllv_ux_improvements');
133
136
  var jqlUrl = selectedJiraSite && jql && "".concat(selectedJiraSite.url, "/issues/?jql=").concat(encodeURI(jql));
134
137
  var shouldShowIssueCount = !!totalCount && totalCount !== 1 && currentViewMode === 'table';
135
138
  var isDataReady = (visibleColumnKeys || []).length > 0;
@@ -308,7 +311,7 @@ var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(props) {
308
311
  return /*#__PURE__*/React.createElement(AccessRequired, {
309
312
  url: selectedJiraSiteUrl || urlBeingEdited
310
313
  });
311
- } else if (resolvedWithNoResults || status === 'forbidden') {
314
+ } else if (resolvedWithNoResults && !shouldRenderTableWithNoResults || status === 'forbidden') {
312
315
  return /*#__PURE__*/React.createElement(NoResults, null);
313
316
  } else if (status === 'empty' || !columns.length) {
314
317
  // persist the empty state when making the initial /data request which contains the columns
@@ -337,7 +340,7 @@ var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(props) {
337
340
  }, /*#__PURE__*/React.createElement(DatasourcesTableInModalPreview, {
338
341
  testId: "jira-datasource-table"
339
342
  }));
340
- }, [columns.length, currentSearchMethod, formatMessage, jql, jqlUrl, resolvedWithNoResults, selectedJiraSite === null || selectedJiraSite === void 0 ? void 0 : selectedJiraSite.url, status, urlBeingEdited, reset]);
343
+ }, [columns.length, currentSearchMethod, formatMessage, jql, jqlUrl, resolvedWithNoResults, shouldRenderTableWithNoResults, selectedJiraSite === null || selectedJiraSite === void 0 ? void 0 : selectedJiraSite.url, status, urlBeingEdited, reset]);
341
344
  var siteSelectorLabel = useMemo(function () {
342
345
  if (fg('confluence-issue-terminology-refresh')) {
343
346
  return availableSites && availableSites.length > 1 ? modalMessages.insertIssuesTitleManySitesIssueTermRefresh : modalMessages.insertIssuesTitleIssueTermRefresh;
@@ -1,5 +1,7 @@
1
1
  interface NoResultsProps {
2
+ /** Tightens the vertical spacing, for when there is less room than a full view to fill. */
3
+ isCompact?: boolean;
2
4
  onRefresh?: () => void;
3
5
  }
4
- export declare const NoResults: ({ onRefresh }: NoResultsProps) => JSX.Element;
6
+ export declare const NoResults: ({ isCompact, onRefresh }: NoResultsProps) => JSX.Element;
5
7
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/link-datasource",
3
- "version": "6.4.10",
3
+ "version": "6.4.11",
4
4
  "description": "UI Components to support linking platform dataset feature",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -188,6 +188,9 @@
188
188
  "platform_lp_sllv_richtext_margin_reset": {
189
189
  "type": "boolean"
190
190
  },
191
+ "platform_lp_sllv_ux_improvements": {
192
+ "type": "boolean"
193
+ },
191
194
  "navx-5509-sllv-link-new-tab-hint": {
192
195
  "type": "boolean"
193
196
  },
@@ -1,169 +0,0 @@
1
- /**
2
- * Testing structured MCP docs for review — ignore this file.
3
- * Contact #dst-structured-content in Slack with questions.
4
- */
5
-
6
- import path from 'path';
7
-
8
- import type { StructuredContentSource } from '@atlassian/structured-docs-types/types';
9
-
10
- import packageJson from './package.json';
11
-
12
- const packagePath = path.resolve(__dirname);
13
-
14
- const documentation: StructuredContentSource = {
15
- components: [
16
- {
17
- name: 'ConfluenceSearchConfigModal',
18
- description:
19
- 'Configuration modal for the Confluence search datasource. Lets users set up a "list of links" backed by a Confluence search query (space, query, sort) and produces Confluence search datasource ADF.',
20
- status: 'general-availability',
21
- import: {
22
- name: 'ConfluenceSearchConfigModal',
23
- package: '@atlaskit/link-datasource',
24
- type: 'named',
25
- packagePath,
26
- packageJson,
27
- },
28
- usageGuidelines: [
29
- 'Use when the user is configuring a Confluence search-based list of links (e.g. in a block or sidebar). On confirm, use the returned parameters to build datasource ADF or pass to DatasourceTableView.',
30
- ],
31
- contentGuidelines: [],
32
- accessibilityGuidelines: [
33
- 'Ensure the modal has an accessible title and focus is trapped; form fields (space, query, sort) must have labels and error messages announced.',
34
- ],
35
- keywords: ['link-datasource', 'confluence', 'search', 'datasource', 'config', 'modal'],
36
- categories: ['linking', 'data-display', 'forms'],
37
- examples: [
38
- {
39
- name: 'Confluence search config modal',
40
- description:
41
- 'ConfluenceSearchConfigModal for configuring a Confluence search datasource.',
42
- source: path.resolve(
43
- packagePath,
44
- './examples/content/basic-confluence-search-config-modal.tsx',
45
- ),
46
- },
47
- ],
48
- },
49
- {
50
- name: 'JiraIssuesConfigModal',
51
- description:
52
- 'Configuration modal for the Jira issues datasource. Lets users set up a list of Jira issues (JQL, columns, filters) and produces Jira issues datasource ADF.',
53
- status: 'general-availability',
54
- import: {
55
- name: 'JiraIssuesConfigModal',
56
- package: '@atlaskit/link-datasource',
57
- type: 'named',
58
- packagePath,
59
- packageJson,
60
- },
61
- usageGuidelines: [
62
- 'Use when the user is configuring a Jira issues list (e.g. in a block or table). On confirm, use the returned parameters for datasource ADF or DatasourceTableView.',
63
- ],
64
- contentGuidelines: [],
65
- accessibilityGuidelines: [
66
- 'Ensure the modal has an accessible title and focus management; JQL and column pickers must have clear labels and error announcements.',
67
- ],
68
- keywords: ['link-datasource', 'jira', 'issues', 'datasource', 'config', 'modal', 'JQL'],
69
- categories: ['linking', 'data-display', 'forms'],
70
- examples: [
71
- {
72
- name: 'Jira issues config modal',
73
- description: 'JiraIssuesConfigModal for configuring a Jira issues datasource.',
74
- source: path.resolve(
75
- packagePath,
76
- './examples/content/basic-jira-issues-config-modal.tsx',
77
- ),
78
- },
79
- {
80
- name: 'Jira issues table',
81
- description: 'Basic Jira issues table view using datasource.',
82
- source: path.resolve(packagePath, './examples/basic-jira-issues-table.tsx'),
83
- },
84
- ],
85
- },
86
- {
87
- name: 'AssetsConfigModal',
88
- description:
89
- 'Configuration modal for the Assets (object schema) datasource. Lets users set up a list of links from an Assets schema and produces Assets datasource ADF.',
90
- status: 'general-availability',
91
- import: {
92
- name: 'AssetsConfigModal',
93
- package: '@atlaskit/link-datasource',
94
- type: 'named',
95
- packagePath,
96
- packageJson,
97
- },
98
- usageGuidelines: [
99
- 'Use when the user is configuring an Assets-based list of links. On confirm, use the returned parameters for datasource ADF or table view.',
100
- ],
101
- contentGuidelines: [],
102
- accessibilityGuidelines: [
103
- 'Ensure the modal has an accessible title and that schema/object pickers have clear labels.',
104
- ],
105
- keywords: ['link-datasource', 'assets', 'datasource', 'config', 'modal'],
106
- categories: ['linking', 'data-display', 'forms'],
107
- examples: [
108
- {
109
- name: 'Assets config modal',
110
- description: 'AssetsConfigModal for configuring an Assets datasource.',
111
- source: path.resolve(packagePath, './examples/content/basic-assets-config-modal.tsx'),
112
- },
113
- ],
114
- },
115
- {
116
- name: 'DatasourceTableView',
117
- description:
118
- 'Table view component that renders a datasource (list of links) with configurable columns, sorting, and actions. Consumes datasource ADF or parameters and fetches data via the link client.',
119
- status: 'general-availability',
120
- import: {
121
- name: 'DatasourceTableView',
122
- package: '@atlaskit/link-datasource',
123
- type: 'named',
124
- packagePath,
125
- packageJson,
126
- },
127
- usageGuidelines: [
128
- 'Use when you need to display a list of links (Jira issues, Confluence search, Assets) in a table. Pass the datasource ADF or parameters; wrap in SmartCardProvider so resolution and actions work.',
129
- ],
130
- contentGuidelines: [],
131
- accessibilityGuidelines: [
132
- 'Ensure the table has a caption or aria-label; column headers and sort controls must be focusable and announced. Loading and error states should be announced.',
133
- ],
134
- keywords: ['link-datasource', 'table', 'datasource', 'list of links', 'view'],
135
- categories: ['linking', 'data-display'],
136
- examples: [
137
- {
138
- name: 'Jira issues table',
139
- description: 'DatasourceTableView showing Jira issues from a configured datasource.',
140
- source: path.resolve(packagePath, './examples/basic-jira-issues-table.tsx'),
141
- },
142
- ],
143
- },
144
- // Needs examples
145
- // {
146
- // name: 'buildDatasourceAdf',
147
- // description:
148
- // 'Utility that builds datasource ADF (ADF node for list of links) from datasource parameters. Used to persist or pass datasource config into the editor or table view.',
149
- // status: 'general-availability',
150
- // import: {
151
- // name: 'buildDatasourceAdf',
152
- // package: '@atlaskit/link-datasource',
153
- // type: 'named',
154
- // packagePath,
155
- // packageJson,
156
- // },
157
- // usageGuidelines: [
158
- // 'Use when you have datasource parameters (e.g. from a config modal) and need to produce the corresponding ADF node for the editor or for DatasourceTableView.',
159
- // ],
160
- // contentGuidelines: [],
161
- // accessibilityGuidelines: [],
162
- // keywords: ['link-datasource', 'adf', 'datasource', 'build', 'utility'],
163
- // categories: ['linking', 'data-display'],
164
- // examples: [],
165
- // },
166
- ],
167
- };
168
-
169
- export default documentation;