Skip to content

Commit 1ba4423

Browse files
committed
Move “Session management” to main Flyout page content, under “Guidelines”
1 parent 3e590c0 commit 1ba4423

3 files changed

Lines changed: 14 additions & 12 deletions

File tree

packages/website/docs/components/containers/flyout/_flyout_menu.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,5 @@ export default () => {
4747
};
4848
```
4949

50-
In [managed session flyouts](./session-management.mdx), the Flyout Manager automatically adds a back button and a history popover control to the flyout menu for navigating to different flyout sessions within the managed context.
50+
In [managed session flyouts](#flyout-session-management), the Flyout Manager automatically adds a back button and a history popover control to the flyout menu for navigating to different flyout sessions within the managed context.
5151

packages/website/docs/components/containers/flyout/session-management.mdx renamed to packages/website/docs/components/containers/flyout/_session_management.mdx

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
1-
---
2-
sidebar_label: Session management
3-
---
4-
51
```mdx-code-block
62
import { EuiBetaBadge } from '@elastic/eui';
73
```
84

9-
# Flyout session management <EuiBetaBadge label="Beta" color="accent" /> {#flyout-session-management}
5+
### Session management <EuiBetaBadge size="s" label="Beta" color="accent" /> {#flyout-session-management}
106

117
EuiFlyout comes with opt-in flyout session management built in that lets you
128
effortlessly create complex flyout compositions and journeys.
@@ -113,7 +109,7 @@ export default () => {
113109
};
114110
```
115111

116-
## Sessions
112+
#### Sessions
117113

118114
The `session` prop is the key ingredient needed to create managed flyouts.
119115
When set to `start`, it activates the underlying flyout session management logic
@@ -136,7 +132,7 @@ When a flyout is nested inside a parent flyout and doesn't have an explicit
136132
`session` prop, it will automatically inherit the session. All bindings and
137133
configuration will be handled automatically.
138134

139-
### Session title
135+
##### Session title
140136

141137
Managed flyout sessions require a title that can be referenced in the history
142138
navigation features. Use the `title` field of the `flyoutMenuProps` to set the
@@ -211,13 +207,13 @@ explicitly set `session="never"`. This will render it as a regular unmanaged fly
211207
</>
212208
```
213209

214-
## Types of managed flyouts
210+
#### Types of managed flyouts
215211

216212
While users of managed flyouts don't need to think about the types
217213
of managed flyouts or the internals behind them, it's beneficial to understand
218214
what differentiates the two types - _main_ and _child_.
219215

220-
### Main flyouts
216+
##### Main flyouts
221217

222218
Main flyouts are the backbone of EuiFlyout's session management. Each flyout
223219
with `session="start"` prop creates a new session and becomes the main flyout
@@ -227,7 +223,7 @@ using the history popover.
227223
Main flyouts are meant to display primary level information like the overview
228224
of an alert.
229225

230-
### Child flyouts
226+
##### Child flyouts
231227

232228
Child flyouts are directly related to a main flyout in their session. They're
233229
created by rendering an `EuiFlyout` inside a main flyout's children (nested in
@@ -242,7 +238,7 @@ the style of the flyout background to shaded ([`colors.backgroundBaseSubdued`](.
242238

243239
On smaller screens, child flyouts stack above the parent.
244240

245-
## Accessibility
241+
#### Accessibility
246242

247243
Both parent and child flyouts use `role="dialog"` and `aria-modal="true"` for accessibility. Focus is managed automatically between them, with the child flyout taking focus when open and returning focus to the parent when closed.
248244

packages/website/docs/components/containers/flyout/index.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,6 +1023,12 @@ import FlyoutMenu from './_flyout_menu.mdx';
10231023

10241024
<FlyoutMenu />
10251025

1026+
## Guidelines
1027+
1028+
import SessionManagement from './_session_management.mdx';
1029+
1030+
<SessionManagement />
1031+
10261032
## Props
10271033

10281034
import docgen from '@elastic/eui-docgen/dist/components/flyout';

0 commit comments

Comments
 (0)