@atlaskit/editor-plugin-table 2.6.10 → 2.6.12

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,27 @@
1
1
  # @atlaskit/editor-plugin-table
2
2
 
3
+ ## 2.6.12
4
+
5
+ ### Patch Changes
6
+
7
+ - [`08bae0f0926`](https://bitbucket.org/atlassian/atlassian-frontend/commits/08bae0f0926) - [ux] When there's only one row in a table the top & bottom sentinels become inverted. This creates some nasty visiblity
8
+ toggling side-effects because the intersection observers gets confused and ends up toggling the sticky header on when it should
9
+ be off and vice-versa.
10
+
11
+ This is due to their positioning using css relative top & bottom respectively. A row is only ~44px height and the bottom sentinel is
12
+ positioned ~67px off the bottom, and the top sentinel is ~25px off the top (which aligns to the top of the row).
13
+ So when only 1 row exist the bottom sentinel ends up being ~23px above the top sentinel. Which means the logic for
14
+ toggling becomes inverted and when the sentinels are scrolled off the screen the top on is now last and ends up displaying the
15
+ sticky header, where previously the bottom sentinel would hide it.
16
+
17
+ - Updated dependencies
18
+
19
+ ## 2.6.11
20
+
21
+ ### Patch Changes
22
+
23
+ - Updated dependencies
24
+
3
25
  ## 2.6.10
4
26
 
5
27
  ### Patch Changes
@@ -445,6 +445,11 @@ var TableRowNodeView = /*#__PURE__*/function () {
445
445
  return;
446
446
  }
447
447
  var table = _this4.tree.table;
448
+ if (table.rows.length < 2) {
449
+ // ED-19307 - When there's only one row in a table the top & bottom sentinels become inverted. This creates some nasty visiblity
450
+ // toggling side-effects because the intersection observers gets confused.
451
+ return;
452
+ }
448
453
  entries.forEach(function (entry) {
449
454
  var _entry$rootBounds;
450
455
  var target = entry.target;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-table",
3
- "version": "2.6.10",
3
+ "version": "2.6.12",
4
4
  "sideEffects": false
5
5
  }
@@ -417,6 +417,11 @@ export class TableRowNodeView {
417
417
  const {
418
418
  table
419
419
  } = this.tree;
420
+ if (table.rows.length < 2) {
421
+ // ED-19307 - When there's only one row in a table the top & bottom sentinels become inverted. This creates some nasty visiblity
422
+ // toggling side-effects because the intersection observers gets confused.
423
+ return;
424
+ }
420
425
  entries.forEach(entry => {
421
426
  var _entry$rootBounds;
422
427
  const target = entry.target;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-table",
3
- "version": "2.6.10",
3
+ "version": "2.6.12",
4
4
  "sideEffects": false
5
5
  }
@@ -438,6 +438,11 @@ export var TableRowNodeView = /*#__PURE__*/function () {
438
438
  return;
439
439
  }
440
440
  var table = _this4.tree.table;
441
+ if (table.rows.length < 2) {
442
+ // ED-19307 - When there's only one row in a table the top & bottom sentinels become inverted. This creates some nasty visiblity
443
+ // toggling side-effects because the intersection observers gets confused.
444
+ return;
445
+ }
441
446
  entries.forEach(function (entry) {
442
447
  var _entry$rootBounds;
443
448
  var target = entry.target;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-table",
3
- "version": "2.6.10",
3
+ "version": "2.6.12",
4
4
  "sideEffects": false
5
5
  }
@@ -3,6 +3,7 @@ import React from 'react';
3
3
  import { IntlProvider } from 'react-intl-next';
4
4
 
5
5
  import Button from '@atlaskit/button/standard-button';
6
+ import type { CollabEditOptions } from '@atlaskit/editor-common/collab';
6
7
  import {
7
8
  createEditorExampleForTests,
8
9
  mapProvidersToProps,
@@ -11,7 +12,6 @@ import { getDefaultLinkPickerOptions } from '@atlaskit/editor-core/example-helpe
11
12
  import { TitleInput } from '@atlaskit/editor-core/example-helpers/PageElements';
12
13
  import { SaveAndCancelButtons } from '@atlaskit/editor-core/examples/5-full-page';
13
14
  import { ContextPanel, Editor } from '@atlaskit/editor-core/src';
14
- import { CollabEditOptions } from '@atlaskit/editor-core/src/plugins/collab-edit';
15
15
  import { customInsertMenuItems } from '@atlaskit/editor-test-helpers/mock-insert-menu';
16
16
  import { SmartCardProvider } from '@atlaskit/link-provider';
17
17
  import { AtlassianIcon } from '@atlaskit/logo/atlassian-icon';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-table",
3
- "version": "2.6.10",
3
+ "version": "2.6.12",
4
4
  "description": "Table plugin for the @atlaskit/editor",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -27,8 +27,8 @@
27
27
  "releaseModel": "continuous"
28
28
  },
29
29
  "dependencies": {
30
- "@atlaskit/adf-schema": "^27.0.0",
31
- "@atlaskit/editor-common": "^74.36.0",
30
+ "@atlaskit/adf-schema": "^28.0.0",
31
+ "@atlaskit/editor-common": "^74.38.0",
32
32
  "@atlaskit/editor-palette": "1.5.1",
33
33
  "@atlaskit/editor-plugin-analytics": "^0.1.0",
34
34
  "@atlaskit/editor-plugin-content-insertion": "^0.0.7",
@@ -59,7 +59,7 @@
59
59
  "@atlaskit/editor-plugin-feature-flags": "^0.1.3",
60
60
  "@atlaskit/editor-plugin-grid": "^0.1.0",
61
61
  "@atlaskit/editor-plugin-guideline": "^0.3.4",
62
- "@atlaskit/editor-plugin-hyperlink": "^0.2.0",
62
+ "@atlaskit/editor-plugin-hyperlink": "^0.3.0",
63
63
  "@atlaskit/editor-plugin-width": "^0.1.0",
64
64
  "@atlaskit/editor-test-helpers": "^18.10.0",
65
65
  "@atlaskit/visual-regression": "*",
@@ -285,6 +285,13 @@ export class TableRowNodeView implements NodeView {
285
285
  return;
286
286
  }
287
287
  const { table } = this.tree;
288
+
289
+ if (table.rows.length < 2) {
290
+ // ED-19307 - When there's only one row in a table the top & bottom sentinels become inverted. This creates some nasty visiblity
291
+ // toggling side-effects because the intersection observers gets confused.
292
+ return;
293
+ }
294
+
288
295
  entries.forEach((entry) => {
289
296
  const target = entry.target as HTMLElement;
290
297