@atlaskit/link-datasource 6.9.0 → 6.10.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.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/link-datasource
|
|
2
2
|
|
|
3
|
+
## 6.10.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`63d9eb9c7a7bd`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/63d9eb9c7a7bd) -
|
|
8
|
+
[ux] Behind `platform-dst-top-layer-tooltip`, merge the ref from `@atlaskit/tooltip`'s render prop
|
|
9
|
+
with the trigger's own ref instead of letting the later spread replace it, so the tooltip resolves
|
|
10
|
+
an anchor element. With the gate off the trigger keeps the ref it had before. Adds
|
|
11
|
+
`use-callback-ref` as a runtime dependency.
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 6.9.0
|
|
4
18
|
|
|
5
19
|
### Minor Changes
|
|
@@ -15,6 +15,7 @@ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers
|
|
|
15
15
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
16
16
|
var _react = _interopRequireWildcard(require("react"));
|
|
17
17
|
var _reactIntl = require("react-intl");
|
|
18
|
+
var _useCallbackRef = require("use-callback-ref");
|
|
18
19
|
var _button = _interopRequireDefault(require("@atlaskit/button/default/button"));
|
|
19
20
|
var _button2 = _interopRequireDefault(require("@atlaskit/button/icon/button"));
|
|
20
21
|
var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/core/chevron-down"));
|
|
@@ -169,6 +170,11 @@ var ColumnPicker = exports.ColumnPicker = function ColumnPicker(_ref) {
|
|
|
169
170
|
content: intl.formatMessage(_messages.columnPickerMessages.tooltip)
|
|
170
171
|
}, function (tooltipProps) {
|
|
171
172
|
return /*#__PURE__*/_react.default.createElement(_button.default, (0, _extends2.default)({}, tooltipProps, triggerProps, {
|
|
173
|
+
// `tooltipProps.ref` must be included: spreading `triggerProps` after
|
|
174
|
+
// `tooltipProps` drops the tooltip's ref, leaving Tooltip without an
|
|
175
|
+
// anchor element. Gate off leaves `triggerProps.ref` winning, exactly as
|
|
176
|
+
// master does.
|
|
177
|
+
ref: (0, _fg.fg)('platform-dst-top-layer-tooltip') ? (0, _useCallbackRef.mergeRefs)([triggerProps.ref, tooltipProps.ref]) : triggerProps.ref,
|
|
172
178
|
isSelected: isOpen,
|
|
173
179
|
spacing: "compact",
|
|
174
180
|
appearance: 'default',
|
|
@@ -4,6 +4,7 @@ import "./index.compiled.css";
|
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
6
6
|
import { useIntl } from 'react-intl';
|
|
7
|
+
import { mergeRefs } from 'use-callback-ref';
|
|
7
8
|
import Button from '@atlaskit/button/default/button';
|
|
8
9
|
import IconButton from '@atlaskit/button/icon/button';
|
|
9
10
|
import ChevronDownIcon from '@atlaskit/icon/core/chevron-down';
|
|
@@ -142,6 +143,11 @@ export const ColumnPicker = ({
|
|
|
142
143
|
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
143
144
|
content: intl.formatMessage(columnPickerMessages.tooltip)
|
|
144
145
|
}, tooltipProps => /*#__PURE__*/React.createElement(Button, _extends({}, tooltipProps, triggerProps, {
|
|
146
|
+
// `tooltipProps.ref` must be included: spreading `triggerProps` after
|
|
147
|
+
// `tooltipProps` drops the tooltip's ref, leaving Tooltip without an
|
|
148
|
+
// anchor element. Gate off leaves `triggerProps.ref` winning, exactly as
|
|
149
|
+
// master does.
|
|
150
|
+
ref: fg('platform-dst-top-layer-tooltip') ? mergeRefs([triggerProps.ref, tooltipProps.ref]) : triggerProps.ref,
|
|
145
151
|
isSelected: isOpen,
|
|
146
152
|
spacing: "compact",
|
|
147
153
|
appearance: 'default',
|
|
@@ -8,6 +8,7 @@ import "./index.compiled.css";
|
|
|
8
8
|
import { ax, ix } from "@compiled/react/runtime";
|
|
9
9
|
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
10
10
|
import { useIntl } from 'react-intl';
|
|
11
|
+
import { mergeRefs } from 'use-callback-ref';
|
|
11
12
|
import Button from '@atlaskit/button/default/button';
|
|
12
13
|
import IconButton from '@atlaskit/button/icon/button';
|
|
13
14
|
import ChevronDownIcon from '@atlaskit/icon/core/chevron-down';
|
|
@@ -160,6 +161,11 @@ export var ColumnPicker = function ColumnPicker(_ref) {
|
|
|
160
161
|
content: intl.formatMessage(columnPickerMessages.tooltip)
|
|
161
162
|
}, function (tooltipProps) {
|
|
162
163
|
return /*#__PURE__*/React.createElement(Button, _extends({}, tooltipProps, triggerProps, {
|
|
164
|
+
// `tooltipProps.ref` must be included: spreading `triggerProps` after
|
|
165
|
+
// `tooltipProps` drops the tooltip's ref, leaving Tooltip without an
|
|
166
|
+
// anchor element. Gate off leaves `triggerProps.ref` winning, exactly as
|
|
167
|
+
// master does.
|
|
168
|
+
ref: fg('platform-dst-top-layer-tooltip') ? mergeRefs([triggerProps.ref, tooltipProps.ref]) : triggerProps.ref,
|
|
163
169
|
isSelected: isOpen,
|
|
164
170
|
spacing: "compact",
|
|
165
171
|
appearance: 'default',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/link-datasource",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.10.0",
|
|
4
4
|
"description": "UI Components to support linking platform dataset feature",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -103,6 +103,7 @@
|
|
|
103
103
|
"lodash": "^4.17.21",
|
|
104
104
|
"react-sweet-state": "^2.6.5",
|
|
105
105
|
"tiny-invariant": "^1.2.0",
|
|
106
|
+
"use-callback-ref": "^1.2.3",
|
|
106
107
|
"use-debounce": "^3.4.0",
|
|
107
108
|
"uuid": "^3.1.0"
|
|
108
109
|
},
|
|
@@ -172,6 +173,10 @@
|
|
|
172
173
|
},
|
|
173
174
|
"electric_issue_like_table_xpc_url_wrapping": {
|
|
174
175
|
"type": "boolean"
|
|
176
|
+
},
|
|
177
|
+
"platform-dst-top-layer-tooltip": {
|
|
178
|
+
"type": "boolean",
|
|
179
|
+
"referenceOnly": true
|
|
175
180
|
}
|
|
176
181
|
},
|
|
177
182
|
"compassUnitTestMetricSourceId": "ari:cloud:compass:a436116f-02ce-4520-8fbb-7301462a1674:metric-source/c5751cc6-3513-4070-9deb-af31e86aed34/9c893299-a527-4457-9b46-f3bc4c828766"
|