Skip to content

Commit 544dcc5

Browse files
authored
chore(deps): Bump v6 branch to latest core alpha (#9774)
* chore(deps): Bump v6 branch to latest core alpha * update snapshts * fixes from review * fix test * update to alpha 12 to fix table issue * more fixes * update snapshots * remove Page setion variants that are no longer needed and update snapshots * rebase * fix docs * fix broken tests * fix token genration
1 parent 4743520 commit 544dcc5

File tree

76 files changed

+283
-518
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+283
-518
lines changed

packages/react-core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"tslib": "^2.5.0"
5555
},
5656
"devDependencies": {
57-
"@patternfly/patternfly": "5.2.0-prerelease.3",
57+
"@patternfly/patternfly": "6.0.0-alpha.12",
5858
"@rollup/plugin-commonjs": "^25.0.0",
5959
"@rollup/plugin-node-resolve": "^15.0.2",
6060
"@rollup/plugin-replace": "^5.0.2",

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ export interface MastheadProps extends React.DetailedHTMLProps<React.HTMLProps<H
99
children?: React.ReactNode;
1010
/** Additional classes added to the masthead */
1111
className?: string;
12-
/** Background theme color of the masthead */
13-
backgroundColor?: 'dark' | 'light' | 'light200';
1412
/** Display type at various breakpoints */
1513
display?: {
1614
default?: 'inline' | 'stack';
@@ -34,7 +32,6 @@ export interface MastheadProps extends React.DetailedHTMLProps<React.HTMLProps<H
3432
export const Masthead: React.FunctionComponent<MastheadProps> = ({
3533
children,
3634
className,
37-
backgroundColor = 'dark',
3835
display = {
3936
md: 'inline'
4037
},
@@ -48,8 +45,6 @@ export const Masthead: React.FunctionComponent<MastheadProps> = ({
4845
styles.masthead,
4946
formatBreakpointMods(display, styles, 'display-', getBreakpoint(width)),
5047
formatBreakpointMods(inset, styles, '', getBreakpoint(width)),
51-
backgroundColor === 'light' && styles.modifiers.light,
52-
backgroundColor === 'light200' && styles.modifiers.light_200,
5348
className
5449
)}
5550
{...props}

packages/react-core/src/components/Masthead/examples/Masthead.md

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -140,50 +140,6 @@ import BarsIcon from '@patternfly/react-icons/dist/js/icons/bars-icon';
140140
</Masthead>;
141141
```
142142

143-
### Light variant
144-
145-
```ts
146-
import React from 'react';
147-
import { Masthead, MastheadToggle, MastheadMain, MastheadBrand, MastheadContent, Button } from '@patternfly/react-core';
148-
import BarsIcon from '@patternfly/react-icons/dist/js/icons/bars-icon';
149-
150-
<Masthead id="light-masthead" backgroundColor="light">
151-
<MastheadToggle>
152-
<Button variant="plain" onClick={() => {}} aria-label="Global navigation">
153-
<BarsIcon />
154-
</Button>
155-
</MastheadToggle>
156-
<MastheadMain>
157-
<MastheadBrand>Logo</MastheadBrand>
158-
</MastheadMain>
159-
<MastheadContent>
160-
<span>Content</span>
161-
</MastheadContent>
162-
</Masthead>;
163-
```
164-
165-
### Light 200 variant
166-
167-
```ts
168-
import React from 'react';
169-
import { Masthead, MastheadToggle, MastheadMain, MastheadBrand, MastheadContent, Button } from '@patternfly/react-core';
170-
import BarsIcon from '@patternfly/react-icons/dist/js/icons/bars-icon';
171-
172-
<Masthead id="light200-masthead" backgroundColor="light200">
173-
<MastheadToggle>
174-
<Button variant="plain" onClick={() => {}} aria-label="Global navigation">
175-
<BarsIcon />
176-
</Button>
177-
</MastheadToggle>
178-
<MastheadMain>
179-
<MastheadBrand>Logo</MastheadBrand>
180-
</MastheadMain>
181-
<MastheadContent>
182-
<span>Content</span>
183-
</MastheadContent>
184-
</Masthead>;
185-
```
186-
187143
### Inset
188144

189145
```ts

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export const NotificationBadge: React.FunctionComponent<NotificationBadgeProps>
5454
className={css(styles.notificationBadge, styles.modifiers[variant], isExpanded && styles.modifiers.expanded)}
5555
>
5656
{notificationChild}
57-
{count > 0 && <span className={css(styles.notificationBadgeCount)}>{count}</span>}
57+
{count > 0 && <span className={css(`${styles.notificationBadge}__count`)}>{count}</span>}
5858
</span>
5959
</Button>
6060
);

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

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@ import { formatBreakpointMods } from '../../helpers/util';
55
import { PageContext } from './PageContext';
66

77
export enum PageSectionVariants {
8-
default = 'default',
9-
light = 'light',
10-
dark = 'dark',
11-
darker = 'darker'
8+
default = 'default'
129
}
1310

1411
export enum PageSectionTypes {
@@ -26,7 +23,7 @@ export interface PageSectionProps extends React.HTMLProps<HTMLDivElement> {
2623
/** Additional classes added to the section */
2724
className?: string;
2825
/** Section background color variant */
29-
variant?: 'default' | 'light' | 'dark' | 'darker';
26+
variant?: 'default';
3027
/** Section type variant */
3128
type?: 'default' | 'nav' | 'subnav' | 'breadcrumb' | 'tabs' | 'wizard';
3229
/** Enables the page section to fill the available vertical space */
@@ -77,10 +74,7 @@ const variantType = {
7774
};
7875

7976
const variantStyle = {
80-
[PageSectionVariants.default]: '',
81-
[PageSectionVariants.light]: styles.modifiers.light,
82-
[PageSectionVariants.dark]: styles.modifiers.dark_200,
83-
[PageSectionVariants.darker]: styles.modifiers.dark_100
77+
[PageSectionVariants.default]: ''
8478
};
8579

8680
export const PageSection: React.FunctionComponent<PageSectionProps> = ({

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ export interface PageSidebarProps extends React.HTMLProps<HTMLDivElement> {
1515
isManagedSidebar?: boolean;
1616
/** Programmatically manage if the sidebar is shown, if isManagedSidebar is set to true in the Page component, this prop is managed */
1717
isSidebarOpen?: boolean;
18-
/** Indicates the color scheme of the sidebar */
19-
theme?: 'dark' | 'light';
2018
/** Sidebar id */
2119
id?: string;
2220
}
@@ -33,7 +31,6 @@ export const PageSidebar: React.FunctionComponent<PageSidebarProps> = ({
3331
className = '',
3432
children,
3533
isSidebarOpen = true,
36-
theme = 'dark',
3734
id = 'page-sidebar',
3835
...props
3936
}: PageSidebarProps) => (
@@ -46,7 +43,6 @@ export const PageSidebar: React.FunctionComponent<PageSidebarProps> = ({
4643
id={id}
4744
className={css(
4845
styles.pageSidebar,
49-
theme === 'light' && styles.modifiers.light,
5046
sidebarOpen && styles.modifiers.expanded,
5147
!sidebarOpen && styles.modifiers.collapsed,
5248
className

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {} from '../..';
99

1010
it('PageSidebar should match snapshot (auto-generated)', () => {
1111
const { asFragment } = render(
12-
<PageSidebar className={"''"} isManagedSidebar={true} isSidebarOpen={true} theme={'dark'}>
12+
<PageSidebar className={"''"} isManagedSidebar={true} isSidebarOpen={true}>
1313
<div>ReactNode</div>
1414
</PageSidebar>
1515
);

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

Lines changed: 1 addition & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@ describe('Page', () => {
3232
const { asFragment } = render(
3333
<Page {...props} header={Header} sidebar={Sidebar}>
3434
<PageSection variant="default">Section with default background</PageSection>
35-
<PageSection variant="light">Section with light background</PageSection>
36-
<PageSection variant="dark">Section with dark background</PageSection>
37-
<PageSection variant="darker">Section with darker background</PageSection>
3835
</Page>
3936
);
4037

@@ -44,17 +41,14 @@ describe('Page', () => {
4441
test('Check dark page against snapshot', () => {
4542
const Header = <PageHeader logo="Logo" headerTools="PageHeaderTools | Avatar" onNavToggle={() => undefined} />;
4643
const Sidebar = (
47-
<PageSidebar isSidebarOpen theme="dark">
44+
<PageSidebar isSidebarOpen>
4845
<PageSidebarBody>Navigation</PageSidebarBody>
4946
</PageSidebar>
5047
);
5148

5249
const { asFragment } = render(
5350
<Page {...props} header={Header} sidebar={Sidebar}>
5451
<PageSection variant="default">Section with default background</PageSection>
55-
<PageSection variant="light">Section with light background</PageSection>
56-
<PageSection variant="dark">Section with dark background</PageSection>
57-
<PageSection variant="darker">Section with darker background</PageSection>
5852
</Page>
5953
);
6054

@@ -68,9 +62,6 @@ describe('Page', () => {
6862
const { asFragment } = render(
6963
<Page {...props} header={Header} sidebar={Sidebar}>
7064
<PageSection variant="default">Section with default background</PageSection>
71-
<PageSection variant="light">Section with light background</PageSection>
72-
<PageSection variant="dark">Section with dark background</PageSection>
73-
<PageSection variant="darker">Section with darker background</PageSection>
7465
</Page>
7566
);
7667

@@ -94,9 +85,6 @@ describe('Page', () => {
9485
const { asFragment } = render(
9586
<Page {...props} header={Header} sidebar={Sidebar} breadcrumb={<PageBreadcrumb />}>
9687
<PageSection variant="default">Section with default background</PageSection>
97-
<PageSection variant="light">Section with light background</PageSection>
98-
<PageSection variant="dark">Section with dark background</PageSection>
99-
<PageSection variant="darker">Section with darker background</PageSection>
10088
</Page>
10189
);
10290

@@ -127,9 +115,6 @@ describe('Page', () => {
127115
breadcrumbProps={{ stickyOnBreakpoint: { sm: 'top', md: 'top', lg: 'top', xl: 'top', '2xl': 'top' } }}
128116
>
129117
<PageSection variant="default">Section with default background</PageSection>
130-
<PageSection variant="light">Section with light background</PageSection>
131-
<PageSection variant="dark">Section with dark background</PageSection>
132-
<PageSection variant="darker">Section with darker background</PageSection>
133118
</Page>
134119
);
135120

@@ -162,9 +147,6 @@ describe('Page', () => {
162147
}}
163148
>
164149
<PageSection variant="default">Section with default background</PageSection>
165-
<PageSection variant="light">Section with light background</PageSection>
166-
<PageSection variant="dark">Section with dark background</PageSection>
167-
<PageSection variant="darker">Section with darker background</PageSection>
168150
</Page>
169151
);
170152

@@ -189,9 +171,6 @@ describe('Page', () => {
189171
</Breadcrumb>
190172
</PageBreadcrumb>
191173
<PageSection variant="default">Section with default background</PageSection>
192-
<PageSection variant="light">Section with light background</PageSection>
193-
<PageSection variant="dark">Section with dark background</PageSection>
194-
<PageSection variant="darker">Section with darker background</PageSection>
195174
</Page>
196175
);
197176

@@ -216,9 +195,6 @@ describe('Page', () => {
216195
</Breadcrumb>
217196
</PageBreadcrumb>
218197
<PageSection variant="default">Section with default background</PageSection>
219-
<PageSection variant="light">Section with light background</PageSection>
220-
<PageSection variant="dark">Section with dark background</PageSection>
221-
<PageSection variant="darker">Section with darker background</PageSection>
222198
</Page>
223199
);
224200

@@ -245,9 +221,6 @@ describe('Page', () => {
245221
</Breadcrumb>
246222
</PageBreadcrumb>
247223
<PageSection variant="default">Section with default background</PageSection>
248-
<PageSection variant="light">Section with light background</PageSection>
249-
<PageSection variant="dark">Section with dark background</PageSection>
250-
<PageSection variant="darker">Section with darker background</PageSection>
251224
</Page>
252225
);
253226

@@ -275,9 +248,6 @@ describe('Page', () => {
275248
</Nav>
276249
</PageNavigation>
277250
<PageSection variant="default">Section with default background</PageSection>
278-
<PageSection variant="light">Section with light background</PageSection>
279-
<PageSection variant="dark">Section with dark background</PageSection>
280-
<PageSection variant="darker">Section with darker background</PageSection>
281251
</Page>
282252
);
283253

@@ -317,9 +287,6 @@ describe('Page', () => {
317287
</PageNavigation>
318288
</PageGroup>
319289
<PageSection variant="default">Section with default background</PageSection>
320-
<PageSection variant="light">Section with light background</PageSection>
321-
<PageSection variant="dark">Section with dark background</PageSection>
322-
<PageSection variant="darker">Section with darker background</PageSection>
323290
</Page>
324291
);
325292

@@ -373,9 +340,6 @@ describe('Page', () => {
373340
}}
374341
>
375342
<PageSection variant="default">Section with default background</PageSection>
376-
<PageSection variant="light">Section with light background</PageSection>
377-
<PageSection variant="dark">Section with dark background</PageSection>
378-
<PageSection variant="darker">Section with darker background</PageSection>
379343
</Page>
380344
);
381345

@@ -411,9 +375,6 @@ describe('Page', () => {
411375
data-testid="page-test-id"
412376
>
413377
<PageSection variant="default">Section with default background</PageSection>
414-
<PageSection variant="light">Section with light background</PageSection>
415-
<PageSection variant="dark">Section with dark background</PageSection>
416-
<PageSection variant="darker">Section with darker background</PageSection>
417378
</Page>
418379
);
419380

0 commit comments

Comments
 (0)