@atlaskit/navigation-system 9.1.2 → 9.2.1

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,20 @@
1
1
  # @atlassian/navigation-system
2
2
 
3
+ ## 9.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`ca5f7e8e2a556`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ca5f7e8e2a556) -
8
+ Dev-only dependencies have been added.
9
+
10
+ ## 9.2.0
11
+
12
+ ### Minor Changes
13
+
14
+ - [`b46825ac6c66c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b46825ac6c66c) -
15
+ Cleans up the `platform_dst_nav4_top_nav_increase_height` feature gate. The top nav height is now
16
+ always 56px when the full-height sidebar is enabled.
17
+
3
18
  ## 9.1.2
4
19
 
5
20
  ### Patch Changes
@@ -104,6 +104,17 @@ The main difference between aside, panel and modal dialog is their behaviours:
104
104
  decision or completing an action, before they can return to their primary task.
105
105
  - Don’t use aside for new experiences. It is planned for deprecation.
106
106
 
107
+ ## Accessibility
108
+
109
+ - Always place slots in this order as direct children of the root: banner, top nav, side nav, main,
110
+ aside, panel. This determines the keyboard tab order, screen reader reading order, and skip link
111
+ order.
112
+ - Provide a unique, meaningful `label` for side nav, aside, panel, and top nav end. The label is
113
+ exposed as the landmark's accessible name. Don't repeat the landmark's role in the label.
114
+ - Slots provide landmark roles automatically. Don't add or duplicate landmark roles inside them.
115
+ - Use custom skip links sparingly. Too many skip links makes the skip links menu noisy. Consider the
116
+ utility of each one before adding it.
117
+
107
118
  ## Best practices
108
119
 
109
120
  ### Design using grid in the main area
@@ -40,6 +40,17 @@ The current navigation has specific menu items that are similar across apps. Mak
40
40
  navigation follows Atlassian patterns consistently. For all the guidelines, see
41
41
  [navigation resources (Atlassians only)](https://hello.atlassian.net/wiki/spaces/navx/pages/5104144812).
42
42
 
43
+ ## Accessibility
44
+
45
+ - Always provide a meaningful `label` for every top nav item. The label becomes the accessible name
46
+ and the visible tooltip.
47
+ - When a top nav item triggers a popup, menu, or dialog, pass the relevant `aria-controls`,
48
+ `aria-expanded`, and `aria-haspopup` props from that component to the top nav item.
49
+ - Use the `shortcut` prop to surface a keyboard shortcut in the tooltip when one exists. This makes
50
+ the shortcut discoverable for keyboard users.
51
+ - Use `isSelected` to indicate when a corresponding popup or panel is open. This exposes the state
52
+ to assistive technology.
53
+
43
54
  ## Best practices
44
55
 
45
56
  ### Use the top nav items provided
@@ -20,7 +20,6 @@ var _analyticsNext = require("@atlaskit/analytics-next");
20
20
  var _mergeRefs = _interopRequireDefault(require("@atlaskit/ds-lib/merge-refs"));
21
21
  var _useStableRef = _interopRequireDefault(require("@atlaskit/ds-lib/use-stable-ref"));
22
22
  var _openLayerObserver = require("@atlaskit/layering/experimental/open-layer-observer");
23
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
24
23
  var _adapter = require("@atlaskit/pragmatic-drag-and-drop/element/adapter");
25
24
  var _responsive = require("@atlaskit/primitives/responsive");
26
25
  var _useSkipLinkInternal = require("../../../context/skip-links/use-skip-link-internal");
@@ -358,23 +357,14 @@ function SideNavInternal(_ref) {
358
357
 
359
358
  // Sync the visibility in context (provided in `<Root>`) with the local `defaultCollapsed` prop provided to `SideNav`
360
359
  // after SSR hydration. This should only run once, after the initial render on the client.
361
- if ((0, _platformFeatureFlags.fg)('navx-4418-fix-effect-state-updates-in-gsn')) {
362
- (0, _react.startTransition)(function () {
363
- setSideNavState({
364
- desktop: initialDefaultCollapsed ? 'collapsed' : 'expanded',
365
- mobile: 'collapsed',
366
- flyout: 'closed',
367
- lastTrigger: null
368
- });
369
- });
370
- } else {
360
+ (0, _react.startTransition)(function () {
371
361
  setSideNavState({
372
362
  desktop: initialDefaultCollapsed ? 'collapsed' : 'expanded',
373
363
  mobile: 'collapsed',
374
364
  flyout: 'closed',
375
365
  lastTrigger: null
376
366
  });
377
- }
367
+ });
378
368
  }, [initialDefaultCollapsed, setSideNavState, sideNavState]);
379
369
  var handleExpand = (0, _react.useCallback)(function (_ref2) {
380
370
  var screen = _ref2.screen,
@@ -61,8 +61,7 @@ function TopNavOld(_ref) {
61
61
  label: skipLinkLabel,
62
62
  isHidden: (0, _platformFeatureFlags.fg)('platform_dst_nav4_skip_link_a11y_1')
63
63
  });
64
- var hasIncreasedDefaultHeight = isFhsEnabled && (0, _platformFeatureFlags.fg)('platform_dst_nav4_top_nav_increase_height');
65
- var height = heightProp !== null && heightProp !== void 0 ? heightProp : hasIncreasedDefaultHeight ? 56 : 48;
64
+ var height = heightProp !== null && heightProp !== void 0 ? heightProp : isFhsEnabled ? 56 : 48;
66
65
  var customTheme = (0, _useCustomTheme.useCustomTheme)(customThemeConfig);
67
66
  var _useSideNavVisibility = (0, _useSideNavVisibility3.useSideNavVisibility)(),
68
67
  isExpandedOnDesktop = _useSideNavVisibility.isExpandedOnDesktop;
@@ -114,8 +113,7 @@ function TopNavNew(_ref2) {
114
113
  label: skipLinkLabel,
115
114
  isHidden: (0, _platformFeatureFlags.fg)('platform_dst_nav4_skip_link_a11y_1')
116
115
  });
117
- var hasIncreasedDefaultHeight = isFhsEnabled && (0, _platformFeatureFlags.fg)('platform_dst_nav4_top_nav_increase_height');
118
- var height = heightProp !== null && heightProp !== void 0 ? heightProp : hasIncreasedDefaultHeight ? 56 : 48;
116
+ var height = heightProp !== null && heightProp !== void 0 ? heightProp : isFhsEnabled ? 56 : 48;
119
117
  var customTheme = (0, _useCustomThemeNew.useCustomThemeNew)(customThemeConfig);
120
118
  var hasDefaultBackground = customTheme.isEnabled ? customTheme.hasDefaultBackground : true;
121
119
  var _useSideNavVisibility2 = (0, _useSideNavVisibility3.useSideNavVisibility)(),
@@ -9,7 +9,6 @@ import { useAnalyticsEvents } from '@atlaskit/analytics-next';
9
9
  import mergeRefs from '@atlaskit/ds-lib/merge-refs';
10
10
  import useStableRef from '@atlaskit/ds-lib/use-stable-ref';
11
11
  import { OpenLayerObserverNamespaceProvider, useOpenLayerObserver } from '@atlaskit/layering/experimental/open-layer-observer';
12
- import { fg } from '@atlaskit/platform-feature-flags';
13
12
  import { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
14
13
  import { media } from '@atlaskit/primitives/responsive';
15
14
  import { useSkipLinkInternal } from '../../../context/skip-links/use-skip-link-internal';
@@ -339,23 +338,14 @@ function SideNavInternal({
339
338
 
340
339
  // Sync the visibility in context (provided in `<Root>`) with the local `defaultCollapsed` prop provided to `SideNav`
341
340
  // after SSR hydration. This should only run once, after the initial render on the client.
342
- if (fg('navx-4418-fix-effect-state-updates-in-gsn')) {
343
- startTransition(() => {
344
- setSideNavState({
345
- desktop: initialDefaultCollapsed ? 'collapsed' : 'expanded',
346
- mobile: 'collapsed',
347
- flyout: 'closed',
348
- lastTrigger: null
349
- });
350
- });
351
- } else {
341
+ startTransition(() => {
352
342
  setSideNavState({
353
343
  desktop: initialDefaultCollapsed ? 'collapsed' : 'expanded',
354
344
  mobile: 'collapsed',
355
345
  flyout: 'closed',
356
346
  lastTrigger: null
357
347
  });
358
- }
348
+ });
359
349
  }, [initialDefaultCollapsed, setSideNavState, sideNavState]);
360
350
  const handleExpand = useCallback(({
361
351
  screen,
@@ -54,8 +54,7 @@ function TopNavOld({
54
54
  label: skipLinkLabel,
55
55
  isHidden: fg('platform_dst_nav4_skip_link_a11y_1')
56
56
  });
57
- const hasIncreasedDefaultHeight = isFhsEnabled && fg('platform_dst_nav4_top_nav_increase_height');
58
- const height = heightProp !== null && heightProp !== void 0 ? heightProp : hasIncreasedDefaultHeight ? 56 : 48;
57
+ const height = heightProp !== null && heightProp !== void 0 ? heightProp : isFhsEnabled ? 56 : 48;
59
58
  const customTheme = useCustomTheme(customThemeConfig);
60
59
  const {
61
60
  isExpandedOnDesktop
@@ -108,8 +107,7 @@ function TopNavNew({
108
107
  label: skipLinkLabel,
109
108
  isHidden: fg('platform_dst_nav4_skip_link_a11y_1')
110
109
  });
111
- const hasIncreasedDefaultHeight = isFhsEnabled && fg('platform_dst_nav4_top_nav_increase_height');
112
- const height = heightProp !== null && heightProp !== void 0 ? heightProp : hasIncreasedDefaultHeight ? 56 : 48;
110
+ const height = heightProp !== null && heightProp !== void 0 ? heightProp : isFhsEnabled ? 56 : 48;
113
111
  const customTheme = useCustomThemeNew(customThemeConfig);
114
112
  const hasDefaultBackground = customTheme.isEnabled ? customTheme.hasDefaultBackground : true;
115
113
  const {
@@ -13,7 +13,6 @@ import { useAnalyticsEvents } from '@atlaskit/analytics-next';
13
13
  import mergeRefs from '@atlaskit/ds-lib/merge-refs';
14
14
  import useStableRef from '@atlaskit/ds-lib/use-stable-ref';
15
15
  import { OpenLayerObserverNamespaceProvider, useOpenLayerObserver } from '@atlaskit/layering/experimental/open-layer-observer';
16
- import { fg } from '@atlaskit/platform-feature-flags';
17
16
  import { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
18
17
  import { media } from '@atlaskit/primitives/responsive';
19
18
  import { useSkipLinkInternal } from '../../../context/skip-links/use-skip-link-internal';
@@ -348,23 +347,14 @@ function SideNavInternal(_ref) {
348
347
 
349
348
  // Sync the visibility in context (provided in `<Root>`) with the local `defaultCollapsed` prop provided to `SideNav`
350
349
  // after SSR hydration. This should only run once, after the initial render on the client.
351
- if (fg('navx-4418-fix-effect-state-updates-in-gsn')) {
352
- startTransition(function () {
353
- setSideNavState({
354
- desktop: initialDefaultCollapsed ? 'collapsed' : 'expanded',
355
- mobile: 'collapsed',
356
- flyout: 'closed',
357
- lastTrigger: null
358
- });
359
- });
360
- } else {
350
+ startTransition(function () {
361
351
  setSideNavState({
362
352
  desktop: initialDefaultCollapsed ? 'collapsed' : 'expanded',
363
353
  mobile: 'collapsed',
364
354
  flyout: 'closed',
365
355
  lastTrigger: null
366
356
  });
367
- }
357
+ });
368
358
  }, [initialDefaultCollapsed, setSideNavState, sideNavState]);
369
359
  var handleExpand = useCallback(function (_ref2) {
370
360
  var screen = _ref2.screen,
@@ -54,8 +54,7 @@ function TopNavOld(_ref) {
54
54
  label: skipLinkLabel,
55
55
  isHidden: fg('platform_dst_nav4_skip_link_a11y_1')
56
56
  });
57
- var hasIncreasedDefaultHeight = isFhsEnabled && fg('platform_dst_nav4_top_nav_increase_height');
58
- var height = heightProp !== null && heightProp !== void 0 ? heightProp : hasIncreasedDefaultHeight ? 56 : 48;
57
+ var height = heightProp !== null && heightProp !== void 0 ? heightProp : isFhsEnabled ? 56 : 48;
59
58
  var customTheme = useCustomTheme(customThemeConfig);
60
59
  var _useSideNavVisibility = useSideNavVisibility(),
61
60
  isExpandedOnDesktop = _useSideNavVisibility.isExpandedOnDesktop;
@@ -107,8 +106,7 @@ function TopNavNew(_ref2) {
107
106
  label: skipLinkLabel,
108
107
  isHidden: fg('platform_dst_nav4_skip_link_a11y_1')
109
108
  });
110
- var hasIncreasedDefaultHeight = isFhsEnabled && fg('platform_dst_nav4_top_nav_increase_height');
111
- var height = heightProp !== null && heightProp !== void 0 ? heightProp : hasIncreasedDefaultHeight ? 56 : 48;
109
+ var height = heightProp !== null && heightProp !== void 0 ? heightProp : isFhsEnabled ? 56 : 48;
112
110
  var customTheme = useCustomThemeNew(customThemeConfig);
113
111
  var hasDefaultBackground = customTheme.isEnabled ? customTheme.hasDefaultBackground : true;
114
112
  var _useSideNavVisibility2 = useSideNavVisibility(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/navigation-system",
3
- "version": "9.1.2",
3
+ "version": "9.2.1",
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",
@@ -76,7 +76,7 @@
76
76
  "@atlaskit/button": "^23.11.0",
77
77
  "@atlaskit/css": "^0.19.0",
78
78
  "@atlaskit/ds-lib": "^7.0.0",
79
- "@atlaskit/icon": "^34.3.0",
79
+ "@atlaskit/icon": "^34.4.0",
80
80
  "@atlaskit/layering": "^3.7.0",
81
81
  "@atlaskit/logo": "^20.1.0",
82
82
  "@atlaskit/platform-feature-flags": "^1.1.0",
@@ -106,12 +106,14 @@
106
106
  "@atlaskit/banner": "^14.1.0",
107
107
  "@atlaskit/breadcrumbs": "^16.1.0",
108
108
  "@atlaskit/dropdown-menu": "^16.8.0",
109
+ "@atlaskit/flag": "^17.11.0",
109
110
  "@atlaskit/form": "^15.5.0",
110
111
  "@atlaskit/heading": "^5.4.0",
112
+ "@atlaskit/inline-dialog": "^18.1.0",
111
113
  "@atlaskit/link": "^3.4.0",
112
114
  "@atlaskit/lozenge": "^13.8.0",
113
115
  "@atlaskit/menu": "^8.5.0",
114
- "@atlaskit/modal-dialog": "^14.18.0",
116
+ "@atlaskit/modal-dialog": "^15.0.0",
115
117
  "@atlaskit/onboarding": "^14.6.0",
116
118
  "@atlaskit/page-header": "^12.2.0",
117
119
  "@atlaskit/page-layout": "^4.3.0",
@@ -119,11 +121,13 @@
119
121
  "@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^2.1.0",
120
122
  "@atlaskit/select": "^21.10.0",
121
123
  "@atlaskit/skeleton": "^2.1.0",
124
+ "@atlaskit/spotlight": "^0.14.0",
122
125
  "@atlaskit/textfield": "^8.3.0",
126
+ "@atlaskit/top-layer": "^0.6.0",
123
127
  "@atlassian/feature-flags-test-utils": "^1.0.0",
124
128
  "@atlassian/gemini": "^1.44.0",
125
129
  "@atlassian/react-compiler-gating": "workspace:^",
126
- "@atlassian/search-dialog": "^10.1.0",
130
+ "@atlassian/search-dialog": "^10.2.0",
127
131
  "@atlassian/ssr-tests": "workspace:^",
128
132
  "@atlassian/test-utils": "^1.0.0",
129
133
  "@atlassian/testing-library": "^0.5.0",
@@ -153,8 +157,9 @@
153
157
  }
154
158
  },
155
159
  "platform-feature-flags": {
156
- "platform_dst_nav4_top_nav_increase_height": {
157
- "type": "boolean"
160
+ "platform-dst-top-layer": {
161
+ "type": "boolean",
162
+ "referenceOnly": true
158
163
  },
159
164
  "platform-component-visual-refresh": {
160
165
  "type": "boolean",
@@ -172,9 +177,6 @@
172
177
  "platform_dst_nav4_flyout_menu_slots_close_button": {
173
178
  "type": "boolean"
174
179
  },
175
- "navx-4418-fix-effect-state-updates-in-gsn": {
176
- "type": "boolean"
177
- },
178
180
  "platform_dst_nav4_custom_theming_fhs_1": {
179
181
  "type": "boolean"
180
182
  },