@atlaskit/atlassian-navigation 4.10.0 → 4.10.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,13 @@
1
1
  # @atlaskit/atlassian-navigation
2
2
 
3
+ ## 4.10.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#181731](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/181731)
8
+ [`910a3ef2381d3`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/910a3ef2381d3) -
9
+ Add isSSRPlaceholderEnabled prop for side and top nav v3
10
+
3
11
  ## 4.10.0
4
12
 
5
13
  ### Minor Changes
@@ -8,7 +8,6 @@ exports.default = exports.AtlassianNavigation = void 0;
8
8
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
9
  var _react = require("@emotion/react");
10
10
  var _analyticsNamespacedContext = require("@atlaskit/analytics-namespaced-context");
11
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
12
11
  var _colors = require("@atlaskit/theme/colors");
13
12
  var _constants = require("../../common/constants");
14
13
  var _theme = require("../../theme");
@@ -90,7 +89,9 @@ var AtlassianNavigation = exports.AtlassianNavigation = function AtlassianNaviga
90
89
  theme = _props$theme === void 0 ? _theme.defaultTheme : _props$theme,
91
90
  testId = props.testId,
92
91
  _props$isServer = props.isServer,
93
- isServer = _props$isServer === void 0 ? false : _props$isServer;
92
+ isServer = _props$isServer === void 0 ? false : _props$isServer,
93
+ _props$isSSRPlacehold = props.isSSRPlaceholderEnabled,
94
+ isSSRPlaceholderEnabled = _props$isSSRPlacehold === void 0 ? false : _props$isSSRPlacehold;
94
95
  return (0, _react.jsx)(_theme.ThemeProvider, {
95
96
  value: theme
96
97
  }, (0, _react.jsx)(_analyticsNamespacedContext.NavigationAnalyticsContext, {
@@ -102,9 +103,9 @@ var AtlassianNavigation = exports.AtlassianNavigation = function AtlassianNaviga
102
103
  "data-testid": testId && "".concat(testId, "-header"),
103
104
  role: "banner",
104
105
  "data-vc": "atlassian-navigation".concat(isServer ? '-ssr' : '')
105
- }, isServer && (0, _platformFeatureFlags.fg)('add_ssr_placeholder_replacements_to_nin_and_nav') && {
106
+ }, isServer && isSSRPlaceholderEnabled && {
106
107
  'data-ssr-placeholder': 'atlassian-navigation-placeholder'
107
- }, !isServer && (0, _platformFeatureFlags.fg)('add_ssr_placeholder_replacements_to_nin_and_nav') && {
108
+ }, !isServer && isSSRPlaceholderEnabled && {
108
109
  'data-ssr-placeholder-replace': 'atlassian-navigation-placeholder'
109
110
  }), (0, _react.jsx)("nav", {
110
111
  css: leftStyles,
@@ -6,7 +6,6 @@ import _extends from "@babel/runtime/helpers/extends";
6
6
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
7
7
  import { css, jsx } from '@emotion/react';
8
8
  import { NavigationAnalyticsContext } from '@atlaskit/analytics-namespaced-context';
9
- import { fg } from '@atlaskit/platform-feature-flags';
10
9
  import { N30 } from '@atlaskit/theme/colors';
11
10
  import { HORIZONTAL_GLOBAL_NAV_HEIGHT } from '../../common/constants';
12
11
  import { defaultTheme, ThemeProvider } from '../../theme';
@@ -79,7 +78,8 @@ export const AtlassianNavigation = props => {
79
78
  moreLabel = '…',
80
79
  theme = defaultTheme,
81
80
  testId,
82
- isServer = false
81
+ isServer = false,
82
+ isSSRPlaceholderEnabled = false
83
83
  } = props;
84
84
  return jsx(ThemeProvider, {
85
85
  value: theme
@@ -92,9 +92,9 @@ export const AtlassianNavigation = props => {
92
92
  "data-testid": testId && `${testId}-header`,
93
93
  role: "banner",
94
94
  "data-vc": `atlassian-navigation${isServer ? '-ssr' : ''}`
95
- }, isServer && fg('add_ssr_placeholder_replacements_to_nin_and_nav') && {
95
+ }, isServer && isSSRPlaceholderEnabled && {
96
96
  'data-ssr-placeholder': 'atlassian-navigation-placeholder'
97
- }, !isServer && fg('add_ssr_placeholder_replacements_to_nin_and_nav') && {
97
+ }, !isServer && isSSRPlaceholderEnabled && {
98
98
  'data-ssr-placeholder-replace': 'atlassian-navigation-placeholder'
99
99
  }), jsx("nav", {
100
100
  css: leftStyles,
@@ -6,7 +6,6 @@ import _extends from "@babel/runtime/helpers/extends";
6
6
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
7
7
  import { css, jsx } from '@emotion/react';
8
8
  import { NavigationAnalyticsContext } from '@atlaskit/analytics-namespaced-context';
9
- import { fg } from '@atlaskit/platform-feature-flags';
10
9
  import { N30 } from '@atlaskit/theme/colors';
11
10
  import { HORIZONTAL_GLOBAL_NAV_HEIGHT } from '../../common/constants';
12
11
  import { defaultTheme, ThemeProvider } from '../../theme';
@@ -82,7 +81,9 @@ export var AtlassianNavigation = function AtlassianNavigation(props) {
82
81
  theme = _props$theme === void 0 ? defaultTheme : _props$theme,
83
82
  testId = props.testId,
84
83
  _props$isServer = props.isServer,
85
- isServer = _props$isServer === void 0 ? false : _props$isServer;
84
+ isServer = _props$isServer === void 0 ? false : _props$isServer,
85
+ _props$isSSRPlacehold = props.isSSRPlaceholderEnabled,
86
+ isSSRPlaceholderEnabled = _props$isSSRPlacehold === void 0 ? false : _props$isSSRPlacehold;
86
87
  return jsx(ThemeProvider, {
87
88
  value: theme
88
89
  }, jsx(NavigationAnalyticsContext, {
@@ -94,9 +95,9 @@ export var AtlassianNavigation = function AtlassianNavigation(props) {
94
95
  "data-testid": testId && "".concat(testId, "-header"),
95
96
  role: "banner",
96
97
  "data-vc": "atlassian-navigation".concat(isServer ? '-ssr' : '')
97
- }, isServer && fg('add_ssr_placeholder_replacements_to_nin_and_nav') && {
98
+ }, isServer && isSSRPlaceholderEnabled && {
98
99
  'data-ssr-placeholder': 'atlassian-navigation-placeholder'
99
- }, !isServer && fg('add_ssr_placeholder_replacements_to_nin_and_nav') && {
100
+ }, !isServer && isSSRPlaceholderEnabled && {
100
101
  'data-ssr-placeholder-replace': 'atlassian-navigation-placeholder'
101
102
  }), jsx("nav", {
102
103
  css: leftStyles,
@@ -72,6 +72,10 @@ export interface AtlassianNavigationProps {
72
72
  * Whether nav is rendered on the server.
73
73
  */
74
74
  isServer?: boolean;
75
+ /**
76
+ * Whether to enable SSR placeholder replacement.
77
+ */
78
+ isSSRPlaceholderEnabled?: boolean;
75
79
  }
76
80
  export interface NavigationSkeletonProps {
77
81
  /**
@@ -72,6 +72,10 @@ export interface AtlassianNavigationProps {
72
72
  * Whether nav is rendered on the server.
73
73
  */
74
74
  isServer?: boolean;
75
+ /**
76
+ * Whether to enable SSR placeholder replacement.
77
+ */
78
+ isSSRPlaceholderEnabled?: boolean;
75
79
  }
76
80
  export interface NavigationSkeletonProps {
77
81
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/atlassian-navigation",
3
- "version": "4.10.0",
3
+ "version": "4.10.1",
4
4
  "description": "A horizontal navigation component for Atlassian products.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -54,7 +54,7 @@
54
54
  "@atlaskit/popup": "^1.30.0",
55
55
  "@atlaskit/primitives": "^13.3.0",
56
56
  "@atlaskit/theme": "^14.0.0",
57
- "@atlaskit/tokens": "^2.4.0",
57
+ "@atlaskit/tokens": "^2.5.0",
58
58
  "@atlaskit/tooltip": "^19.0.0",
59
59
  "@atlaskit/width-detector": "^4.3.0",
60
60
  "@babel/runtime": "^7.0.0",
@@ -107,9 +107,6 @@
107
107
  "platform-feature-flags": {
108
108
  "platform-component-visual-refresh": {
109
109
  "type": "boolean"
110
- },
111
- "add_ssr_placeholder_replacements_to_nin_and_nav": {
112
- "type": "boolean"
113
110
  }
114
111
  }
115
112
  }