@atlaskit/reactions 33.5.0 → 33.6.2
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 +21 -0
- package/dist/cjs/components/ReactionPicker.js +8 -1
- package/dist/cjs/components/ReactionSummaryView.js +1 -3
- package/dist/es2019/components/ReactionPicker.js +6 -1
- package/dist/es2019/components/ReactionSummaryView.js +1 -3
- package/dist/esm/components/ReactionPicker.js +8 -1
- package/dist/esm/components/ReactionSummaryView.js +1 -3
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @atlaskit/reactions
|
|
2
2
|
|
|
3
|
+
## 33.6.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 33.6.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`fcf19235f6097`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/fcf19235f6097) -
|
|
14
|
+
Clean up feature flag.
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
17
|
+
## 33.6.0
|
|
18
|
+
|
|
19
|
+
### Minor Changes
|
|
20
|
+
|
|
21
|
+
- [`e120a04be28c8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e120a04be28c8) -
|
|
22
|
+
[ux] Return focus to add reactions button after selecting emoji
|
|
23
|
+
|
|
3
24
|
## 33.5.0
|
|
4
25
|
|
|
5
26
|
### Minor Changes
|
|
@@ -209,7 +209,14 @@ var ReactionPicker = exports.ReactionPicker = /*#__PURE__*/_react.default.memo(f
|
|
|
209
209
|
}
|
|
210
210
|
onSelection(item.id, settings.showFullPicker || hoverableReactionPicker && isHoverableReactionPickerEmojiPickerOpen ? 'emojiPicker' : 'quickSelector');
|
|
211
211
|
close(item.id);
|
|
212
|
-
|
|
212
|
+
if ((0, _platformFeatureFlags.fg)('platform_emoji_picker_focus_on_button')) {
|
|
213
|
+
// After selecting an emoji, we would like focus to be returned to the trigger button
|
|
214
|
+
// This is for the purposes of navigation for keyboard users
|
|
215
|
+
requestAnimationFrame(function () {
|
|
216
|
+
return triggerRef === null || triggerRef === void 0 ? void 0 : triggerRef.focus();
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
}, [close, onSelection, settings.showFullPicker, hoverableReactionPicker, isHoverableReactionPickerEmojiPickerOpen, triggerRef]);
|
|
213
220
|
|
|
214
221
|
/**
|
|
215
222
|
* Event handler when the emoji icon to open the custom picker is selected
|
|
@@ -15,7 +15,6 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
15
15
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
16
16
|
var _popup = _interopRequireDefault(require("@atlaskit/popup"));
|
|
17
17
|
var _picker = require("@atlaskit/emoji/picker");
|
|
18
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
19
18
|
var _useDelayedState3 = require("../hooks/useDelayedState");
|
|
20
19
|
var _Reaction = require("./Reaction");
|
|
21
20
|
var _Trigger = require("./Trigger");
|
|
@@ -249,7 +248,6 @@ var ReactionSummaryView = exports.ReactionSummaryView = function ReactionSummary
|
|
|
249
248
|
summaryButtonIconAfter: summaryButtonIconAfter,
|
|
250
249
|
summaryViewParticleEffectEmojiId: summaryViewParticleEffectEmojiId
|
|
251
250
|
}));
|
|
252
|
-
}
|
|
253
|
-
shouldRenderToParent: !hoverableSummaryView && (0, _platformFeatureFlags.fg)('should-render-to-parent-should-be-true-editor-coll')
|
|
251
|
+
}
|
|
254
252
|
});
|
|
255
253
|
};
|
|
@@ -167,7 +167,12 @@ export const ReactionPicker = /*#__PURE__*/React.memo(props => {
|
|
|
167
167
|
}
|
|
168
168
|
onSelection(item.id, settings.showFullPicker || hoverableReactionPicker && isHoverableReactionPickerEmojiPickerOpen ? 'emojiPicker' : 'quickSelector');
|
|
169
169
|
close(item.id);
|
|
170
|
-
|
|
170
|
+
if (fg('platform_emoji_picker_focus_on_button')) {
|
|
171
|
+
// After selecting an emoji, we would like focus to be returned to the trigger button
|
|
172
|
+
// This is for the purposes of navigation for keyboard users
|
|
173
|
+
requestAnimationFrame(() => triggerRef === null || triggerRef === void 0 ? void 0 : triggerRef.focus());
|
|
174
|
+
}
|
|
175
|
+
}, [close, onSelection, settings.showFullPicker, hoverableReactionPicker, isHoverableReactionPickerEmojiPickerOpen, triggerRef]);
|
|
171
176
|
|
|
172
177
|
/**
|
|
173
178
|
* Event handler when the emoji icon to open the custom picker is selected
|
|
@@ -6,7 +6,6 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
6
6
|
import { useCallback, useState } from 'react';
|
|
7
7
|
import Popup from '@atlaskit/popup';
|
|
8
8
|
import { EmojiPicker } from '@atlaskit/emoji/picker';
|
|
9
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
9
|
import { useDelayedState } from '../hooks/useDelayedState';
|
|
11
10
|
import { Reaction } from './Reaction';
|
|
12
11
|
import { Trigger as EmojiPickerTrigger } from './Trigger';
|
|
@@ -211,7 +210,6 @@ export const ReactionSummaryView = ({
|
|
|
211
210
|
summaryGetOptimisticImageURL: summaryGetOptimisticImageURL,
|
|
212
211
|
summaryButtonIconAfter: summaryButtonIconAfter,
|
|
213
212
|
summaryViewParticleEffectEmojiId: summaryViewParticleEffectEmojiId
|
|
214
|
-
}))
|
|
215
|
-
shouldRenderToParent: !hoverableSummaryView && fg('should-render-to-parent-should-be-true-editor-coll')
|
|
213
|
+
}))
|
|
216
214
|
});
|
|
217
215
|
};
|
|
@@ -200,7 +200,14 @@ export var ReactionPicker = /*#__PURE__*/React.memo(function (props) {
|
|
|
200
200
|
}
|
|
201
201
|
onSelection(item.id, settings.showFullPicker || hoverableReactionPicker && isHoverableReactionPickerEmojiPickerOpen ? 'emojiPicker' : 'quickSelector');
|
|
202
202
|
close(item.id);
|
|
203
|
-
|
|
203
|
+
if (fg('platform_emoji_picker_focus_on_button')) {
|
|
204
|
+
// After selecting an emoji, we would like focus to be returned to the trigger button
|
|
205
|
+
// This is for the purposes of navigation for keyboard users
|
|
206
|
+
requestAnimationFrame(function () {
|
|
207
|
+
return triggerRef === null || triggerRef === void 0 ? void 0 : triggerRef.focus();
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
}, [close, onSelection, settings.showFullPicker, hoverableReactionPicker, isHoverableReactionPickerEmojiPickerOpen, triggerRef]);
|
|
204
211
|
|
|
205
212
|
/**
|
|
206
213
|
* Event handler when the emoji icon to open the custom picker is selected
|
|
@@ -7,7 +7,6 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
7
7
|
import { useCallback, useState } from 'react';
|
|
8
8
|
import Popup from '@atlaskit/popup';
|
|
9
9
|
import { EmojiPicker } from '@atlaskit/emoji/picker';
|
|
10
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
10
|
import { useDelayedState } from '../hooks/useDelayedState';
|
|
12
11
|
import { Reaction } from './Reaction';
|
|
13
12
|
import { Trigger as EmojiPickerTrigger } from './Trigger';
|
|
@@ -240,7 +239,6 @@ export var ReactionSummaryView = function ReactionSummaryView(_ref) {
|
|
|
240
239
|
summaryButtonIconAfter: summaryButtonIconAfter,
|
|
241
240
|
summaryViewParticleEffectEmojiId: summaryViewParticleEffectEmojiId
|
|
242
241
|
}));
|
|
243
|
-
}
|
|
244
|
-
shouldRenderToParent: !hoverableSummaryView && fg('should-render-to-parent-should-be-true-editor-coll')
|
|
242
|
+
}
|
|
245
243
|
});
|
|
246
244
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/reactions",
|
|
3
|
-
"version": "33.
|
|
3
|
+
"version": "33.6.2",
|
|
4
4
|
"description": "Reactions component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@atlaskit/modal-dialog": "^14.6.0",
|
|
46
46
|
"@atlaskit/motion": "^5.3.0",
|
|
47
47
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
48
|
-
"@atlaskit/platform-feature-flags-react": "^0.
|
|
48
|
+
"@atlaskit/platform-feature-flags-react": "^0.4.0",
|
|
49
49
|
"@atlaskit/popper": "^7.1.0",
|
|
50
50
|
"@atlaskit/popup": "^4.4.0",
|
|
51
51
|
"@atlaskit/portal": "^5.1.0",
|
|
@@ -115,6 +115,9 @@
|
|
|
115
115
|
"start:edge": "cd ../../ && PROXY_TARGET_ENV=edge yarn start:webpack reactions --proxy ./packages/elements/reactions/proxy.ts"
|
|
116
116
|
},
|
|
117
117
|
"platform-feature-flags": {
|
|
118
|
+
"platform_emoji_picker_focus_on_button": {
|
|
119
|
+
"type": "boolean"
|
|
120
|
+
},
|
|
118
121
|
"platform-component-visual-refresh": {
|
|
119
122
|
"type": "boolean"
|
|
120
123
|
},
|
|
@@ -124,9 +127,6 @@
|
|
|
124
127
|
"dst-a11y__replace-anchor-with-link__editor-collabo": {
|
|
125
128
|
"type": "boolean"
|
|
126
129
|
},
|
|
127
|
-
"should-render-to-parent-should-be-true-editor-coll": {
|
|
128
|
-
"type": "boolean"
|
|
129
|
-
},
|
|
130
130
|
"platform_optimistic_reaction_emoji": {
|
|
131
131
|
"type": "boolean"
|
|
132
132
|
},
|