@atlaskit/link-datasource 2.12.4 → 2.12.5
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.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/link-datasource
|
|
2
2
|
|
|
3
|
+
## 2.12.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`ede5da85dd723`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ede5da85dd723) -
|
|
8
|
+
[ux] Fixes loading skeleton loosing padding for two-way sync
|
|
9
|
+
|
|
3
10
|
## 2.12.4
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
|
@@ -24,6 +24,7 @@ var _reorderWithEdge = require("@atlaskit/pragmatic-drag-and-drop-hitbox/util/re
|
|
|
24
24
|
var _pragmaticDragAndDropReactBeautifulDndAutoscroll = require("@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-autoscroll");
|
|
25
25
|
var _combine = require("@atlaskit/pragmatic-drag-and-drop/combine");
|
|
26
26
|
var _adapter = require("@atlaskit/pragmatic-drag-and-drop/element/adapter");
|
|
27
|
+
var _primitives = require("@atlaskit/primitives");
|
|
27
28
|
var _colors = require("@atlaskit/theme/colors");
|
|
28
29
|
var _typography = require("@atlaskit/theme/typography");
|
|
29
30
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
@@ -368,7 +369,14 @@ var IssueLikeDataTableView = exports.IssueLikeDataTableView = function IssueLike
|
|
|
368
369
|
key: 'loading',
|
|
369
370
|
cells: headerColumns.map(function (column) {
|
|
370
371
|
return {
|
|
371
|
-
content: (0, _react2.jsx)(
|
|
372
|
+
content: (0, _platformFeatureFlags.fg)('platform-datasources-enable-two-way-sync') ? (0, _react2.jsx)(_primitives.Box, {
|
|
373
|
+
paddingInline: "space.100"
|
|
374
|
+
}, (0, _react2.jsx)(_linkingCommon.Skeleton, {
|
|
375
|
+
borderRadius: 8,
|
|
376
|
+
width: "100%",
|
|
377
|
+
height: 14,
|
|
378
|
+
testId: "issues-table-row-loading"
|
|
379
|
+
})) : (0, _react2.jsx)(_linkingCommon.Skeleton, {
|
|
372
380
|
borderRadius: 8,
|
|
373
381
|
width: "100%",
|
|
374
382
|
height: 14,
|
|
@@ -708,12 +716,6 @@ var IssueLikeDataTableView = exports.IssueLikeDataTableView = function IssueLike
|
|
|
708
716
|
shouldUseWidth: shouldUseWidth,
|
|
709
717
|
width: width
|
|
710
718
|
});
|
|
711
|
-
// extra padding is required around skeleton loader to avoid vertical jumps when data loads
|
|
712
|
-
if (key !== null && key !== void 0 && key.includes('loading')) {
|
|
713
|
-
loadingRowStyle = _objectSpread(_objectSpread({}, loadingRowStyle), {}, {
|
|
714
|
-
paddingBlock: "var(--ds-space-100, 8px)"
|
|
715
|
-
});
|
|
716
|
-
}
|
|
717
719
|
|
|
718
720
|
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
719
721
|
if ((0, _platformFeatureFlags.fg)('platform-datasources-enable-two-way-sync')) {
|
|
@@ -727,6 +729,12 @@ var IssueLikeDataTableView = exports.IssueLikeDataTableView = function IssueLike
|
|
|
727
729
|
css: [wrappedColumnKeys !== null && wrappedColumnKeys !== void 0 && wrappedColumnKeys.includes(cellKey) ? null : truncateStyles]
|
|
728
730
|
}, content);
|
|
729
731
|
} else {
|
|
732
|
+
// extra padding is required around skeleton loader to avoid vertical jumps when data loads
|
|
733
|
+
if (key !== null && key !== void 0 && key.includes('loading')) {
|
|
734
|
+
loadingRowStyle = _objectSpread(_objectSpread({}, loadingRowStyle), {}, {
|
|
735
|
+
paddingBlock: "var(--ds-space-100, 8px)"
|
|
736
|
+
});
|
|
737
|
+
}
|
|
730
738
|
return (0, _react2.jsx)(_styled2.TableCell, {
|
|
731
739
|
key: cellKey,
|
|
732
740
|
"data-testid": testId && "".concat(testId, "--cell-").concat(cellIndex),
|
|
@@ -19,6 +19,7 @@ import { reorderWithEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/util/r
|
|
|
19
19
|
import { autoScroller } from '@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-autoscroll';
|
|
20
20
|
import { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';
|
|
21
21
|
import { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
|
|
22
|
+
import { Box } from '@atlaskit/primitives';
|
|
22
23
|
import { N40 } from '@atlaskit/theme/colors';
|
|
23
24
|
import { fontFallback } from '@atlaskit/theme/typography';
|
|
24
25
|
import Tooltip from '@atlaskit/tooltip';
|
|
@@ -365,7 +366,14 @@ export const IssueLikeDataTableView = ({
|
|
|
365
366
|
const loadingRow = useMemo(() => ({
|
|
366
367
|
key: 'loading',
|
|
367
368
|
cells: headerColumns.map(column => ({
|
|
368
|
-
content: jsx(
|
|
369
|
+
content: fg('platform-datasources-enable-two-way-sync') ? jsx(Box, {
|
|
370
|
+
paddingInline: "space.100"
|
|
371
|
+
}, jsx(Skeleton, {
|
|
372
|
+
borderRadius: 8,
|
|
373
|
+
width: "100%",
|
|
374
|
+
height: 14,
|
|
375
|
+
testId: "issues-table-row-loading"
|
|
376
|
+
})) : jsx(Skeleton, {
|
|
369
377
|
borderRadius: 8,
|
|
370
378
|
width: "100%",
|
|
371
379
|
height: 14,
|
|
@@ -681,13 +689,6 @@ export const IssueLikeDataTableView = ({
|
|
|
681
689
|
shouldUseWidth,
|
|
682
690
|
width
|
|
683
691
|
});
|
|
684
|
-
// extra padding is required around skeleton loader to avoid vertical jumps when data loads
|
|
685
|
-
if (key !== null && key !== void 0 && key.includes('loading')) {
|
|
686
|
-
loadingRowStyle = {
|
|
687
|
-
...loadingRowStyle,
|
|
688
|
-
paddingBlock: "var(--ds-space-100, 8px)"
|
|
689
|
-
};
|
|
690
|
-
}
|
|
691
692
|
|
|
692
693
|
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
693
694
|
if (fg('platform-datasources-enable-two-way-sync')) {
|
|
@@ -701,6 +702,13 @@ export const IssueLikeDataTableView = ({
|
|
|
701
702
|
css: [wrappedColumnKeys !== null && wrappedColumnKeys !== void 0 && wrappedColumnKeys.includes(cellKey) ? null : truncateStyles]
|
|
702
703
|
}, content);
|
|
703
704
|
} else {
|
|
705
|
+
// extra padding is required around skeleton loader to avoid vertical jumps when data loads
|
|
706
|
+
if (key !== null && key !== void 0 && key.includes('loading')) {
|
|
707
|
+
loadingRowStyle = {
|
|
708
|
+
...loadingRowStyle,
|
|
709
|
+
paddingBlock: "var(--ds-space-100, 8px)"
|
|
710
|
+
};
|
|
711
|
+
}
|
|
704
712
|
return jsx(TableCell, {
|
|
705
713
|
key: cellKey,
|
|
706
714
|
"data-testid": testId && `${testId}--cell-${cellIndex}`,
|
|
@@ -26,6 +26,7 @@ import { reorderWithEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/util/r
|
|
|
26
26
|
import { autoScroller } from '@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-autoscroll';
|
|
27
27
|
import { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';
|
|
28
28
|
import { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
|
|
29
|
+
import { Box } from '@atlaskit/primitives';
|
|
29
30
|
import { N40 } from '@atlaskit/theme/colors';
|
|
30
31
|
import { fontFallback } from '@atlaskit/theme/typography';
|
|
31
32
|
import Tooltip from '@atlaskit/tooltip';
|
|
@@ -364,7 +365,14 @@ export var IssueLikeDataTableView = function IssueLikeDataTableView(_ref5) {
|
|
|
364
365
|
key: 'loading',
|
|
365
366
|
cells: headerColumns.map(function (column) {
|
|
366
367
|
return {
|
|
367
|
-
content: jsx(
|
|
368
|
+
content: fg('platform-datasources-enable-two-way-sync') ? jsx(Box, {
|
|
369
|
+
paddingInline: "space.100"
|
|
370
|
+
}, jsx(Skeleton, {
|
|
371
|
+
borderRadius: 8,
|
|
372
|
+
width: "100%",
|
|
373
|
+
height: 14,
|
|
374
|
+
testId: "issues-table-row-loading"
|
|
375
|
+
})) : jsx(Skeleton, {
|
|
368
376
|
borderRadius: 8,
|
|
369
377
|
width: "100%",
|
|
370
378
|
height: 14,
|
|
@@ -704,12 +712,6 @@ export var IssueLikeDataTableView = function IssueLikeDataTableView(_ref5) {
|
|
|
704
712
|
shouldUseWidth: shouldUseWidth,
|
|
705
713
|
width: width
|
|
706
714
|
});
|
|
707
|
-
// extra padding is required around skeleton loader to avoid vertical jumps when data loads
|
|
708
|
-
if (key !== null && key !== void 0 && key.includes('loading')) {
|
|
709
|
-
loadingRowStyle = _objectSpread(_objectSpread({}, loadingRowStyle), {}, {
|
|
710
|
-
paddingBlock: "var(--ds-space-100, 8px)"
|
|
711
|
-
});
|
|
712
|
-
}
|
|
713
715
|
|
|
714
716
|
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
715
717
|
if (fg('platform-datasources-enable-two-way-sync')) {
|
|
@@ -723,6 +725,12 @@ export var IssueLikeDataTableView = function IssueLikeDataTableView(_ref5) {
|
|
|
723
725
|
css: [wrappedColumnKeys !== null && wrappedColumnKeys !== void 0 && wrappedColumnKeys.includes(cellKey) ? null : truncateStyles]
|
|
724
726
|
}, content);
|
|
725
727
|
} else {
|
|
728
|
+
// extra padding is required around skeleton loader to avoid vertical jumps when data loads
|
|
729
|
+
if (key !== null && key !== void 0 && key.includes('loading')) {
|
|
730
|
+
loadingRowStyle = _objectSpread(_objectSpread({}, loadingRowStyle), {}, {
|
|
731
|
+
paddingBlock: "var(--ds-space-100, 8px)"
|
|
732
|
+
});
|
|
733
|
+
}
|
|
726
734
|
return jsx(TableCell, {
|
|
727
735
|
key: cellKey,
|
|
728
736
|
"data-testid": testId && "".concat(testId, "--cell-").concat(cellIndex),
|
|
@@ -29,6 +29,7 @@ interface Props {
|
|
|
29
29
|
canResizeColumns?: boolean;
|
|
30
30
|
canControlWrapping?: boolean;
|
|
31
31
|
skipIntl?: boolean;
|
|
32
|
+
forceLoading?: boolean;
|
|
32
33
|
}
|
|
33
34
|
|
|
34
35
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
@@ -40,7 +41,12 @@ const TableViewWrapper = styled.div({
|
|
|
40
41
|
height: '100%',
|
|
41
42
|
});
|
|
42
43
|
|
|
43
|
-
const ExampleBody = ({
|
|
44
|
+
const ExampleBody = ({
|
|
45
|
+
isReadonly,
|
|
46
|
+
canResizeColumns = true,
|
|
47
|
+
canControlWrapping = true,
|
|
48
|
+
forceLoading = false,
|
|
49
|
+
}: Props) => {
|
|
44
50
|
const parameters = useMemo<JiraIssueDatasourceParameters>(
|
|
45
51
|
() => ({
|
|
46
52
|
cloudId: 'some-cloud-id',
|
|
@@ -89,12 +95,12 @@ const ExampleBody = ({ isReadonly, canResizeColumns = true, canControlWrapping =
|
|
|
89
95
|
{visibleColumnKeys.length > 0 && columns.length > 0 ? (
|
|
90
96
|
<IssueLikeDataTableView
|
|
91
97
|
testId="link-datasource"
|
|
92
|
-
items={responseItems}
|
|
93
|
-
itemIds={responseItemIds}
|
|
98
|
+
items={forceLoading ? [] : responseItems}
|
|
99
|
+
itemIds={forceLoading ? [] : responseItemIds}
|
|
94
100
|
onNextPage={onNextPage}
|
|
95
101
|
onLoadDatasourceDetails={loadDatasourceDetails}
|
|
96
102
|
hasNextPage={hasNextPage}
|
|
97
|
-
status={status}
|
|
103
|
+
status={forceLoading ? 'loading' : status}
|
|
98
104
|
columns={columns}
|
|
99
105
|
visibleColumnKeys={visibleColumnKeys}
|
|
100
106
|
onVisibleColumnKeysChange={isReadonly ? undefined : onVisibleColumnKeysChange}
|
|
@@ -114,6 +120,7 @@ export const ExampleIssueLikeTable = ({
|
|
|
114
120
|
isReadonly,
|
|
115
121
|
canResizeColumns,
|
|
116
122
|
canControlWrapping,
|
|
123
|
+
forceLoading,
|
|
117
124
|
}: Props) => {
|
|
118
125
|
return (
|
|
119
126
|
<DatasourceExperienceIdProvider>
|
|
@@ -123,6 +130,7 @@ export const ExampleIssueLikeTable = ({
|
|
|
123
130
|
isReadonly={isReadonly}
|
|
124
131
|
canResizeColumns={canResizeColumns}
|
|
125
132
|
canControlWrapping={canControlWrapping}
|
|
133
|
+
forceLoading={forceLoading}
|
|
126
134
|
/>
|
|
127
135
|
</SmartCardProvider>
|
|
128
136
|
</IntlMessagesProvider>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/link-datasource",
|
|
3
|
-
"version": "2.12.
|
|
3
|
+
"version": "2.12.5",
|
|
4
4
|
"description": "UI Components to support linking platform dataset feature",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"@atlaskit/modal-dialog": "^12.15.0",
|
|
66
66
|
"@atlaskit/outbound-auth-flow-client": "^3.4.5",
|
|
67
67
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
68
|
-
"@atlaskit/popup": "^1.
|
|
68
|
+
"@atlaskit/popup": "^1.25.0",
|
|
69
69
|
"@atlaskit/pragmatic-drag-and-drop": "^1.3.0",
|
|
70
70
|
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.0.0",
|
|
71
71
|
"@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-autoscroll": "^1.2.0",
|