@atlaskit/editor-core 216.7.10 → 216.7.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 216.7.11
4
+
5
+ ### Patch Changes
6
+
7
+ - [`cb86382757a72`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/cb86382757a72) -
8
+ Cleanup stale flag confluence_floating_toolbar_animation
9
+ - [`4641b85ef8eab`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4641b85ef8eab) -
10
+ Update the default aria-lable for page appearance editors
11
+ - [`5c3f8d87c2290`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5c3f8d87c2290) -
12
+ Cleanup general AIFC bug fix feature gate
13
+ - Updated dependencies
14
+
3
15
  ## 216.7.10
4
16
 
5
17
  ### Patch Changes
@@ -681,6 +681,7 @@ function ReactEditorView(props) {
681
681
  viewRef.current = undefined;
682
682
  }
683
683
  }, [createEditorView, onEditorCreated, eventDispatcher, onEditorDestroyed, handleAnalyticsEvent, mitigateScrollJump]);
684
+ var isPageAppearance = (0, _isFullPage.isFullPage)(nextAppearance) || nextAppearance === 'max';
684
685
  var createEditor = (0, _react.useCallback)(function (assistiveLabel, assistiveDescribedBy) {
685
686
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (0, _platformFeatureFlags.fg)('cc_editor_focus_before_editor_on_load') && /*#__PURE__*/_react.default.createElement("div", {
686
687
  tabIndex: -1,
@@ -691,7 +692,7 @@ function ReactEditorView(props) {
691
692
  className: "ProseMirror ".concat((0, _getUAPrefix.getUAPrefix)()),
692
693
  key: "ProseMirror",
693
694
  ref: handleEditorViewRef,
694
- "aria-label": assistiveLabel || props.intl.formatMessage(_messages.editorMessages.editorAssistiveLabel)
695
+ "aria-label": assistiveLabel || (isPageAppearance && (0, _platformFeatureFlags.fg)('platform_editor_a11y_9262') ? props.intl.formatMessage(_messages.editorMessages.fullPageEditorAssistiveLabel) : props.intl.formatMessage(_messages.editorMessages.editorAssistiveLabel))
695
696
  // setting aria-multiline to true when not mobile appearance.
696
697
  // because somehow mobile tests are failing when it set.
697
698
  // don't know why that is happening.
@@ -710,7 +711,7 @@ function ReactEditorView(props) {
710
711
  __html: ''
711
712
  } : undefined
712
713
  }));
713
- }, [handleEditorViewRef, props.intl]);
714
+ }, [handleEditorViewRef, isPageAppearance, props.intl]);
714
715
  var previousPreset = (0, _hooks.usePreviousState)(preset);
715
716
  (0, _react.useLayoutEffect)(function () {
716
717
  if ((0, _coreUtils.isSSR)() && (0, _expValEquals.expValEquals)('platform_editor_ssr_renderer', 'isEnabled', true)) {
@@ -807,7 +808,7 @@ function ReactEditorView(props) {
807
808
  ,
808
809
  className: "ProseMirror ".concat((0, _getUAPrefix.getUAPrefix)()),
809
810
  key: "ProseMirror",
810
- "aria-label": assistiveLabel || props.intl.formatMessage(_messages.editorMessages.editorAssistiveLabel),
811
+ "aria-label": assistiveLabel || (isPageAppearance && (0, _platformFeatureFlags.fg)('platform_editor_a11y_9262') ? props.intl.formatMessage(_messages.editorMessages.fullPageEditorAssistiveLabel) : props.intl.formatMessage(_messages.editorMessages.editorAssistiveLabel)),
811
812
  id: EDIT_AREA_ID,
812
813
  "aria-describedby": assistiveDescribedBy,
813
814
  "data-editor-id": editorId.current,
@@ -820,7 +821,7 @@ function ReactEditorView(props) {
820
821
  });
821
822
  }
822
823
  });
823
- }, [ssrDeps, props.intl, props.portalProviderAPI, assistiveLabel, assistiveDescribedBy]);
824
+ }, [ssrDeps, props.intl, props.portalProviderAPI, assistiveLabel, assistiveDescribedBy, isPageAppearance]);
824
825
  var editor = (0, _react.useMemo)(function () {
825
826
  // SSR editor will be available only in SSR environment,
826
827
  // in a browser `ssrEditor` will be `null`, and we will render a normal one ProseMirror.
@@ -10,5 +10,10 @@ var editorMessages = exports.editorMessages = (0, _reactIntlNext.defineMessages)
10
10
  id: 'fabric.editor.editorAssistiveLabel',
11
11
  defaultMessage: 'Main content area, start typing to enter text.',
12
12
  description: 'Text that is read out by screen reader when the main editor is in focus'
13
+ },
14
+ fullPageEditorAssistiveLabel: {
15
+ id: 'fabric.editor.fullPageEditorAssistiveLabel',
16
+ defaultMessage: 'Page editing area, start typing to enter text.',
17
+ description: 'The aria-label for the full page editor'
13
18
  }
14
19
  });
@@ -237,11 +237,11 @@ var EditorContentContainer = /*#__PURE__*/_react.default.forwardRef(function (pr
237
237
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
238
238
  _rule.ruleStyles,
239
239
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
240
- _smartCardStyles.smartCardDiffStyles, (0, _platformFeatureFlags.fg)('platform_editor_ai_generic_prep_for_aifc_2') && ((0, _platformFeatureFlags.fg)('platform_editor_jan_a11y_fixes')
240
+ _smartCardStyles.smartCardDiffStyles, (0, _platformFeatureFlags.fg)('platform_editor_jan_a11y_fixes') ?
241
241
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
242
- ? _smartCardStyles.showDiffDeletedNodeStylesNew
242
+ _smartCardStyles.showDiffDeletedNodeStylesNew :
243
243
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
244
- : _smartCardStyles.showDiffDeletedNodeStyles),
244
+ _smartCardStyles.showDiffDeletedNodeStyles,
245
245
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
246
246
  _mediaStyles.mediaStyles, contentMode === 'compact' && ((0, _expValEquals.expValEquals)('confluence_compact_text_format', 'isEnabled', true) ||
247
247
  // eslint-disable-next-line @atlaskit/platform/no-preconditioning
@@ -493,7 +493,7 @@ var EditorContentContainer = /*#__PURE__*/_react.default.forwardRef(function (pr
493
493
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
494
494
  _link.hyperLinkFloatingToolbarStyles,
495
495
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
496
- (0, _platformFeatureFlags.fg)('confluence_floating_toolbar_animation') && _selectionToolbarStyles.selectionToolbarAnimationStyles,
496
+ _selectionToolbarStyles.selectionToolbarAnimationStyles,
497
497
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
498
498
  (0, _platformFeatureFlags.fg)('platform_editor_vanilla_codebidi_warning') && _codeBidiWarningStyles.codeBidiWarningStyles,
499
499
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
@@ -5,4 +5,4 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.version = exports.name = void 0;
7
7
  var name = exports.name = "@atlaskit/editor-core";
8
- var version = exports.version = "216.7.9";
8
+ var version = exports.version = "216.7.10";
@@ -632,6 +632,7 @@ export function ReactEditorView(props) {
632
632
  viewRef.current = undefined;
633
633
  }
634
634
  }, [createEditorView, onEditorCreated, eventDispatcher, onEditorDestroyed, handleAnalyticsEvent, mitigateScrollJump]);
635
+ const isPageAppearance = isFullPage(nextAppearance) || nextAppearance === 'max';
635
636
  const createEditor = useCallback((assistiveLabel, assistiveDescribedBy) => {
636
637
  return /*#__PURE__*/React.createElement(React.Fragment, null, fg('cc_editor_focus_before_editor_on_load') && /*#__PURE__*/React.createElement("div", {
637
638
  tabIndex: -1,
@@ -642,7 +643,7 @@ export function ReactEditorView(props) {
642
643
  className: `ProseMirror ${getUAPrefix()}`,
643
644
  key: "ProseMirror",
644
645
  ref: handleEditorViewRef,
645
- "aria-label": assistiveLabel || props.intl.formatMessage(editorMessages.editorAssistiveLabel)
646
+ "aria-label": assistiveLabel || (isPageAppearance && fg('platform_editor_a11y_9262') ? props.intl.formatMessage(editorMessages.fullPageEditorAssistiveLabel) : props.intl.formatMessage(editorMessages.editorAssistiveLabel))
646
647
  // setting aria-multiline to true when not mobile appearance.
647
648
  // because somehow mobile tests are failing when it set.
648
649
  // don't know why that is happening.
@@ -661,7 +662,7 @@ export function ReactEditorView(props) {
661
662
  __html: ''
662
663
  } : undefined
663
664
  }));
664
- }, [handleEditorViewRef, props.intl]);
665
+ }, [handleEditorViewRef, isPageAppearance, props.intl]);
665
666
  const previousPreset = usePreviousState(preset);
666
667
  useLayoutEffect(() => {
667
668
  if (isSSR() && expValEquals('platform_editor_ssr_renderer', 'isEnabled', true)) {
@@ -758,7 +759,7 @@ export function ReactEditorView(props) {
758
759
  ,
759
760
  className: `ProseMirror ${getUAPrefix()}`,
760
761
  key: "ProseMirror",
761
- "aria-label": assistiveLabel || props.intl.formatMessage(editorMessages.editorAssistiveLabel),
762
+ "aria-label": assistiveLabel || (isPageAppearance && fg('platform_editor_a11y_9262') ? props.intl.formatMessage(editorMessages.fullPageEditorAssistiveLabel) : props.intl.formatMessage(editorMessages.editorAssistiveLabel)),
762
763
  id: EDIT_AREA_ID,
763
764
  "aria-describedby": assistiveDescribedBy,
764
765
  "data-editor-id": editorId.current,
@@ -771,7 +772,7 @@ export function ReactEditorView(props) {
771
772
  });
772
773
  }
773
774
  });
774
- }, [ssrDeps, props.intl, props.portalProviderAPI, assistiveLabel, assistiveDescribedBy]);
775
+ }, [ssrDeps, props.intl, props.portalProviderAPI, assistiveLabel, assistiveDescribedBy, isPageAppearance]);
775
776
  const editor = useMemo(() => {
776
777
  // SSR editor will be available only in SSR environment,
777
778
  // in a browser `ssrEditor` will be `null`, and we will render a normal one ProseMirror.
@@ -4,5 +4,10 @@ export const editorMessages = defineMessages({
4
4
  id: 'fabric.editor.editorAssistiveLabel',
5
5
  defaultMessage: 'Main content area, start typing to enter text.',
6
6
  description: 'Text that is read out by screen reader when the main editor is in focus'
7
+ },
8
+ fullPageEditorAssistiveLabel: {
9
+ id: 'fabric.editor.fullPageEditorAssistiveLabel',
10
+ defaultMessage: 'Page editing area, start typing to enter text.',
11
+ description: 'The aria-label for the full page editor'
7
12
  }
8
13
  });
@@ -233,11 +233,11 @@ const EditorContentContainer = /*#__PURE__*/React.forwardRef((props, ref) => {
233
233
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
234
234
  ruleStyles,
235
235
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
236
- smartCardDiffStyles, fg('platform_editor_ai_generic_prep_for_aifc_2') && (fg('platform_editor_jan_a11y_fixes')
236
+ smartCardDiffStyles, fg('platform_editor_jan_a11y_fixes') ?
237
237
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
238
- ? showDiffDeletedNodeStylesNew
238
+ showDiffDeletedNodeStylesNew :
239
239
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
240
- : showDiffDeletedNodeStyles),
240
+ showDiffDeletedNodeStyles,
241
241
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
242
242
  mediaStyles, contentMode === 'compact' && (expValEquals('confluence_compact_text_format', 'isEnabled', true) ||
243
243
  // eslint-disable-next-line @atlaskit/platform/no-preconditioning
@@ -489,7 +489,7 @@ const EditorContentContainer = /*#__PURE__*/React.forwardRef((props, ref) => {
489
489
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
490
490
  hyperLinkFloatingToolbarStyles,
491
491
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
492
- fg('confluence_floating_toolbar_animation') && selectionToolbarAnimationStyles,
492
+ selectionToolbarAnimationStyles,
493
493
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
494
494
  fg('platform_editor_vanilla_codebidi_warning') && codeBidiWarningStyles,
495
495
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
@@ -1,2 +1,2 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "216.7.9";
2
+ export const version = "216.7.10";
@@ -672,6 +672,7 @@ export function ReactEditorView(props) {
672
672
  viewRef.current = undefined;
673
673
  }
674
674
  }, [createEditorView, onEditorCreated, eventDispatcher, onEditorDestroyed, handleAnalyticsEvent, mitigateScrollJump]);
675
+ var isPageAppearance = isFullPage(nextAppearance) || nextAppearance === 'max';
675
676
  var createEditor = useCallback(function (assistiveLabel, assistiveDescribedBy) {
676
677
  return /*#__PURE__*/React.createElement(React.Fragment, null, fg('cc_editor_focus_before_editor_on_load') && /*#__PURE__*/React.createElement("div", {
677
678
  tabIndex: -1,
@@ -682,7 +683,7 @@ export function ReactEditorView(props) {
682
683
  className: "ProseMirror ".concat(getUAPrefix()),
683
684
  key: "ProseMirror",
684
685
  ref: handleEditorViewRef,
685
- "aria-label": assistiveLabel || props.intl.formatMessage(editorMessages.editorAssistiveLabel)
686
+ "aria-label": assistiveLabel || (isPageAppearance && fg('platform_editor_a11y_9262') ? props.intl.formatMessage(editorMessages.fullPageEditorAssistiveLabel) : props.intl.formatMessage(editorMessages.editorAssistiveLabel))
686
687
  // setting aria-multiline to true when not mobile appearance.
687
688
  // because somehow mobile tests are failing when it set.
688
689
  // don't know why that is happening.
@@ -701,7 +702,7 @@ export function ReactEditorView(props) {
701
702
  __html: ''
702
703
  } : undefined
703
704
  }));
704
- }, [handleEditorViewRef, props.intl]);
705
+ }, [handleEditorViewRef, isPageAppearance, props.intl]);
705
706
  var previousPreset = usePreviousState(preset);
706
707
  useLayoutEffect(function () {
707
708
  if (isSSR() && expValEquals('platform_editor_ssr_renderer', 'isEnabled', true)) {
@@ -798,7 +799,7 @@ export function ReactEditorView(props) {
798
799
  ,
799
800
  className: "ProseMirror ".concat(getUAPrefix()),
800
801
  key: "ProseMirror",
801
- "aria-label": assistiveLabel || props.intl.formatMessage(editorMessages.editorAssistiveLabel),
802
+ "aria-label": assistiveLabel || (isPageAppearance && fg('platform_editor_a11y_9262') ? props.intl.formatMessage(editorMessages.fullPageEditorAssistiveLabel) : props.intl.formatMessage(editorMessages.editorAssistiveLabel)),
802
803
  id: EDIT_AREA_ID,
803
804
  "aria-describedby": assistiveDescribedBy,
804
805
  "data-editor-id": editorId.current,
@@ -811,7 +812,7 @@ export function ReactEditorView(props) {
811
812
  });
812
813
  }
813
814
  });
814
- }, [ssrDeps, props.intl, props.portalProviderAPI, assistiveLabel, assistiveDescribedBy]);
815
+ }, [ssrDeps, props.intl, props.portalProviderAPI, assistiveLabel, assistiveDescribedBy, isPageAppearance]);
815
816
  var editor = useMemo(function () {
816
817
  // SSR editor will be available only in SSR environment,
817
818
  // in a browser `ssrEditor` will be `null`, and we will render a normal one ProseMirror.
@@ -4,5 +4,10 @@ export var editorMessages = defineMessages({
4
4
  id: 'fabric.editor.editorAssistiveLabel',
5
5
  defaultMessage: 'Main content area, start typing to enter text.',
6
6
  description: 'Text that is read out by screen reader when the main editor is in focus'
7
+ },
8
+ fullPageEditorAssistiveLabel: {
9
+ id: 'fabric.editor.fullPageEditorAssistiveLabel',
10
+ defaultMessage: 'Page editing area, start typing to enter text.',
11
+ description: 'The aria-label for the full page editor'
7
12
  }
8
13
  });
@@ -229,11 +229,11 @@ var EditorContentContainer = /*#__PURE__*/React.forwardRef(function (props, ref)
229
229
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
230
230
  ruleStyles,
231
231
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
232
- smartCardDiffStyles, fg('platform_editor_ai_generic_prep_for_aifc_2') && (fg('platform_editor_jan_a11y_fixes')
232
+ smartCardDiffStyles, fg('platform_editor_jan_a11y_fixes') ?
233
233
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
234
- ? showDiffDeletedNodeStylesNew
234
+ showDiffDeletedNodeStylesNew :
235
235
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
236
- : showDiffDeletedNodeStyles),
236
+ showDiffDeletedNodeStyles,
237
237
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
238
238
  mediaStyles, contentMode === 'compact' && (expValEquals('confluence_compact_text_format', 'isEnabled', true) ||
239
239
  // eslint-disable-next-line @atlaskit/platform/no-preconditioning
@@ -485,7 +485,7 @@ var EditorContentContainer = /*#__PURE__*/React.forwardRef(function (props, ref)
485
485
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
486
486
  hyperLinkFloatingToolbarStyles,
487
487
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
488
- fg('confluence_floating_toolbar_animation') && selectionToolbarAnimationStyles,
488
+ selectionToolbarAnimationStyles,
489
489
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
490
490
  fg('platform_editor_vanilla_codebidi_warning') && codeBidiWarningStyles,
491
491
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
@@ -1,2 +1,2 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "216.7.9";
2
+ export var version = "216.7.10";
@@ -4,4 +4,9 @@ export declare const editorMessages: {
4
4
  defaultMessage: string;
5
5
  description: string;
6
6
  };
7
+ fullPageEditorAssistiveLabel: {
8
+ id: string;
9
+ defaultMessage: string;
10
+ description: string;
11
+ };
7
12
  };
@@ -4,4 +4,9 @@ export declare const editorMessages: {
4
4
  defaultMessage: string;
5
5
  description: string;
6
6
  };
7
+ fullPageEditorAssistiveLabel: {
8
+ id: string;
9
+ defaultMessage: string;
10
+ description: string;
11
+ };
7
12
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "216.7.10",
3
+ "version": "216.7.11",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -111,7 +111,7 @@
111
111
  "@atlaskit/section-message": "^8.12.0",
112
112
  "@atlaskit/synchrony-test-helpers": "workspace:^",
113
113
  "@atlaskit/toggle": "^15.2.0",
114
- "@atlaskit/util-data-test": "^18.4.0",
114
+ "@atlaskit/util-data-test": "^18.5.0",
115
115
  "@atlassian/a11y-jest-testing": "^0.8.0",
116
116
  "@atlassian/adf-schema-json": "^1.33.0",
117
117
  "@atlassian/feature-flags-test-utils": "^1.0.0",
@@ -151,16 +151,10 @@
151
151
  }
152
152
  },
153
153
  "platform-feature-flags": {
154
- "confluence_floating_toolbar_animation": {
155
- "type": "boolean"
156
- },
157
154
  "linking_platform_datasource_assets_objects": {
158
155
  "type": "boolean",
159
156
  "referenceOnly": "true"
160
157
  },
161
- "platform_editor_ai_generic_prep_for_aifc_2": {
162
- "type": "boolean"
163
- },
164
158
  "editor_inline_comments_on_inline_nodes": {
165
159
  "type": "boolean",
166
160
  "referenceOnly": "true"
@@ -361,6 +355,9 @@
361
355
  },
362
356
  "platform_editor_jan_a11y_fixes": {
363
357
  "type": "boolean"
358
+ },
359
+ "platform_editor_a11y_9262": {
360
+ "type": "boolean"
364
361
  }
365
362
  },
366
363
  "stricter": {