@atlaskit/editor-plugin-placeholder 8.1.18 → 8.1.20

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,23 @@
1
1
  # @atlaskit/editor-plugin-placeholder
2
2
 
3
+ ## 8.1.20
4
+
5
+ ### Patch Changes
6
+
7
+ - [`fa146e17e08d6`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/fa146e17e08d6) -
8
+ Update README.md and 0-intro.tsx
9
+ - Updated dependencies
10
+
11
+ ## 8.1.19
12
+
13
+ ### Patch Changes
14
+
15
+ - [`aad55446552cd`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/aad55446552cd) -
16
+ Cleaned up `platform_editor_ai_aifc_adf_placeholder` feature gate. The ADF placeholder is now
17
+ always used when applicable, without requiring a feature gate check. Removed unused imports and
18
+ dead code paths.
19
+ - Updated dependencies
20
+
3
21
  ## 8.1.18
4
22
 
5
23
  ### Patch Changes
package/README.md CHANGED
@@ -1,10 +1,22 @@
1
- # Editor plugin placeholder
1
+ # Editor Plugin Placeholder
2
2
 
3
3
  Placeholder plugin for @atlaskit/editor-core
4
4
 
5
5
  **Note:** This component is designed for internal Atlassian development.
6
6
  External contributors will be able to use this component but will not be able to submit issues.
7
7
 
8
+ ## Overview
9
+
10
+ The Placeholder plugin provides customizable placeholder text and visual feedback for the Atlassian Editor. It enables dynamic placeholder content, animated prompts, and loading spinners to enhance the user experience in empty or loading states.
11
+
12
+ ## Key features
13
+
14
+ - **Customizable placeholder text** - Set dynamic placeholder content for the editor
15
+ - **Placeholder prompts** - Display animated placeholder prompts to guide users
16
+ - **Loading spinner** - Show a loading indicator during content initialization and collaborative editing sync
17
+ - **Flexible configuration** - Configure placeholder behavior, visibility, and content styling
18
+ - **Empty line hints** - Display bracket hints on empty lines for better user guidance
19
+
8
20
  ## Install
9
21
  ---
10
22
  - **Install** - *yarn add @atlaskit/editor-plugin-placeholder*
@@ -8,7 +8,6 @@ var _processRawValue = require("@atlaskit/editor-common/process-raw-value");
8
8
  var _utils = require("@atlaskit/editor-common/utils");
9
9
  var _model = require("@atlaskit/editor-prosemirror/model");
10
10
  var _view = require("@atlaskit/editor-prosemirror/view");
11
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
12
11
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
13
12
  var _animation = require("./animation");
14
13
  var _constants = require("./constants");
@@ -92,7 +91,7 @@ function createPlaceholderDecoration(editorState, placeholderText, placeholderPr
92
91
  if (isTargetNested && (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1')) {
93
92
  placeholderDecoration.classList.add('placeholder-decoration-hide-overflow');
94
93
  }
95
- if (placeholderADF && _utils.browser.chrome && (0, _platformFeatureFlags.fg)('platform_editor_ai_aifc_adf_placeholder')) {
94
+ if (placeholderADF && _utils.browser.chrome) {
96
95
  var fragment = document.createDocumentFragment();
97
96
  // An issue occurs with the caret where it gets bigger when it's next to a non-editable element like a decoration.
98
97
  // See: https://discuss.prosemirror.net/t/chrome-caret-cursor-larger-than-the-text-with-inlined-items/5946/2
@@ -2,7 +2,6 @@ import { processRawValue } from '@atlaskit/editor-common/process-raw-value';
2
2
  import { browser, ZERO_WIDTH_SPACE } from '@atlaskit/editor-common/utils';
3
3
  import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
4
4
  import { Decoration, DecorationSet } from '@atlaskit/editor-prosemirror/view';
5
- import { fg } from '@atlaskit/platform-feature-flags';
6
5
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
7
6
  import { cycleThroughPlaceholderPrompts } from './animation';
8
7
  import { placeholderTestId } from './constants';
@@ -82,7 +81,7 @@ export function createPlaceholderDecoration(editorState, placeholderText, placeh
82
81
  if (isTargetNested && editorExperiment('platform_editor_controls', 'variant1')) {
83
82
  placeholderDecoration.classList.add('placeholder-decoration-hide-overflow');
84
83
  }
85
- if (placeholderADF && browser.chrome && fg('platform_editor_ai_aifc_adf_placeholder')) {
84
+ if (placeholderADF && browser.chrome) {
86
85
  const fragment = document.createDocumentFragment();
87
86
  // An issue occurs with the caret where it gets bigger when it's next to a non-editable element like a decoration.
88
87
  // See: https://discuss.prosemirror.net/t/chrome-caret-cursor-larger-than-the-text-with-inlined-items/5946/2
@@ -2,7 +2,6 @@ import { processRawValue } from '@atlaskit/editor-common/process-raw-value';
2
2
  import { browser, ZERO_WIDTH_SPACE } from '@atlaskit/editor-common/utils';
3
3
  import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
4
4
  import { Decoration, DecorationSet } from '@atlaskit/editor-prosemirror/view';
5
- import { fg } from '@atlaskit/platform-feature-flags';
6
5
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
7
6
  import { cycleThroughPlaceholderPrompts } from './animation';
8
7
  import { placeholderTestId } from './constants';
@@ -86,7 +85,7 @@ export function createPlaceholderDecoration(editorState, placeholderText, placeh
86
85
  if (isTargetNested && editorExperiment('platform_editor_controls', 'variant1')) {
87
86
  placeholderDecoration.classList.add('placeholder-decoration-hide-overflow');
88
87
  }
89
- if (placeholderADF && browser.chrome && fg('platform_editor_ai_aifc_adf_placeholder')) {
88
+ if (placeholderADF && browser.chrome) {
90
89
  var fragment = document.createDocumentFragment();
91
90
  // An issue occurs with the caret where it gets bigger when it's next to a non-editable element like a decoration.
92
91
  // See: https://discuss.prosemirror.net/t/chrome-caret-cursor-larger-than-the-text-with-inlined-items/5946/2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-placeholder",
3
- "version": "8.1.18",
3
+ "version": "8.1.20",
4
4
  "description": "Placeholder plugin for @atlaskit/editor-core.",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -37,7 +37,7 @@
37
37
  "@atlaskit/platform-feature-flags": "^1.1.0",
38
38
  "@atlaskit/primitives": "^18.1.0",
39
39
  "@atlaskit/spinner": "^19.1.0",
40
- "@atlaskit/tmp-editor-statsig": "^57.0.0",
40
+ "@atlaskit/tmp-editor-statsig": "^58.0.0",
41
41
  "@atlaskit/tokens": "^12.0.0",
42
42
  "@babel/runtime": "^7.0.0"
43
43
  },
@@ -50,11 +50,6 @@
50
50
  "devDependencies": {
51
51
  "@testing-library/react": "^16.3.0"
52
52
  },
53
- "platform-feature-flags": {
54
- "platform_editor_ai_aifc_adf_placeholder": {
55
- "type": "boolean"
56
- }
57
- },
58
53
  "techstack": {
59
54
  "@atlassian/frontend": {
60
55
  "import-structure": [