@atlaskit/navigation-system 10.12.1 → 10.14.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 +21 -0
- package/dist/cjs/ui/page-layout/panel-splitter/panel-splitter.js +2 -1
- package/dist/cjs/ui/page-layout/panel.compiled.css +6 -2
- package/dist/cjs/ui/page-layout/panel.js +5 -3
- package/dist/cjs/ui/page-layout/side-nav/toggle-button.js +3 -2
- package/dist/cjs/ui/page-layout/side-nav/use-side-nav-toggle-keyboard-shortcut.js +2 -1
- package/dist/es2019/ui/page-layout/panel-splitter/panel-splitter.js +2 -1
- package/dist/es2019/ui/page-layout/panel.compiled.css +6 -2
- package/dist/es2019/ui/page-layout/panel.js +5 -3
- package/dist/es2019/ui/page-layout/side-nav/toggle-button.js +3 -2
- package/dist/es2019/ui/page-layout/side-nav/use-side-nav-toggle-keyboard-shortcut.js +2 -1
- package/dist/esm/ui/page-layout/panel-splitter/panel-splitter.js +2 -1
- package/dist/esm/ui/page-layout/panel.compiled.css +6 -2
- package/dist/esm/ui/page-layout/panel.js +5 -3
- package/dist/esm/ui/page-layout/side-nav/toggle-button.js +3 -2
- package/dist/esm/ui/page-layout/side-nav/use-side-nav-toggle-keyboard-shortcut.js +2 -1
- package/dist/types/ui/page-layout/panel-splitter/side-nav-panel-splitter.d.ts +1 -1
- package/dist/types/ui/page-layout/root.d.ts +2 -1
- package/package.json +6 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @atlassian/navigation-system
|
|
2
2
|
|
|
3
|
+
## 10.14.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`2309581c02076`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2309581c02076) -
|
|
8
|
+
Decouple the built-in side nav shortcut, toggle tooltip shortcut, and side nav splitter tooltip
|
|
9
|
+
from the full height sidebar rollout behind `platform-dst-keep-desired-fhs-features`.
|
|
10
|
+
|
|
11
|
+
## 10.13.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- [`0195cea826a48`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0195cea826a48) -
|
|
16
|
+
Use directional motion tokens for RTL-aware panel slide animations. Adds new
|
|
17
|
+
`motion.panel.content.enter` and `motion.panel.content.exit` motion tokens, applied to the Panel
|
|
18
|
+
to soften the content when opening and closing.
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- Updated dependencies
|
|
23
|
+
|
|
3
24
|
## 10.12.1
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
|
@@ -21,6 +21,7 @@ var _tinyInvariant = _interopRequireDefault(require("tiny-invariant"));
|
|
|
21
21
|
var _useId = require("@atlaskit/ds-lib/use-id");
|
|
22
22
|
var _useStableRef = _interopRequireDefault(require("@atlaskit/ds-lib/use-stable-ref"));
|
|
23
23
|
var _useOpenLayerObserver = require("@atlaskit/layering/use-open-layer-observer");
|
|
24
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
24
25
|
var _combine = require("@atlaskit/pragmatic-drag-and-drop/combine");
|
|
25
26
|
var _adapter = require("@atlaskit/pragmatic-drag-and-drop/element/adapter");
|
|
26
27
|
var _blockDraggingToIframes = require("@atlaskit/pragmatic-drag-and-drop/element/block-dragging-to-iframes");
|
|
@@ -116,7 +117,7 @@ var MaybeTooltip = function MaybeTooltip(_ref2) {
|
|
|
116
117
|
children = _ref2.children,
|
|
117
118
|
testId = _ref2.testId;
|
|
118
119
|
var isFhsEnabled = (0, _useIsFhsEnabled.useIsFhsEnabled)();
|
|
119
|
-
if (tooltipContent && isFhsEnabled) {
|
|
120
|
+
if (tooltipContent && (isFhsEnabled || (0, _fg.fg)('platform-dst-keep-desired-fhs-features'))) {
|
|
120
121
|
return /*#__PURE__*/React.createElement(_tooltip.default, {
|
|
121
122
|
testId: testId,
|
|
122
123
|
content: tooltipContent,
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
._nd5l1b6c{grid-area:main/aside/aside/aside}
|
|
2
|
-
.
|
|
3
|
-
.
|
|
2
|
+
._y44v11az{animation:var(--ds-panel-content-enter,.15s cubic-bezier(.4,1,.6,1) FadeIn0to100 .1s)}
|
|
3
|
+
._y44v14vv{animation:var(--ds-panel-exit-right,.2s cubic-bezier(0,.4,0,1) SlideOut100PercentRight)}
|
|
4
|
+
._y44v1nn1{animation:var(--ds-panel-enter-right,.25s cubic-bezier(0,.4,0,1) SlideIn100PercentRight)}
|
|
5
|
+
._y44v6gs0{animation:var(--ds-panel-content-exit,50ms cubic-bezier(.4,1,.6,1) FadeOut100to0)}
|
|
6
|
+
[dir=rtl] ._158obamb{animation:var(--ds-panel-enter-left,.25s cubic-bezier(0,.4,0,1) SlideIn100PercentLeft)}
|
|
7
|
+
[dir=rtl] ._158oeydr{animation:var(--ds-panel-exit-left,.2s cubic-bezier(0,.4,0,1) SlideOut100PercentLeft)}
|
|
4
8
|
._191wglyw{border-inline-start:none}._10fph9n0{justify-self:end}
|
|
5
9
|
._152timx3{inset-block-start:calc(var(--n_bnrM, 0px) + var(--n_tNvM, 0px))}
|
|
6
10
|
._16qs130s{box-shadow:var(--ds-shadow-overlay,0 8px 9pt #1e1f2126,0 0 1px #1e1f214f)}
|
|
@@ -44,8 +44,10 @@ var styles = {
|
|
|
44
44
|
border: "_191wglyw _16qs130s _1w6eia51 _scbpglyw",
|
|
45
45
|
scrollContainer: "_1reo1wug _18m91wug _4t3i1osq",
|
|
46
46
|
hidden: "_1e0cglyw",
|
|
47
|
-
entering: "
|
|
48
|
-
exiting: "
|
|
47
|
+
entering: "_y44v1nn1 _158obamb",
|
|
48
|
+
exiting: "_y44v14vv _158oeydr",
|
|
49
|
+
contentEntering: "_y44v11az",
|
|
50
|
+
contentExiting: "_y44v6gs0"
|
|
49
51
|
};
|
|
50
52
|
|
|
51
53
|
/**
|
|
@@ -225,6 +227,6 @@ function Panel(_ref) {
|
|
|
225
227
|
resizingCssVar: panelSplitterResizingVar,
|
|
226
228
|
position: "start"
|
|
227
229
|
}, /*#__PURE__*/React.createElement("div", {
|
|
228
|
-
className: (0, _runtime.ax)([styles.scrollContainer])
|
|
230
|
+
className: (0, _runtime.ax)([styles.scrollContainer, isMotionUpliftEnabled && state === 'entering' && styles.contentEntering, isMotionUpliftEnabled && state === 'exiting' && styles.contentExiting])
|
|
229
231
|
}, children)));
|
|
230
232
|
}
|
|
@@ -17,6 +17,7 @@ var _analyticsNext = require("@atlaskit/analytics-next");
|
|
|
17
17
|
var _sidebarCollapse = _interopRequireDefault(require("@atlaskit/icon/core/sidebar-collapse"));
|
|
18
18
|
var _sidebarExpand = _interopRequireDefault(require("@atlaskit/icon/core/sidebar-expand"));
|
|
19
19
|
var _useOpenLayerObserver = require("@atlaskit/layering/use-open-layer-observer");
|
|
20
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
20
21
|
var _useIsFhsEnabled = require("../../fhs-rollout/use-is-fhs-enabled");
|
|
21
22
|
var _iconButton = require("../../top-nav-items/themed/icon-button");
|
|
22
23
|
var _sideNavToggleButtonAttachRef = require("./side-nav-toggle-button-attach-ref");
|
|
@@ -107,7 +108,7 @@ var SideNavToggleButton = exports.SideNavToggleButton = function SideNavToggleBu
|
|
|
107
108
|
isSideNavVisible: isSideNavExpanded
|
|
108
109
|
});
|
|
109
110
|
toggleVisibility();
|
|
110
|
-
if (isFhsEnabled) {
|
|
111
|
+
if (isFhsEnabled || (0, _fg.fg)('platform-dst-keep-desired-fhs-features')) {
|
|
111
112
|
openLayerObserver === null || openLayerObserver === void 0 || openLayerObserver.closeLayers();
|
|
112
113
|
}
|
|
113
114
|
}, [isFhsEnabled, isSideNavExpanded, onClick, openLayerObserver, toggleVisibility]);
|
|
@@ -151,7 +152,7 @@ var SideNavToggleButton = exports.SideNavToggleButton = function SideNavToggleBu
|
|
|
151
152
|
};
|
|
152
153
|
var isShortcutEnabled = (0, _useIsSideNavShortcutEnabled.useIsSideNavShortcutEnabled)();
|
|
153
154
|
var tooltipProps = (0, _react.useMemo)(function () {
|
|
154
|
-
if (isFhsEnabled) {
|
|
155
|
+
if (isFhsEnabled || (0, _fg.fg)('platform-dst-keep-desired-fhs-features')) {
|
|
155
156
|
return _objectSpread(_objectSpread({}, toggleButtonTooltipOptions), {}, {
|
|
156
157
|
shortcut: isShortcutEnabled ? _sideNavToggleTooltipKeyboardShortcut.sideNavToggleTooltipKeyboardShortcut : undefined
|
|
157
158
|
});
|
|
@@ -9,6 +9,7 @@ var _react = require("react");
|
|
|
9
9
|
var _bindEventListener = require("bind-event-listener");
|
|
10
10
|
var _useStableRef = _interopRequireDefault(require("@atlaskit/ds-lib/use-stable-ref"));
|
|
11
11
|
var _useOpenLayerObserver = require("@atlaskit/layering/use-open-layer-observer");
|
|
12
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
12
13
|
var _useIsFhsEnabled = require("../../fhs-rollout/use-is-fhs-enabled");
|
|
13
14
|
var _useIsSideNavShortcutEnabled = require("./use-is-side-nav-shortcut-enabled");
|
|
14
15
|
var _useToggleSideNav = require("./use-toggle-side-nav");
|
|
@@ -25,7 +26,7 @@ function useSideNavToggleKeyboardShortcut(_ref) {
|
|
|
25
26
|
var canToggleWithShortcutStableRef = (0, _useStableRef.default)(canToggleWithShortcut);
|
|
26
27
|
var isSideNavShortcutEnabled = (0, _useIsSideNavShortcutEnabled.useIsSideNavShortcutEnabled)();
|
|
27
28
|
(0, _react.useEffect)(function () {
|
|
28
|
-
if (!isFhsEnabled) {
|
|
29
|
+
if (!isFhsEnabled && !(0, _fg.fg)('platform-dst-keep-desired-fhs-features')) {
|
|
29
30
|
return;
|
|
30
31
|
}
|
|
31
32
|
if (!isSideNavShortcutEnabled) {
|
|
@@ -10,6 +10,7 @@ import invariant from 'tiny-invariant';
|
|
|
10
10
|
import { useId } from '@atlaskit/ds-lib/use-id';
|
|
11
11
|
import useStableRef from '@atlaskit/ds-lib/use-stable-ref';
|
|
12
12
|
import { useOpenLayerObserver } from '@atlaskit/layering/use-open-layer-observer';
|
|
13
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
13
14
|
import { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';
|
|
14
15
|
import { draggable } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
|
|
15
16
|
import { blockDraggingToIFrames } from '@atlaskit/pragmatic-drag-and-drop/element/block-dragging-to-iframes';
|
|
@@ -104,7 +105,7 @@ const MaybeTooltip = ({
|
|
|
104
105
|
testId
|
|
105
106
|
}) => {
|
|
106
107
|
const isFhsEnabled = useIsFhsEnabled();
|
|
107
|
-
if (tooltipContent && isFhsEnabled) {
|
|
108
|
+
if (tooltipContent && (isFhsEnabled || fg('platform-dst-keep-desired-fhs-features'))) {
|
|
108
109
|
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
109
110
|
testId: testId,
|
|
110
111
|
content: tooltipContent,
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
._nd5l1b6c{grid-area:main/aside/aside/aside}
|
|
2
|
-
.
|
|
3
|
-
.
|
|
2
|
+
._y44v11az{animation:var(--ds-panel-content-enter,.15s cubic-bezier(.4,1,.6,1) FadeIn0to100 .1s)}
|
|
3
|
+
._y44v14vv{animation:var(--ds-panel-exit-right,.2s cubic-bezier(0,.4,0,1) SlideOut100PercentRight)}
|
|
4
|
+
._y44v1nn1{animation:var(--ds-panel-enter-right,.25s cubic-bezier(0,.4,0,1) SlideIn100PercentRight)}
|
|
5
|
+
._y44v6gs0{animation:var(--ds-panel-content-exit,50ms cubic-bezier(.4,1,.6,1) FadeOut100to0)}
|
|
6
|
+
[dir=rtl] ._158obamb{animation:var(--ds-panel-enter-left,.25s cubic-bezier(0,.4,0,1) SlideIn100PercentLeft)}
|
|
7
|
+
[dir=rtl] ._158oeydr{animation:var(--ds-panel-exit-left,.2s cubic-bezier(0,.4,0,1) SlideOut100PercentLeft)}
|
|
4
8
|
._191wglyw{border-inline-start:none}._10fph9n0{justify-self:end}
|
|
5
9
|
._152timx3{inset-block-start:calc(var(--n_bnrM, 0px) + var(--n_tNvM, 0px))}
|
|
6
10
|
._16qs130s{box-shadow:var(--ds-shadow-overlay,0 8px 9pt #1e1f2126,0 0 1px #1e1f214f)}
|
|
@@ -33,8 +33,10 @@ const styles = {
|
|
|
33
33
|
border: "_191wglyw _16qs130s _1w6eia51 _scbpglyw",
|
|
34
34
|
scrollContainer: "_1reo1wug _18m91wug _4t3i1osq",
|
|
35
35
|
hidden: "_1e0cglyw",
|
|
36
|
-
entering: "
|
|
37
|
-
exiting: "
|
|
36
|
+
entering: "_y44v1nn1 _158obamb",
|
|
37
|
+
exiting: "_y44v14vv _158oeydr",
|
|
38
|
+
contentEntering: "_y44v11az",
|
|
39
|
+
contentExiting: "_y44v6gs0"
|
|
38
40
|
};
|
|
39
41
|
|
|
40
42
|
/**
|
|
@@ -211,6 +213,6 @@ export function Panel({
|
|
|
211
213
|
resizingCssVar: panelSplitterResizingVar,
|
|
212
214
|
position: "start"
|
|
213
215
|
}, /*#__PURE__*/React.createElement("div", {
|
|
214
|
-
className: ax([styles.scrollContainer])
|
|
216
|
+
className: ax([styles.scrollContainer, isMotionUpliftEnabled && state === 'entering' && styles.contentEntering, isMotionUpliftEnabled && state === 'exiting' && styles.contentExiting])
|
|
215
217
|
}, children)));
|
|
216
218
|
}
|
|
@@ -7,6 +7,7 @@ import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
|
7
7
|
import SidebarCollapseIcon from '@atlaskit/icon/core/sidebar-collapse';
|
|
8
8
|
import SidebarExpandIcon from '@atlaskit/icon/core/sidebar-expand';
|
|
9
9
|
import { useOpenLayerObserver } from '@atlaskit/layering/use-open-layer-observer';
|
|
10
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
10
11
|
import { useIsFhsEnabled } from '../../fhs-rollout/use-is-fhs-enabled';
|
|
11
12
|
import { IconButton } from '../../top-nav-items/themed/icon-button';
|
|
12
13
|
import { SideNavToggleButtonAttachRef } from './side-nav-toggle-button-attach-ref';
|
|
@@ -91,7 +92,7 @@ export const SideNavToggleButton = ({
|
|
|
91
92
|
isSideNavVisible: isSideNavExpanded
|
|
92
93
|
});
|
|
93
94
|
toggleVisibility();
|
|
94
|
-
if (isFhsEnabled) {
|
|
95
|
+
if (isFhsEnabled || fg('platform-dst-keep-desired-fhs-features')) {
|
|
95
96
|
openLayerObserver === null || openLayerObserver === void 0 ? void 0 : openLayerObserver.closeLayers();
|
|
96
97
|
}
|
|
97
98
|
}, [isFhsEnabled, isSideNavExpanded, onClick, openLayerObserver, toggleVisibility]);
|
|
@@ -133,7 +134,7 @@ export const SideNavToggleButton = ({
|
|
|
133
134
|
}, isSideNavExpanded ? /*#__PURE__*/React.createElement(SidebarCollapseIcon, props) : /*#__PURE__*/React.createElement(SidebarExpandIcon, props));
|
|
134
135
|
const isShortcutEnabled = useIsSideNavShortcutEnabled();
|
|
135
136
|
const tooltipProps = useMemo(() => {
|
|
136
|
-
if (isFhsEnabled) {
|
|
137
|
+
if (isFhsEnabled || fg('platform-dst-keep-desired-fhs-features')) {
|
|
137
138
|
return {
|
|
138
139
|
...toggleButtonTooltipOptions,
|
|
139
140
|
shortcut: isShortcutEnabled ? sideNavToggleTooltipKeyboardShortcut : undefined
|
|
@@ -2,6 +2,7 @@ import { useEffect } from 'react';
|
|
|
2
2
|
import { bind } from 'bind-event-listener';
|
|
3
3
|
import useStableRef from '@atlaskit/ds-lib/use-stable-ref';
|
|
4
4
|
import { useOpenLayerObserver } from '@atlaskit/layering/use-open-layer-observer';
|
|
5
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
5
6
|
import { useIsFhsEnabled } from '../../fhs-rollout/use-is-fhs-enabled';
|
|
6
7
|
import { useIsSideNavShortcutEnabled } from './use-is-side-nav-shortcut-enabled';
|
|
7
8
|
import { useToggleSideNav } from './use-toggle-side-nav';
|
|
@@ -20,7 +21,7 @@ export function useSideNavToggleKeyboardShortcut({
|
|
|
20
21
|
const canToggleWithShortcutStableRef = useStableRef(canToggleWithShortcut);
|
|
21
22
|
const isSideNavShortcutEnabled = useIsSideNavShortcutEnabled();
|
|
22
23
|
useEffect(() => {
|
|
23
|
-
if (!isFhsEnabled) {
|
|
24
|
+
if (!isFhsEnabled && !fg('platform-dst-keep-desired-fhs-features')) {
|
|
24
25
|
return;
|
|
25
26
|
}
|
|
26
27
|
if (!isSideNavShortcutEnabled) {
|
|
@@ -16,6 +16,7 @@ import invariant from 'tiny-invariant';
|
|
|
16
16
|
import { useId } from '@atlaskit/ds-lib/use-id';
|
|
17
17
|
import useStableRef from '@atlaskit/ds-lib/use-stable-ref';
|
|
18
18
|
import { useOpenLayerObserver } from '@atlaskit/layering/use-open-layer-observer';
|
|
19
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
19
20
|
import { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';
|
|
20
21
|
import { draggable } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
|
|
21
22
|
import { blockDraggingToIFrames } from '@atlaskit/pragmatic-drag-and-drop/element/block-dragging-to-iframes';
|
|
@@ -107,7 +108,7 @@ var MaybeTooltip = function MaybeTooltip(_ref2) {
|
|
|
107
108
|
children = _ref2.children,
|
|
108
109
|
testId = _ref2.testId;
|
|
109
110
|
var isFhsEnabled = useIsFhsEnabled();
|
|
110
|
-
if (tooltipContent && isFhsEnabled) {
|
|
111
|
+
if (tooltipContent && (isFhsEnabled || fg('platform-dst-keep-desired-fhs-features'))) {
|
|
111
112
|
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
112
113
|
testId: testId,
|
|
113
114
|
content: tooltipContent,
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
._nd5l1b6c{grid-area:main/aside/aside/aside}
|
|
2
|
-
.
|
|
3
|
-
.
|
|
2
|
+
._y44v11az{animation:var(--ds-panel-content-enter,.15s cubic-bezier(.4,1,.6,1) FadeIn0to100 .1s)}
|
|
3
|
+
._y44v14vv{animation:var(--ds-panel-exit-right,.2s cubic-bezier(0,.4,0,1) SlideOut100PercentRight)}
|
|
4
|
+
._y44v1nn1{animation:var(--ds-panel-enter-right,.25s cubic-bezier(0,.4,0,1) SlideIn100PercentRight)}
|
|
5
|
+
._y44v6gs0{animation:var(--ds-panel-content-exit,50ms cubic-bezier(.4,1,.6,1) FadeOut100to0)}
|
|
6
|
+
[dir=rtl] ._158obamb{animation:var(--ds-panel-enter-left,.25s cubic-bezier(0,.4,0,1) SlideIn100PercentLeft)}
|
|
7
|
+
[dir=rtl] ._158oeydr{animation:var(--ds-panel-exit-left,.2s cubic-bezier(0,.4,0,1) SlideOut100PercentLeft)}
|
|
4
8
|
._191wglyw{border-inline-start:none}._10fph9n0{justify-self:end}
|
|
5
9
|
._152timx3{inset-block-start:calc(var(--n_bnrM, 0px) + var(--n_tNvM, 0px))}
|
|
6
10
|
._16qs130s{box-shadow:var(--ds-shadow-overlay,0 8px 9pt #1e1f2126,0 0 1px #1e1f214f)}
|
|
@@ -35,8 +35,10 @@ var styles = {
|
|
|
35
35
|
border: "_191wglyw _16qs130s _1w6eia51 _scbpglyw",
|
|
36
36
|
scrollContainer: "_1reo1wug _18m91wug _4t3i1osq",
|
|
37
37
|
hidden: "_1e0cglyw",
|
|
38
|
-
entering: "
|
|
39
|
-
exiting: "
|
|
38
|
+
entering: "_y44v1nn1 _158obamb",
|
|
39
|
+
exiting: "_y44v14vv _158oeydr",
|
|
40
|
+
contentEntering: "_y44v11az",
|
|
41
|
+
contentExiting: "_y44v6gs0"
|
|
40
42
|
};
|
|
41
43
|
|
|
42
44
|
/**
|
|
@@ -216,6 +218,6 @@ export function Panel(_ref) {
|
|
|
216
218
|
resizingCssVar: panelSplitterResizingVar,
|
|
217
219
|
position: "start"
|
|
218
220
|
}, /*#__PURE__*/React.createElement("div", {
|
|
219
|
-
className: ax([styles.scrollContainer])
|
|
221
|
+
className: ax([styles.scrollContainer, isMotionUpliftEnabled && state === 'entering' && styles.contentEntering, isMotionUpliftEnabled && state === 'exiting' && styles.contentExiting])
|
|
220
222
|
}, children)));
|
|
221
223
|
}
|
|
@@ -11,6 +11,7 @@ import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
|
11
11
|
import SidebarCollapseIcon from '@atlaskit/icon/core/sidebar-collapse';
|
|
12
12
|
import SidebarExpandIcon from '@atlaskit/icon/core/sidebar-expand';
|
|
13
13
|
import { useOpenLayerObserver } from '@atlaskit/layering/use-open-layer-observer';
|
|
14
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
14
15
|
import { useIsFhsEnabled } from '../../fhs-rollout/use-is-fhs-enabled';
|
|
15
16
|
import { IconButton } from '../../top-nav-items/themed/icon-button';
|
|
16
17
|
import { SideNavToggleButtonAttachRef } from './side-nav-toggle-button-attach-ref';
|
|
@@ -98,7 +99,7 @@ export var SideNavToggleButton = function SideNavToggleButton(_ref) {
|
|
|
98
99
|
isSideNavVisible: isSideNavExpanded
|
|
99
100
|
});
|
|
100
101
|
toggleVisibility();
|
|
101
|
-
if (isFhsEnabled) {
|
|
102
|
+
if (isFhsEnabled || fg('platform-dst-keep-desired-fhs-features')) {
|
|
102
103
|
openLayerObserver === null || openLayerObserver === void 0 || openLayerObserver.closeLayers();
|
|
103
104
|
}
|
|
104
105
|
}, [isFhsEnabled, isSideNavExpanded, onClick, openLayerObserver, toggleVisibility]);
|
|
@@ -142,7 +143,7 @@ export var SideNavToggleButton = function SideNavToggleButton(_ref) {
|
|
|
142
143
|
};
|
|
143
144
|
var isShortcutEnabled = useIsSideNavShortcutEnabled();
|
|
144
145
|
var tooltipProps = useMemo(function () {
|
|
145
|
-
if (isFhsEnabled) {
|
|
146
|
+
if (isFhsEnabled || fg('platform-dst-keep-desired-fhs-features')) {
|
|
146
147
|
return _objectSpread(_objectSpread({}, toggleButtonTooltipOptions), {}, {
|
|
147
148
|
shortcut: isShortcutEnabled ? sideNavToggleTooltipKeyboardShortcut : undefined
|
|
148
149
|
});
|
|
@@ -2,6 +2,7 @@ import { useEffect } from 'react';
|
|
|
2
2
|
import { bind } from 'bind-event-listener';
|
|
3
3
|
import useStableRef from '@atlaskit/ds-lib/use-stable-ref';
|
|
4
4
|
import { useOpenLayerObserver } from '@atlaskit/layering/use-open-layer-observer';
|
|
5
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
5
6
|
import { useIsFhsEnabled } from '../../fhs-rollout/use-is-fhs-enabled';
|
|
6
7
|
import { useIsSideNavShortcutEnabled } from './use-is-side-nav-shortcut-enabled';
|
|
7
8
|
import { useToggleSideNav } from './use-toggle-side-nav';
|
|
@@ -19,7 +20,7 @@ export function useSideNavToggleKeyboardShortcut(_ref) {
|
|
|
19
20
|
var canToggleWithShortcutStableRef = useStableRef(canToggleWithShortcut);
|
|
20
21
|
var isSideNavShortcutEnabled = useIsSideNavShortcutEnabled();
|
|
21
22
|
useEffect(function () {
|
|
22
|
-
if (!isFhsEnabled) {
|
|
23
|
+
if (!isFhsEnabled && !fg('platform-dst-keep-desired-fhs-features')) {
|
|
23
24
|
return;
|
|
24
25
|
}
|
|
25
26
|
if (!isSideNavShortcutEnabled) {
|
|
@@ -17,7 +17,7 @@ type SideNavPanelSplitterProps = Omit<PanelSplitterProps, 'onDoubleClick' | 'too
|
|
|
17
17
|
*
|
|
18
18
|
* If the `isSideNavShortcutEnabled` prop is enabled on `<Root />`, the built-in keyboard shortcut will be displayed with the tooltip.
|
|
19
19
|
*
|
|
20
|
-
* Only used if `useIsFhsEnabled` is
|
|
20
|
+
* Only used if `platform-dst-keep-desired-fhs-features` or `useIsFhsEnabled` is enabled.
|
|
21
21
|
*/
|
|
22
22
|
tooltipContent?: PanelSplitterProps['tooltipContent'];
|
|
23
23
|
};
|
|
@@ -65,7 +65,8 @@ export declare function Root({ children, xcss, UNSAFE_dangerouslyHoistSlotSizes,
|
|
|
65
65
|
* is pressed, before the SideNav is toggled. You can use this to conditionally disable the shortcut based on your
|
|
66
66
|
* your own custom checks, e.g. if there is a legacy dialog open.
|
|
67
67
|
*
|
|
68
|
-
* Note: The built-in keyboard shortcut is behind `
|
|
68
|
+
* Note: The built-in keyboard shortcut is behind the `platform-dst-keep-desired-fhs-features`
|
|
69
|
+
* feature gate, or `useIsFhsEnabled` for backwards compatibility.
|
|
69
70
|
*/
|
|
70
71
|
isSideNavShortcutEnabled?: boolean;
|
|
71
72
|
}): JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/navigation-system",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.14.0",
|
|
4
4
|
"description": "The latest navigation system for Atlassian apps.",
|
|
5
5
|
"repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
|
|
6
6
|
"author": "Atlassian Pty Ltd",
|
|
@@ -70,11 +70,11 @@
|
|
|
70
70
|
"@atlaskit/primitives": "^22.2.0",
|
|
71
71
|
"@atlaskit/react-compiler-gating": "^0.2.0",
|
|
72
72
|
"@atlaskit/side-nav-items": "^2.3.0",
|
|
73
|
-
"@atlaskit/tokens": "^16.
|
|
73
|
+
"@atlaskit/tokens": "^16.7.0",
|
|
74
74
|
"@atlaskit/tooltip": "^24.0.0",
|
|
75
75
|
"@atlaskit/visually-hidden": "^4.2.0",
|
|
76
76
|
"@babel/runtime": "^7.0.0",
|
|
77
|
-
"@compiled/react": "^1.0.
|
|
77
|
+
"@compiled/react": "^1.0.2",
|
|
78
78
|
"bind-event-listener": "^3.0.0",
|
|
79
79
|
"raf-schd": "^4.0.3",
|
|
80
80
|
"tiny-invariant": "^1.2.0"
|
|
@@ -134,6 +134,9 @@
|
|
|
134
134
|
"navx-full-height-sidebar": {
|
|
135
135
|
"type": "boolean"
|
|
136
136
|
},
|
|
137
|
+
"platform-dst-keep-desired-fhs-features": {
|
|
138
|
+
"type": "boolean"
|
|
139
|
+
},
|
|
137
140
|
"platform_dst_button_chevron_sizing": {
|
|
138
141
|
"type": "boolean"
|
|
139
142
|
},
|