@atlaskit/inline-edit 15.1.4 → 15.2.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,21 @@
1
1
  # @atlaskit/inline-edit
2
2
 
3
+ ## 15.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#144637](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/144637)
8
+ [`873027dabff6e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/873027dabff6e) -
9
+ [ux] Added class to handle default focus on form elements
10
+
11
+ ## 15.1.5
12
+
13
+ ### Patch Changes
14
+
15
+ - [#145361](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/145361)
16
+ [`db584fb973656`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/db584fb973656) -
17
+ Clean up of FG platform-design-system-inline-edit-reset-on-escape
18
+
3
19
  ## 15.1.4
4
20
 
5
21
  ### Patch Changes
@@ -29,7 +29,7 @@ var fieldStyles = null;
29
29
  var analyticsAttributes = {
30
30
  componentName: 'inlineEdit',
31
31
  packageName: "@atlaskit/inline-edit",
32
- packageVersion: "15.1.4"
32
+ packageVersion: "15.2.0"
33
33
  };
34
34
  var InnerInlineEdit = function InnerInlineEdit(props) {
35
35
  var _props$startWithEditV = props.startWithEditViewOpen,
@@ -185,14 +185,18 @@ var InnerInlineEdit = function InnerInlineEdit(props) {
185
185
  onKeyDown: function onKeyDown(e) {
186
186
  _onKeyDown(e);
187
187
  if (e.key === 'Esc' || e.key === 'Escape') {
188
- if ((0, _platformFeatureFlags.fg)('platform-design-system-inline-edit-reset-on-escape')) {
189
- reset();
190
- }
188
+ reset();
191
189
  onCancel();
192
190
  }
193
191
  },
194
192
  onSubmit: onSubmit,
195
193
  ref: formRef
194
+ // Below we have added a class name to the form element to prevent the default focus on the form element
195
+ // This is because due to some default focus being applied to the form element, the inline edit component
196
+ // was being focused automatically and causing scroll issues in issue view
197
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
198
+ ,
199
+ className: (0, _platformFeatureFlags.fg)('platform_design_system_inline_edit_dont_focus') ? 'dont-default-focus' : undefined
196
200
  }, shouldBeEditing ? /*#__PURE__*/_react.default.createElement(_Field.default, {
197
201
  name: "inlineEdit",
198
202
  label: label,
@@ -15,7 +15,7 @@ const fieldStyles = null;
15
15
  const analyticsAttributes = {
16
16
  componentName: 'inlineEdit',
17
17
  packageName: "@atlaskit/inline-edit",
18
- packageVersion: "15.1.4"
18
+ packageVersion: "15.2.0"
19
19
  };
20
20
  const InnerInlineEdit = props => {
21
21
  const {
@@ -160,14 +160,18 @@ const InnerInlineEdit = props => {
160
160
  onKeyDown: e => {
161
161
  onKeyDown(e);
162
162
  if (e.key === 'Esc' || e.key === 'Escape') {
163
- if (fg('platform-design-system-inline-edit-reset-on-escape')) {
164
- reset();
165
- }
163
+ reset();
166
164
  onCancel();
167
165
  }
168
166
  },
169
167
  onSubmit: onSubmit,
170
168
  ref: formRef
169
+ // Below we have added a class name to the form element to prevent the default focus on the form element
170
+ // This is because due to some default focus being applied to the form element, the inline edit component
171
+ // was being focused automatically and causing scroll issues in issue view
172
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
173
+ ,
174
+ className: fg('platform_design_system_inline_edit_dont_focus') ? 'dont-default-focus' : undefined
171
175
  }, shouldBeEditing ? /*#__PURE__*/React.createElement(Field, {
172
176
  name: "inlineEdit",
173
177
  label: label,
@@ -19,7 +19,7 @@ var fieldStyles = null;
19
19
  var analyticsAttributes = {
20
20
  componentName: 'inlineEdit',
21
21
  packageName: "@atlaskit/inline-edit",
22
- packageVersion: "15.1.4"
22
+ packageVersion: "15.2.0"
23
23
  };
24
24
  var InnerInlineEdit = function InnerInlineEdit(props) {
25
25
  var _props$startWithEditV = props.startWithEditViewOpen,
@@ -175,14 +175,18 @@ var InnerInlineEdit = function InnerInlineEdit(props) {
175
175
  onKeyDown: function onKeyDown(e) {
176
176
  _onKeyDown(e);
177
177
  if (e.key === 'Esc' || e.key === 'Escape') {
178
- if (fg('platform-design-system-inline-edit-reset-on-escape')) {
179
- reset();
180
- }
178
+ reset();
181
179
  onCancel();
182
180
  }
183
181
  },
184
182
  onSubmit: onSubmit,
185
183
  ref: formRef
184
+ // Below we have added a class name to the form element to prevent the default focus on the form element
185
+ // This is because due to some default focus being applied to the form element, the inline edit component
186
+ // was being focused automatically and causing scroll issues in issue view
187
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
188
+ ,
189
+ className: fg('platform_design_system_inline_edit_dont_focus') ? 'dont-default-focus' : undefined
186
190
  }, shouldBeEditing ? /*#__PURE__*/React.createElement(Field, {
187
191
  name: "inlineEdit",
188
192
  label: label,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/inline-edit",
3
- "version": "15.1.4",
3
+ "version": "15.2.0",
4
4
  "description": "An inline edit displays a custom input component that switches between reading and editing on the same page.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -39,13 +39,13 @@
39
39
  "@atlaskit/codemod-utils": "^4.2.0",
40
40
  "@atlaskit/css": "^0.10.0",
41
41
  "@atlaskit/form": "^12.0.0",
42
- "@atlaskit/icon": "^25.4.0",
42
+ "@atlaskit/icon": "^25.6.0",
43
43
  "@atlaskit/inline-dialog": "^17.0.0",
44
44
  "@atlaskit/platform-feature-flags": "^1.1.0",
45
- "@atlaskit/primitives": "^14.2.0",
45
+ "@atlaskit/primitives": "^14.4.0",
46
46
  "@atlaskit/textfield": "^8.0.0",
47
47
  "@atlaskit/theme": "^18.0.0",
48
- "@atlaskit/tokens": "^4.5.0",
48
+ "@atlaskit/tokens": "^4.8.0",
49
49
  "@atlaskit/visually-hidden": "^3.0.0",
50
50
  "@babel/runtime": "^7.0.0",
51
51
  "@compiled/react": "^0.18.3"
@@ -54,19 +54,19 @@
54
54
  "react": "^18.2.0"
55
55
  },
56
56
  "devDependencies": {
57
- "@af/accessibility-testing": "^2.0.0",
58
- "@af/integration-testing": "^0.5.0",
59
- "@atlaskit/datetime-picker": "^16.2.0",
57
+ "@af/accessibility-testing": "workspace:^",
58
+ "@af/integration-testing": "workspace:^",
59
+ "@atlaskit/datetime-picker": "^17.0.0",
60
60
  "@atlaskit/docs": "^10.0.0",
61
61
  "@atlaskit/ds-lib": "^4.0.0",
62
- "@atlaskit/heading": "^5.1.0",
62
+ "@atlaskit/heading": "^5.2.0",
63
63
  "@atlaskit/link": "^3.1.0",
64
64
  "@atlaskit/section-message": "^8.2.0",
65
- "@atlaskit/select": "^20.0.0",
65
+ "@atlaskit/select": "^20.4.0",
66
66
  "@atlaskit/tag": "^14.0.0",
67
67
  "@atlaskit/tag-group": "^12.0.0",
68
68
  "@atlaskit/textarea": "^8.0.0",
69
- "@atlaskit/visual-regression": "^0.10.0",
69
+ "@atlaskit/visual-regression": "workspace:^",
70
70
  "@atlassian/feature-flags-test-utils": "^0.3.0",
71
71
  "@atlassian/ssr-tests": "^0.2.0",
72
72
  "@testing-library/react": "^13.4.0",
@@ -105,7 +105,7 @@
105
105
  ".": "./src/index.ts"
106
106
  },
107
107
  "platform-feature-flags": {
108
- "platform-design-system-inline-edit-reset-on-escape": {
108
+ "platform_design_system_inline_edit_dont_focus": {
109
109
  "type": "boolean"
110
110
  }
111
111
  }