Skip to content

Commit bf172d0

Browse files
committed
Reverted page dock variant back to docked (for now)
1 parent ac33466 commit bf172d0

File tree

3 files changed

+22
-22
lines changed

3 files changed

+22
-22
lines changed

packages/react-core/src/components/Button/__tests__/__snapshots__/Button.test.tsx.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ exports[`Renders basic button 1`] = `
55
<button
66
aria-label="basic button"
77
class="pf-v6-c-button pf-m-primary"
8-
data-ouia-component-id="OUIA-Generated-Button-primary-:r30:"
8+
data-ouia-component-id="OUIA-Generated-Button-primary-:r34:"
99
data-ouia-component-type="PF6/Button"
1010
data-ouia-safe="true"
1111
type="button"

packages/react-core/src/components/Page/Page.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export interface PageProps extends React.HTMLProps<HTMLDivElement> {
2121
/** Additional classes added to the page layout */
2222
className?: string;
2323
/** @beta Indicates the layout variant */
24-
variant?: 'default' | 'dock';
24+
variant?: 'default' | 'docked';
2525
/** @beta Flag indicating the dock nav is expanded on mobile. Only applies when variant is dock. */
2626
isDockExpanded?: boolean;
2727
/** @beta Flag indicating the dock nav should display text. Only applies when variant is dock. */
@@ -348,7 +348,7 @@ class Page extends Component<PageProps, PageState> {
348348
{...rest}
349349
className={css(
350350
styles.page,
351-
variant === 'dock' && styles.modifiers.dock,
351+
variant === 'docked' && styles.modifiers.dock,
352352
width !== null && height !== null && 'pf-m-resize-observer',
353353
width !== null && `pf-m-breakpoint-${getBreakpoint(width)}`,
354354
height !== null && `pf-m-height-breakpoint-${getVerticalBreakpoint(height)}`,
@@ -357,7 +357,7 @@ class Page extends Component<PageProps, PageState> {
357357
)}
358358
>
359359
{skipToContent}
360-
{variant === 'dock' ? (
360+
{variant === 'docked' ? (
361361
<>
362362
{masthead}
363363
<div

packages/react-core/src/components/Page/__tests__/Page.test.tsx

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -410,51 +410,51 @@ describe('Page dock variant', () => {
410410
expect(page.querySelector(styles.pageDockMain)).not.toBeInTheDocument();
411411
});
412412

413-
test(`Renders with ${styles.modifiers.dock} class when variant is dock`, () => {
414-
render(<Page {...props} variant="dock" data-testid="page"></Page>);
413+
test(`Renders with ${styles.modifiers.dock} class when variant is docked`, () => {
414+
render(<Page {...props} variant="docked" data-testid="page"></Page>);
415415

416416
expect(screen.getByTestId('page')).toHaveClass(styles.modifiers.dock);
417417
});
418418

419-
test('Renders dock content when dockContent and variant="dock" is passed', () => {
420-
render(<Page variant="dock" dockContent={<>Dock content</>} masthead={<>Masthead</>} data-testid="page"></Page>);
419+
test('Renders dock content when dockContent and variant="docked" is passed', () => {
420+
render(<Page variant="docked" dockContent={<>Dock content</>} masthead={<>Masthead</>} data-testid="page"></Page>);
421421

422422
expect(screen.getByText('Dock content')).toBeInTheDocument();
423423
});
424424

425-
test('Renders masthead content when masthead and variant="dock" is passed', () => {
425+
test('Renders masthead content when masthead and variant="docked" is passed', () => {
426426
render(
427-
<Page variant="dock" dockContent={<>Dock content</>} masthead={<>Masthead content</>} data-testid="page"></Page>
427+
<Page variant="docked" dockContent={<>Dock content</>} masthead={<>Masthead content</>} data-testid="page"></Page>
428428
);
429429

430430
expect(screen.getByText('Masthead content')).toBeInTheDocument();
431431
});
432432

433-
test(`Renders with ${styles.pageDock} wrapper when variant is dock`, () => {
434-
render(<Page variant="dock" dockContent={<>Dock content</>} masthead={<>Masthead</>} data-testid="page"></Page>);
433+
test(`Renders with ${styles.pageDock} wrapper when variant is docked`, () => {
434+
render(<Page variant="docked" dockContent={<>Dock content</>} masthead={<>Masthead</>} data-testid="page"></Page>);
435435

436436
const pageDock = screen.getByText('Dock content').closest(`.${styles.pageDock}`);
437437
expect(pageDock).toBeInTheDocument();
438438
});
439439

440-
test(`Does not render with ${styles.modifiers.expanded} by default when variant is dock`, () => {
441-
render(<Page variant="dock" dockContent={<>Dock content</>} masthead={<>Masthead</>} data-testid="page"></Page>);
440+
test(`Does not render with ${styles.modifiers.expanded} by default when variant is docked`, () => {
441+
render(<Page variant="docked" dockContent={<>Dock content</>} masthead={<>Masthead</>} data-testid="page"></Page>);
442442

443443
const pageDock = screen.getByText('Dock content').closest(`.${styles.pageDock}`);
444444
expect(pageDock).not.toHaveClass(styles.modifiers.expanded);
445445
});
446446

447-
test(`Does not render with ${styles.modifiers.textExpanded} by default when variant is dock`, () => {
448-
render(<Page variant="dock" dockContent={<>Dock content</>} masthead={<>Masthead</>} data-testid="page"></Page>);
447+
test(`Does not render with ${styles.modifiers.textExpanded} by default when variant is docked`, () => {
448+
render(<Page variant="docked" dockContent={<>Dock content</>} masthead={<>Masthead</>} data-testid="page"></Page>);
449449

450450
const pageDock = screen.getByText('Dock content').closest(`.${styles.pageDock}`);
451451
expect(pageDock).not.toHaveClass(styles.modifiers.textExpanded);
452452
});
453453

454-
test(`Renders with ${styles.modifiers.expanded} when isDockExpanded is true and variant is dock`, () => {
454+
test(`Renders with ${styles.modifiers.expanded} when isDockExpanded is true and variant is docked`, () => {
455455
render(
456456
<Page
457-
variant="dock"
457+
variant="docked"
458458
isDockExpanded
459459
dockContent={<>Dock content</>}
460460
masthead={<>Masthead</>}
@@ -466,10 +466,10 @@ describe('Page dock variant', () => {
466466
expect(pageDock).toHaveClass(styles.modifiers.expanded);
467467
});
468468

469-
test(`Renders with ${styles.modifiers.textExpanded} when isDockTextExpanded is true and variant is dock`, () => {
469+
test(`Renders with ${styles.modifiers.textExpanded} when isDockTextExpanded is true and variant is docked`, () => {
470470
render(
471471
<Page
472-
variant="dock"
472+
variant="docked"
473473
isDockTextExpanded
474474
dockContent={<>Dock content</>}
475475
masthead={<>Masthead</>}
@@ -481,8 +481,8 @@ describe('Page dock variant', () => {
481481
expect(pageDock).toHaveClass(styles.modifiers.textExpanded);
482482
});
483483

484-
test(`Renders with ${styles.pageDockMain} wrapper when variant is dock`, () => {
485-
render(<Page variant="dock" dockContent={<>Dock content</>} masthead={<>Masthead</>} data-testid="page"></Page>);
484+
test(`Renders with ${styles.pageDockMain} wrapper when variant is docked`, () => {
485+
render(<Page variant="docked" dockContent={<>Dock content</>} masthead={<>Masthead</>} data-testid="page"></Page>);
486486

487487
const pageDockMain = screen.getByText('Dock content').closest(`.${styles.pageDockMain}`);
488488
expect(pageDockMain).toBeInTheDocument();

0 commit comments

Comments
 (0)