@atlaskit/editor-common 110.41.7 → 110.41.8
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 +10 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/HoverLinkOverlay/index.js +21 -0
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/HoverLinkOverlay/index.js +22 -1
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/HoverLinkOverlay/index.js +21 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 110.41.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`cb319ae5e7782`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/cb319ae5e7782) -
|
|
8
|
+
EDITOR-2864 - Address HoverLinkOverlay label spilling out beyond the margins of its container on
|
|
9
|
+
hover. For example, when a smart link is inside a table, and it is broken into 1+ line, the label
|
|
10
|
+
on hover will not break and will therefore appear hovering out of the table.
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
3
13
|
## 110.41.7
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
|
@@ -19,7 +19,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
19
19
|
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); }
|
|
20
20
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
21
21
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
22
|
-
var packageVersion = "
|
|
22
|
+
var packageVersion = "110.41.7";
|
|
23
23
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
24
24
|
// Remove URL as it has UGC
|
|
25
25
|
// Ignored via go/ees007
|
|
@@ -24,7 +24,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
24
24
|
* @jsx jsx
|
|
25
25
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
26
26
|
var packageName = "@atlaskit/editor-common";
|
|
27
|
-
var packageVersion = "
|
|
27
|
+
var packageVersion = "110.41.7";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var fadeIn = (0, _react2.keyframes)({
|
|
@@ -184,10 +184,31 @@ var HoverLinkOverlayOriginal = function HoverLinkOverlayOriginal(_ref) {
|
|
|
184
184
|
}
|
|
185
185
|
var openTextWidth = openTextWidthRef.current || DEFAULT_OPEN_TEXT_WIDTH;
|
|
186
186
|
var canShowLabel = cardWidth - openTextWidth > MIN_AVAILABLE_SPACE_WITH_LABEL_OVERLAY + ICON_WIDTH;
|
|
187
|
+
|
|
188
|
+
// When a smart link wraps to multiple lines in a constrained container (e.g. table cell),
|
|
189
|
+
// the hover button can overflow beyond the container bounds. We detect this by comparing
|
|
190
|
+
// the button's right edge to the container's right edge, and hide the label if it overflows.
|
|
191
|
+
if ((0, _experiments.editorExperiment)('cc_editor_hover_link_overlay_css_fix', true)) {
|
|
192
|
+
if (containerRef.current && hoverLinkButtonRef.current) {
|
|
193
|
+
var containerRight = containerRef.current.getBoundingClientRect().right;
|
|
194
|
+
var buttonRight = hoverLinkButtonRef.current.getBoundingClientRect().right;
|
|
195
|
+
if (buttonRight > containerRight) {
|
|
196
|
+
canShowLabel = false;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
187
200
|
setShowLabel(canShowLabel);
|
|
188
201
|
}, [isVisible, isHovered]);
|
|
189
202
|
var handleOverlayChange = function handleOverlayChange(isHovered) {
|
|
190
203
|
setHovered(isHovered);
|
|
204
|
+
|
|
205
|
+
// Reset label visibility on hover start so we can measure if it overflows.
|
|
206
|
+
// Without this, the label stays hidden from a previous hover and won't be re-measured.
|
|
207
|
+
if ((0, _experiments.editorExperiment)('cc_editor_hover_link_overlay_css_fix', true)) {
|
|
208
|
+
if (isHovered) {
|
|
209
|
+
setShowLabel(true);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
191
212
|
};
|
|
192
213
|
var sendVisitLinkAnalytics = function sendVisitLinkAnalytics(inputMethod) {
|
|
193
214
|
if (editorAnalyticsApi && view) {
|
|
@@ -4,7 +4,7 @@ import { isFedRamp } from './environment';
|
|
|
4
4
|
import { normaliseSentryBreadcrumbs, SERIALIZABLE_ATTRIBUTES } from './normalise-sentry-breadcrumbs';
|
|
5
5
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
6
6
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
7
|
-
const packageVersion = "
|
|
7
|
+
const packageVersion = "110.41.7";
|
|
8
8
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
9
9
|
// Remove URL as it has UGC
|
|
10
10
|
// Ignored via go/ees007
|
|
@@ -14,7 +14,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
|
14
14
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
15
|
import Layer from '../Layer';
|
|
16
16
|
const packageName = "@atlaskit/editor-common";
|
|
17
|
-
const packageVersion = "
|
|
17
|
+
const packageVersion = "110.41.7";
|
|
18
18
|
const halfFocusRing = 1;
|
|
19
19
|
const dropOffset = '0, 8';
|
|
20
20
|
const fadeIn = keyframes({
|
|
@@ -163,11 +163,32 @@ const HoverLinkOverlayOriginal = ({
|
|
|
163
163
|
return;
|
|
164
164
|
}
|
|
165
165
|
const openTextWidth = openTextWidthRef.current || DEFAULT_OPEN_TEXT_WIDTH;
|
|
166
|
-
|
|
166
|
+
let canShowLabel = cardWidth - openTextWidth > MIN_AVAILABLE_SPACE_WITH_LABEL_OVERLAY + ICON_WIDTH;
|
|
167
|
+
|
|
168
|
+
// When a smart link wraps to multiple lines in a constrained container (e.g. table cell),
|
|
169
|
+
// the hover button can overflow beyond the container bounds. We detect this by comparing
|
|
170
|
+
// the button's right edge to the container's right edge, and hide the label if it overflows.
|
|
171
|
+
if (editorExperiment('cc_editor_hover_link_overlay_css_fix', true)) {
|
|
172
|
+
if (containerRef.current && hoverLinkButtonRef.current) {
|
|
173
|
+
const containerRight = containerRef.current.getBoundingClientRect().right;
|
|
174
|
+
const buttonRight = hoverLinkButtonRef.current.getBoundingClientRect().right;
|
|
175
|
+
if (buttonRight > containerRight) {
|
|
176
|
+
canShowLabel = false;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
167
180
|
setShowLabel(canShowLabel);
|
|
168
181
|
}, [isVisible, isHovered]);
|
|
169
182
|
const handleOverlayChange = isHovered => {
|
|
170
183
|
setHovered(isHovered);
|
|
184
|
+
|
|
185
|
+
// Reset label visibility on hover start so we can measure if it overflows.
|
|
186
|
+
// Without this, the label stays hidden from a previous hover and won't be re-measured.
|
|
187
|
+
if (editorExperiment('cc_editor_hover_link_overlay_css_fix', true)) {
|
|
188
|
+
if (isHovered) {
|
|
189
|
+
setShowLabel(true);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
171
192
|
};
|
|
172
193
|
const sendVisitLinkAnalytics = inputMethod => {
|
|
173
194
|
if (editorAnalyticsApi && view) {
|
|
@@ -10,7 +10,7 @@ import { isFedRamp } from './environment';
|
|
|
10
10
|
import { normaliseSentryBreadcrumbs, SERIALIZABLE_ATTRIBUTES } from './normalise-sentry-breadcrumbs';
|
|
11
11
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
12
12
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
13
|
-
var packageVersion = "
|
|
13
|
+
var packageVersion = "110.41.7";
|
|
14
14
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
15
15
|
// Remove URL as it has UGC
|
|
16
16
|
// Ignored via go/ees007
|
|
@@ -21,7 +21,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
|
21
21
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
22
22
|
import Layer from '../Layer';
|
|
23
23
|
var packageName = "@atlaskit/editor-common";
|
|
24
|
-
var packageVersion = "
|
|
24
|
+
var packageVersion = "110.41.7";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var fadeIn = keyframes({
|
|
@@ -170,10 +170,31 @@ var HoverLinkOverlayOriginal = function HoverLinkOverlayOriginal(_ref) {
|
|
|
170
170
|
}
|
|
171
171
|
var openTextWidth = openTextWidthRef.current || DEFAULT_OPEN_TEXT_WIDTH;
|
|
172
172
|
var canShowLabel = cardWidth - openTextWidth > MIN_AVAILABLE_SPACE_WITH_LABEL_OVERLAY + ICON_WIDTH;
|
|
173
|
+
|
|
174
|
+
// When a smart link wraps to multiple lines in a constrained container (e.g. table cell),
|
|
175
|
+
// the hover button can overflow beyond the container bounds. We detect this by comparing
|
|
176
|
+
// the button's right edge to the container's right edge, and hide the label if it overflows.
|
|
177
|
+
if (editorExperiment('cc_editor_hover_link_overlay_css_fix', true)) {
|
|
178
|
+
if (containerRef.current && hoverLinkButtonRef.current) {
|
|
179
|
+
var containerRight = containerRef.current.getBoundingClientRect().right;
|
|
180
|
+
var buttonRight = hoverLinkButtonRef.current.getBoundingClientRect().right;
|
|
181
|
+
if (buttonRight > containerRight) {
|
|
182
|
+
canShowLabel = false;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
173
186
|
setShowLabel(canShowLabel);
|
|
174
187
|
}, [isVisible, isHovered]);
|
|
175
188
|
var handleOverlayChange = function handleOverlayChange(isHovered) {
|
|
176
189
|
setHovered(isHovered);
|
|
190
|
+
|
|
191
|
+
// Reset label visibility on hover start so we can measure if it overflows.
|
|
192
|
+
// Without this, the label stays hidden from a previous hover and won't be re-measured.
|
|
193
|
+
if (editorExperiment('cc_editor_hover_link_overlay_css_fix', true)) {
|
|
194
|
+
if (isHovered) {
|
|
195
|
+
setShowLabel(true);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
177
198
|
};
|
|
178
199
|
var sendVisitLinkAnalytics = function sendVisitLinkAnalytics(inputMethod) {
|
|
179
200
|
if (editorAnalyticsApi && view) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "110.41.
|
|
3
|
+
"version": "110.41.8",
|
|
4
4
|
"description": "A package that contains common classes and components for editor and renderer",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"@atlaskit/task-decision": "^19.2.0",
|
|
82
82
|
"@atlaskit/textfield": "^8.2.0",
|
|
83
83
|
"@atlaskit/theme": "^21.0.0",
|
|
84
|
-
"@atlaskit/tmp-editor-statsig": "^15.
|
|
84
|
+
"@atlaskit/tmp-editor-statsig": "^15.9.0",
|
|
85
85
|
"@atlaskit/tokens": "^8.4.0",
|
|
86
86
|
"@atlaskit/tooltip": "^20.11.0",
|
|
87
87
|
"@atlaskit/width-detector": "^5.0.0",
|