@atlaskit/side-navigation 1.2.8 → 1.2.9

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,11 @@
1
1
  # @atlaskit/side-navigation
2
2
 
3
+ ## 1.2.9
4
+
5
+ ### Patch Changes
6
+
7
+ - [`85ca75319b1`](https://bitbucket.org/atlassian/atlassian-frontend/commits/85ca75319b1) - Move side-navigation docs to Constellation (atlassian.design)
8
+
3
9
  ## 1.2.8
4
10
 
5
11
  ### Patch Changes
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Side Navigation
2
2
 
3
- The new side navigation experience used in Atlassian products.
3
+ A side navigation experience used in Atlassian products.
4
4
 
5
5
  ## Installation
6
6
 
@@ -10,7 +10,7 @@ yarn add @atlaskit/side-navigation
10
10
 
11
11
  ## Usage
12
12
 
13
- Detailed docs and example usage can be found [here](https://atlaskit.atlassian.com/packages/navigation/side-navigation).
13
+ Detailed docs and example usage can be found [here](https://atlassian.design/components/side-navigation).
14
14
 
15
- To add a top navigation, use [@atlaskit/atlassian-navigation](https://atlaskit.atlassian.com/packages/navigation/atlassian-navigation)
15
+ To add a top navigation, use [@atlaskit/atlassian-navigation](https://atlassian.design/components/atlassian-navigation)
16
16
  To control the layout of these navigation elements and add expand/collapse functionality to `side-navigation`, use [@atlaskit/page-layout](https://atlaskit.atlassian.com/packages/design-system/page-layout).
@@ -0,0 +1,97 @@
1
+ ---
2
+ order: 0
3
+ ---
4
+
5
+ import ButtonItemExample from '../../examples/constellation/button-item';
6
+ import ContainerExample from '../../examples/constellation/container';
7
+ import ContentExample from '../../examples/constellation/content';
8
+ import CustomItemExample from '../../examples/constellation/custom-item';
9
+ import DefaultExample from '../../examples/constellation/default';
10
+ import GoBackExample from '../../examples/constellation/go-back';
11
+ import HeaderAndFooterExample from '../../examples/constellation/header-and-footer';
12
+ import LinkItemExample from '../../examples/constellation/link-item';
13
+ import LoadingExample from '../../examples/constellation/loading';
14
+ import NestedExample from '../../examples/constellation/nested';
15
+ import SectionExample from '../../examples/constellation/section';
16
+
17
+ ## Default
18
+
19
+ A side navigation example showing all [components](#side-navigation-components) and [items](#side-navigation-items) composed together.
20
+
21
+ <Example Component={DefaultExample} packageName="@atlaskit/side-navigation" />
22
+
23
+ ## Side navigation components
24
+
25
+ ### Container
26
+
27
+ Uses 100% of its parent's height and width, so make sure to place it into an element with explicit values set.<br />
28
+ **Minimum width of 240px.**
29
+
30
+ <Example Component={ContainerExample} packageName="@atlaskit/side-navigation"/>
31
+
32
+ ### Header and footer
33
+
34
+ You can customise header and footer using `NavigationHeader` and `NavigationFooter`.
35
+
36
+ <Example Component={HeaderAndFooterExample} packageName="@atlaskit/side-navigation"/>
37
+
38
+ ### Content
39
+
40
+ Used as the container for [navigation items](#side-navigation-items). For nested views see the following example.
41
+
42
+ <Example Component={ContentExample} packageName="@atlaskit/side-navigation"/>
43
+
44
+ ### Section
45
+
46
+ Used to separate items into sections. Using the `title` prop makes a section implicitly group the items for screen readers with no additional work required.
47
+
48
+ <Example Component={SectionExample} packageName="@atlaskit/side-navigation"/>
49
+
50
+ ### Nested navigation
51
+
52
+ The container for navigation items with nested views is `NestableNavigationContent`.
53
+
54
+ <Example Component={NestedExample} packageName="@atlaskit/side-navigation"/>
55
+
56
+ ## Side navigation items
57
+
58
+ Granular items that can be rendered as part of the navigation experience.<br />
59
+ The `Section` component **must** be used to ensure consistent spacing around blocks of items.
60
+
61
+ ### Go back item
62
+
63
+ This item is used to provide a customized "go back" button in nested navigations.
64
+
65
+ <Example Component={GoBackExample} packageName="@atlaskit/side-navigation"/>
66
+
67
+ ### Link item
68
+
69
+ Renders an item wrapped in an anchor tag, useful when you have an item that should change routes using native browser navigation.
70
+
71
+ For custom SPA transitions use a custom item with the respective router logic, following the next example.
72
+
73
+ <Example Component={LinkItemExample} packageName="@atlaskit/side-navigation"/>
74
+
75
+ ### Custom item
76
+
77
+ Handles use cases where a custom router link component is needed.
78
+
79
+ The custom component receives all overflow props passed to the custom item component, as well as when using TypeScript will add the custom component props to the root component props type for type safety.
80
+
81
+ <Example Component={CustomItemExample} packageName="@atlaskit/side-navigation"/>
82
+
83
+ ### Button item
84
+
85
+ Renders an item wrapped in a button tag, used primarily when an action does something other than changing routes.
86
+
87
+ <Example Component={ButtonItemExample} packageName="@atlaskit/side-navigation"/>
88
+
89
+ ### Heading item
90
+
91
+ Available for advanced use cases, for most situations providing a `title` to `Section` should be enough.
92
+
93
+ ## Loading
94
+
95
+ Use loading skeletons to reduce the perceived loading time.
96
+
97
+ <Example Component={LoadingExample} packageName="@atlaskit/side-navigation"/>
@@ -0,0 +1,30 @@
1
+ import SideNavigationProps from '!!extract-react-types-loader!../../src/components/SideNavigation'
2
+ import HeaderProps from '!!extract-react-types-loader!../../src/components/Header'
3
+ import FooterProps from '!!extract-react-types-loader!../../src/components/Footer'
4
+ import NavigationContentProps from '!!extract-react-types-loader!../../src/components/NavigationContent'
5
+ import NestableNavigationContentProps from '!!extract-react-types-loader!../../src/components/NestableNavigationContent'
6
+ import SectionProps from '!!extract-react-types-loader!../../src/components/Section'
7
+
8
+ ### Navigation props
9
+
10
+ <PropsTable heading="" props={SideNavigationProps}/>
11
+
12
+ ### Header props
13
+
14
+ <PropsTable heading="" props={HeaderProps}/>
15
+
16
+ ### Footer props
17
+
18
+ <PropsTable heading="" props={FooterProps}/>
19
+
20
+ ### Content props
21
+
22
+ <PropsTable heading="" props={NavigationContentProps}/>
23
+
24
+ ### Nestable content props
25
+
26
+ <PropsTable heading="" props={NestableNavigationContentProps}/>
27
+
28
+ ### Section props
29
+
30
+ <PropsTable heading="" props={SectionProps}/>
@@ -0,0 +1,24 @@
1
+ ---
2
+ order: 2
3
+ ---
4
+
5
+ import DoDont from '@atlaskit/gatsby-theme-brisk/src/components/do-dont';
6
+ import buttonConciseDo from './images/button-concise-do.png';
7
+ import buttonConciseDont from './images/button-concise-dont.png';
8
+ import buttonCapitalizationDo from './images/button-capitalization-do.png';
9
+ import buttonCapitalizationDont from './images/button-capitalization-dont.png';
10
+ import buttonActionDo from './images/button-action-do.png';
11
+ import buttonActionDont from './images/button-action-dont.png';
12
+
13
+ ## Usage
14
+
15
+ ### Loading states
16
+
17
+ Occasionally it's necessary to load some of the side navigation content asynchronously. There are a few things to take care of
18
+
19
+ * Only use skeletons when you're quite certain of what the loaded state will look like. Most items that would appear in side navigation are probably fine to use with skeletons, for example, `@atlaskit/tree`.
20
+ * When transitioning from loading skeleton to loaded items, try to ensure the jump does not look janky - use the equivalent skeleton item that is appropriate and be careful of things jumping around by a few pixels. We should be striving for UI that feels __stable__, which means it doesn't jump around when content loads.
21
+ * Ensure loading does not take too long - try to anticipate if a user will look at your menu via hover events and the like, and pre-load the data as soon as possible.
22
+ * When content is loading in, make sure it all loads in at the same time - our minds aren't fast enough to distinguish each item loading individually, for example, and it would appear slower to most users.
23
+
24
+ For a more in-depth look at how to approach loading states, please check out the _work in progress_ [skeleton exploration](https://hello.atlassian.net/wiki/spaces/ADG/pages/598816601/Loading+experiences+-+3.4+-+Guideline+exploration+-+Skeleton#Exploration-(spec)) (content restricted to Atlassian staff).
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/side-navigation",
3
- "version": "1.2.8",
3
+ "version": "1.2.9",
4
4
  "sideEffects": false
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/side-navigation",
3
- "version": "1.2.8",
3
+ "version": "1.2.9",
4
4
  "sideEffects": false
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/side-navigation",
3
- "version": "1.2.8",
3
+ "version": "1.2.9",
4
4
  "sideEffects": false
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/side-navigation",
3
- "version": "1.2.8",
3
+ "version": "1.2.9",
4
4
  "description": "A highly composable side navigation component that supports nested views.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -67,5 +67,6 @@
67
67
  "deprecation": "no-deprecated-imports"
68
68
  }
69
69
  },
70
+ "homepage": "https://atlassian.design/components/side-navigation/",
70
71
  "prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
71
72
  }