@atlaskit/teams-public 3.1.2 → 3.1.4
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,19 @@
|
|
|
1
1
|
# @atlaskit/teams-public
|
|
2
2
|
|
|
3
|
+
## 3.1.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`6f3ca06c05ce4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6f3ca06c05ce4) -
|
|
8
|
+
A11Y: Fix focus management when activating the Show more button in TeamContainers — focus now
|
|
9
|
+
moves to the first newly revealed container item (gated behind `teams_a11y_20261005`)
|
|
10
|
+
|
|
11
|
+
## 3.1.3
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 3.1.2
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -71,6 +71,7 @@ var TeamContainers = exports.TeamContainers = function TeamContainers(_ref) {
|
|
|
71
71
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
72
72
|
showMore = _useState2[0],
|
|
73
73
|
setShowMore = _useState2[1];
|
|
74
|
+
var firstShowMoreItemRef = (0, _react.useRef)(null);
|
|
74
75
|
var _useState3 = (0, _react.useState)(false),
|
|
75
76
|
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
76
77
|
isDisconnectDialogOpen = _useState4[0],
|
|
@@ -179,6 +180,13 @@ var TeamContainers = exports.TeamContainers = function TeamContainers(_ref) {
|
|
|
179
180
|
}
|
|
180
181
|
}
|
|
181
182
|
}, [hasError, unlinkError, onError]);
|
|
183
|
+
(0, _react.useEffect)(function () {
|
|
184
|
+
if ((0, _fg.fg)('teams_a11y_20261005') && showMore && firstShowMoreItemRef.current) {
|
|
185
|
+
firstShowMoreItemRef.current.focus({
|
|
186
|
+
preventScroll: false
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
}, [showMore]);
|
|
182
190
|
var handleShowMore = function handleShowMore() {
|
|
183
191
|
setShowMore(!showMore);
|
|
184
192
|
};
|
|
@@ -339,7 +347,7 @@ var TeamContainers = exports.TeamContainers = function TeamContainers(_ref) {
|
|
|
339
347
|
onAddAContainerClick: onAddAContainerClick,
|
|
340
348
|
CustomAddContainerCard: components === null || components === void 0 ? void 0 : components.AddContainerCard,
|
|
341
349
|
canCreateContainers: hasPermissionToCreateContainer
|
|
342
|
-
}), showMore && filteredTeamLinks.slice(maxNumberOfContainersToShow).map(function (container) {
|
|
350
|
+
}), showMore && filteredTeamLinks.slice(maxNumberOfContainersToShow).map(function (container, index) {
|
|
343
351
|
var card = /*#__PURE__*/_react.default.createElement(LinkedContainerCardComponent, {
|
|
344
352
|
key: container.id,
|
|
345
353
|
containerType: container.type,
|
|
@@ -363,7 +371,9 @@ var TeamContainers = exports.TeamContainers = function TeamContainers(_ref) {
|
|
|
363
371
|
});
|
|
364
372
|
return /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
365
373
|
key: container.id,
|
|
366
|
-
role: "listitem"
|
|
374
|
+
role: "listitem",
|
|
375
|
+
ref: index === 0 ? firstShowMoreItemRef : undefined,
|
|
376
|
+
tabIndex: index === 0 && (0, _fg.fg)('teams_a11y_20261005') ? -1 : undefined
|
|
367
377
|
}, card);
|
|
368
378
|
}));
|
|
369
379
|
}(), filteredTeamLinks.length > maxNumberOfContainersToShow && /*#__PURE__*/_react.default.createElement(_compiled.Inline, null, /*#__PURE__*/_react.default.createElement(_button.default, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* main.tsx generated by @compiled/babel-plugin v3.0.2 */
|
|
2
2
|
import "./main.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
|
-
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
4
|
+
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
5
5
|
import { defineMessages, FormattedMessage } from 'react-intl';
|
|
6
6
|
import Button from '@atlaskit/button/default/button';
|
|
7
7
|
import ModalTransition from '@atlaskit/modal-dialog/modal-transition';
|
|
@@ -55,6 +55,7 @@ export const TeamContainers = ({
|
|
|
55
55
|
} = useTeamLinksAndContainers(teamId, true);
|
|
56
56
|
const [_, actions] = useTeamContainersHook();
|
|
57
57
|
const [showMore, setShowMore] = useState(false);
|
|
58
|
+
const firstShowMoreItemRef = useRef(null);
|
|
58
59
|
const [isDisconnectDialogOpen, setIsDisconnectDialogOpen] = useState(false);
|
|
59
60
|
const [selectedContainerDetails, setSelectedContainerDetails] = useState();
|
|
60
61
|
const [filteredTeamLinks, setFilteredTeamLinks] = useState(teamLinks);
|
|
@@ -146,6 +147,13 @@ export const TeamContainers = ({
|
|
|
146
147
|
}
|
|
147
148
|
}
|
|
148
149
|
}, [hasError, unlinkError, onError]);
|
|
150
|
+
useEffect(() => {
|
|
151
|
+
if (fg('teams_a11y_20261005') && showMore && firstShowMoreItemRef.current) {
|
|
152
|
+
firstShowMoreItemRef.current.focus({
|
|
153
|
+
preventScroll: false
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
}, [showMore]);
|
|
149
157
|
const handleShowMore = () => {
|
|
150
158
|
setShowMore(!showMore);
|
|
151
159
|
};
|
|
@@ -278,7 +286,7 @@ export const TeamContainers = ({
|
|
|
278
286
|
onAddAContainerClick: onAddAContainerClick,
|
|
279
287
|
CustomAddContainerCard: components === null || components === void 0 ? void 0 : components.AddContainerCard,
|
|
280
288
|
canCreateContainers: hasPermissionToCreateContainer
|
|
281
|
-
}), showMore && filteredTeamLinks.slice(maxNumberOfContainersToShow).map(container => {
|
|
289
|
+
}), showMore && filteredTeamLinks.slice(maxNumberOfContainersToShow).map((container, index) => {
|
|
282
290
|
const card = /*#__PURE__*/React.createElement(LinkedContainerCardComponent, {
|
|
283
291
|
key: container.id,
|
|
284
292
|
containerType: container.type,
|
|
@@ -298,7 +306,9 @@ export const TeamContainers = ({
|
|
|
298
306
|
});
|
|
299
307
|
return /*#__PURE__*/React.createElement(Box, {
|
|
300
308
|
key: container.id,
|
|
301
|
-
role: "listitem"
|
|
309
|
+
role: "listitem",
|
|
310
|
+
ref: index === 0 ? firstShowMoreItemRef : undefined,
|
|
311
|
+
tabIndex: index === 0 && fg('teams_a11y_20261005') ? -1 : undefined
|
|
302
312
|
}, card);
|
|
303
313
|
}));
|
|
304
314
|
})(), filteredTeamLinks.length > maxNumberOfContainersToShow && /*#__PURE__*/React.createElement(Inline, null, /*#__PURE__*/React.createElement(Button, {
|
|
@@ -4,7 +4,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
4
4
|
import "./main.compiled.css";
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
6
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
7
|
-
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
7
|
+
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
8
8
|
import { defineMessages, FormattedMessage } from 'react-intl';
|
|
9
9
|
import Button from '@atlaskit/button/default/button';
|
|
10
10
|
import ModalTransition from '@atlaskit/modal-dialog/modal-transition';
|
|
@@ -62,6 +62,7 @@ export var TeamContainers = function TeamContainers(_ref) {
|
|
|
62
62
|
_useState2 = _slicedToArray(_useState, 2),
|
|
63
63
|
showMore = _useState2[0],
|
|
64
64
|
setShowMore = _useState2[1];
|
|
65
|
+
var firstShowMoreItemRef = useRef(null);
|
|
65
66
|
var _useState3 = useState(false),
|
|
66
67
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
67
68
|
isDisconnectDialogOpen = _useState4[0],
|
|
@@ -170,6 +171,13 @@ export var TeamContainers = function TeamContainers(_ref) {
|
|
|
170
171
|
}
|
|
171
172
|
}
|
|
172
173
|
}, [hasError, unlinkError, onError]);
|
|
174
|
+
useEffect(function () {
|
|
175
|
+
if (fg('teams_a11y_20261005') && showMore && firstShowMoreItemRef.current) {
|
|
176
|
+
firstShowMoreItemRef.current.focus({
|
|
177
|
+
preventScroll: false
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
}, [showMore]);
|
|
173
181
|
var handleShowMore = function handleShowMore() {
|
|
174
182
|
setShowMore(!showMore);
|
|
175
183
|
};
|
|
@@ -330,7 +338,7 @@ export var TeamContainers = function TeamContainers(_ref) {
|
|
|
330
338
|
onAddAContainerClick: onAddAContainerClick,
|
|
331
339
|
CustomAddContainerCard: components === null || components === void 0 ? void 0 : components.AddContainerCard,
|
|
332
340
|
canCreateContainers: hasPermissionToCreateContainer
|
|
333
|
-
}), showMore && filteredTeamLinks.slice(maxNumberOfContainersToShow).map(function (container) {
|
|
341
|
+
}), showMore && filteredTeamLinks.slice(maxNumberOfContainersToShow).map(function (container, index) {
|
|
334
342
|
var card = /*#__PURE__*/React.createElement(LinkedContainerCardComponent, {
|
|
335
343
|
key: container.id,
|
|
336
344
|
containerType: container.type,
|
|
@@ -354,7 +362,9 @@ export var TeamContainers = function TeamContainers(_ref) {
|
|
|
354
362
|
});
|
|
355
363
|
return /*#__PURE__*/React.createElement(Box, {
|
|
356
364
|
key: container.id,
|
|
357
|
-
role: "listitem"
|
|
365
|
+
role: "listitem",
|
|
366
|
+
ref: index === 0 ? firstShowMoreItemRef : undefined,
|
|
367
|
+
tabIndex: index === 0 && fg('teams_a11y_20261005') ? -1 : undefined
|
|
358
368
|
}, card);
|
|
359
369
|
}));
|
|
360
370
|
}(), filteredTeamLinks.length > maxNumberOfContainersToShow && /*#__PURE__*/React.createElement(Inline, null, /*#__PURE__*/React.createElement(Button, {
|
package/package.json
CHANGED
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@atlaskit/avatar": "^30.0.0",
|
|
29
29
|
"@atlaskit/button": "^25.4.0",
|
|
30
30
|
"@atlaskit/css": "^1.1.0",
|
|
31
|
-
"@atlaskit/dropdown-menu": "^
|
|
31
|
+
"@atlaskit/dropdown-menu": "^21.0.0",
|
|
32
32
|
"@atlaskit/feature-gate-js-client": "^7.0.0",
|
|
33
33
|
"@atlaskit/heading": "^8.0.0",
|
|
34
34
|
"@atlaskit/icon": "^38.0.0",
|
|
@@ -45,15 +45,15 @@
|
|
|
45
45
|
"@atlaskit/teams-app-internal-product-permissions": "^2.2.0",
|
|
46
46
|
"@atlaskit/teams-client": "^6.1.0",
|
|
47
47
|
"@atlaskit/tile": "^5.0.0",
|
|
48
|
-
"@atlaskit/tokens": "^20.
|
|
49
|
-
"@atlaskit/tooltip": "^24.
|
|
48
|
+
"@atlaskit/tokens": "^20.3.0",
|
|
49
|
+
"@atlaskit/tooltip": "^24.4.0",
|
|
50
50
|
"@babel/runtime": "^7.0.0",
|
|
51
51
|
"@compiled/react": "^1.0.2",
|
|
52
52
|
"@types/string-hash": "^1.1.3",
|
|
53
53
|
"graphql": "^15.8.0",
|
|
54
54
|
"graphql-tag": "^2.10.1",
|
|
55
55
|
"react-loosely-lazy": "^1.0.0",
|
|
56
|
-
"react-router-dom": "^6.
|
|
56
|
+
"react-router-dom": "^6.30.6",
|
|
57
57
|
"react-sweet-state": "^2.6.5",
|
|
58
58
|
"string-hash": "1.1.3"
|
|
59
59
|
},
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"@atlaskit/ssr": "workspace:^",
|
|
68
68
|
"@atlassian/a11y-jest-testing": "^0.17.0",
|
|
69
69
|
"@atlassian/feature-flags-test-utils": "^1.3.0",
|
|
70
|
-
"@atlassian/ptc-test-utils": "^0.
|
|
70
|
+
"@atlassian/ptc-test-utils": "^0.16.0",
|
|
71
71
|
"@atlassian/teams-app-internal-playground": "^2.10.0",
|
|
72
72
|
"@atlassian/testing-library": "^0.11.0",
|
|
73
73
|
"@atlassian/workbench": "workspace:^",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"react-intl": "^7.0.0"
|
|
79
79
|
},
|
|
80
80
|
"name": "@atlaskit/teams-public",
|
|
81
|
-
"version": "3.1.
|
|
81
|
+
"version": "3.1.4",
|
|
82
82
|
"description": "Public components related to teams",
|
|
83
83
|
"author": "Atlassian Pty Ltd",
|
|
84
84
|
"license": "Apache-2.0",
|
|
@@ -86,8 +86,8 @@
|
|
|
86
86
|
"registry": "https://registry.npmjs.org/"
|
|
87
87
|
},
|
|
88
88
|
"scripts": {
|
|
89
|
-
"ak-postbuild": "ls -d dist/* | xargs -n 1 copyfiles -u 1 -V src/**/*.svg",
|
|
90
|
-
"test:coverage": "(cd ../../.. &&
|
|
89
|
+
"ak-postbuild": "ls -d dist/* | xargs -n 1 copyfiles -u 1 -V 'src/**/*.svg'",
|
|
90
|
+
"test:coverage": "(cd ../../.. && afm run test -- 'packages/people-and-teams/teams-public/src' --coverage --coverageProvider=v8 --collectCoverageFrom='[\"packages/people-and-teams/teams-public/src/**\", \"!packages/people-and-teams/teams-public/src/**/**/types.ts\", \"!packages/people-and-teams/teams-public/src/ui/**/styled.tsx\"]')"
|
|
91
91
|
},
|
|
92
92
|
"platform-feature-flags": {
|
|
93
93
|
"migrate-product-permissions": {
|
|
@@ -104,6 +104,9 @@
|
|
|
104
104
|
},
|
|
105
105
|
"enable_teams_t26_design_drop_core_experiences": {
|
|
106
106
|
"type": "boolean"
|
|
107
|
+
},
|
|
108
|
+
"teams_a11y_20261005": {
|
|
109
|
+
"type": "boolean"
|
|
107
110
|
}
|
|
108
111
|
}
|
|
109
112
|
}
|