Skip to content

Commit 0a773c7

Browse files
authored
Merge pull request #2176 from RedHatInsights/pf6
Pf6
2 parents ff942b6 + ffa5183 commit 0a773c7

File tree

159 files changed

+4608
-4030
lines changed

Some content is hidden

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

159 files changed

+4608
-4030
lines changed

package-lock.json

Lines changed: 304 additions & 174 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@
4242
"@nx/web": "20.0.6",
4343
"@nx/webpack": "^20.0.6",
4444
"@openshift/dynamic-plugin-sdk-webpack": "^4.1.0",
45-
"@patternfly/quickstarts": "^5.4.1",
46-
"@patternfly/react-core": "^5.4.8",
47-
"@patternfly/react-icons": "^5.4.2",
48-
"@patternfly/react-table": "^5.4.9",
45+
"@patternfly/quickstarts": "^6.0.0",
46+
"@patternfly/react-core": "^6.0.0",
47+
"@patternfly/react-icons": "^6.0.0",
48+
"@patternfly/react-table": "^6.0.0",
4949
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.15",
5050
"@simonsmith/cypress-image-snapshot": "^9.1.0",
5151
"@swc-node/register": "^1.10.9",

packages/advisor-components/cypress/component/ReportDetails/ReportDetails.spec.cy.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ describe('report details: kba loaded', () => {
2727
});
2828

2929
it('renders correct number of headers', () => {
30-
cy.get('.pf-v5-c-card__header').should('have.length', HEADERS.length);
31-
HEADERS.forEach((h) => cy.get('.pf-v5-c-card__header').contains(h).should('have.length', 1));
30+
cy.get('.pf-v6-c-card__header').should('have.length', HEADERS.length);
31+
HEADERS.forEach((h) => cy.get('.pf-v6-c-card__header').contains(h).should('have.length', 1));
3232
});
3333

3434
it('each header has an icon', () => {
35-
cy.get('.pf-v5-c-card__header-main > .ins-c-report-details__icon').should('have.length', HEADERS.length);
35+
cy.get('.pf-v6-c-card__header-main > .ins-c-report-details__icon').should('have.length', HEADERS.length);
3636
});
3737

3838
it('links have an icon', () => {
@@ -64,12 +64,12 @@ describe('report details: kba loaded', () => {
6464

6565
it('renders three dividers', () => {
6666
// TODO: make the assertion number dependant on input test data
67-
cy.get('hr[class=pf-v5-c-divider]').should('have.length', 3);
67+
cy.get('hr[class=pf-v6-c-divider]').should('have.length', 3);
6868
});
6969

7070
it('renders a loaded kba link', () => {
71-
cy.get(`${ROOT} .ins-c-report-details__kba .pf-v5-c-card__body`).find('.pf-v5-c-skeleton').should('have.length', 0);
72-
cy.get(`${ROOT} .ins-c-report-details__kba .pf-v5-c-card__body`)
71+
cy.get(`${ROOT} .ins-c-report-details__kba .pf-v6-c-card__body`).find('.pf-v6-c-skeleton').should('have.length', 0);
72+
cy.get(`${ROOT} .ins-c-report-details__kba .pf-v6-c-card__body`)
7373
.contains(props.kbaDetail.publishedTitle)
7474
.invoke('attr', 'href')
7575
.should('eq', props.kbaDetail.view_uri);
@@ -82,6 +82,6 @@ describe('report details: kba loading', () => {
8282
});
8383

8484
it('renders skeleton instead of a kba link', () => {
85-
cy.get(`${ROOT} .ins-c-report-details__kba .pf-v5-c-card__body`).find('.pf-v5-c-skeleton').should('have.length', 1);
85+
cy.get(`${ROOT} .ins-c-report-details__kba .pf-v6-c-card__body`).find('.pf-v6-c-skeleton').should('have.length', 1);
8686
});
8787
});

packages/advisor-components/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@redhat-cloud-services/frontend-components-advisor-components",
3-
"version": "2.0.22",
3+
"version": "3.0.0-beta.0",
44
"description": "Components to be used in Advisor applications and integrations.",
55
"main": "index.js",
66
"module": "esm/index.js",
@@ -19,15 +19,15 @@
1919
},
2020
"homepage": "https://github.com/RedHatInsights/frontend-components/tree/master/packages/advisor-components#readme",
2121
"peerDependencies": {
22-
"@patternfly/react-core": "^5.0.0",
23-
"@patternfly/react-icons": "^5.0.0",
22+
"@patternfly/react-core": "^6.0.0",
23+
"@patternfly/react-icons": "^6.0.0",
2424
"prop-types": "^15.6.2",
2525
"react": "^18.2.0",
2626
"react-dom": "^18.2.0",
2727
"react-router-dom": "^5.0.0 || ^6.0.0"
2828
},
2929
"dependencies": {
30-
"@redhat-cloud-services/frontend-components": "^5.0.1",
30+
"@redhat-cloud-services/frontend-components": "6.0.0-beta.0",
3131
"dot": "^1.1.3",
3232
"lodash": "^4.17.21",
3333
"marked": "14.1.2",

packages/advisor-components/src/RebootRequired/RebootRequired.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77

88
.reboot-required-icon {
99
margin-top: 5px;
10-
margin-right: var(--pf-v5-global--spacer--sm);
11-
color: var(--pf-v5-global--palette--red-100);
10+
margin-right: var(--pf-t--global--spacer--sm);
11+
color: var(--pf-t--global--color--status--danger--default);
1212
}
1313

1414
.no-reboot-required-icon {
1515
margin-top: 5px;
16-
margin-right: var(--pf-v5-global--spacer--sm);
17-
color: var(--pf-v5-global--palette--black-400);
16+
margin-right: var(--pf-t--global--spacer--sm);
17+
color: var(--pf-t--global--color--nonstatus--gray--default);
1818
}
1919
}

packages/advisor-components/src/RebootRequired/RebootRequired.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import './RebootRequired.scss';
22

33
import React from 'react';
4-
import { Icon, Text, TextContent, TextVariants } from '@patternfly/react-core';
5-
import { PowerOffIcon } from '@patternfly/react-icons';
4+
import { Icon } from '@patternfly/react-core/dist/js/components/Icon/Icon';
5+
import { Content, ContentVariants } from '@patternfly/react-core/dist/js/components/Content/Content';
6+
import { PowerOffIcon } from '@patternfly/react-icons/dist/dynamic/icons/power-off-icon';
67
import { RuleDetailsMessages } from '../RuleDetails/RuleDetailsMessages';
78

89
interface RebootRequiredProps {
@@ -15,9 +16,9 @@ const RebootRequired: React.FC<RebootRequiredProps> = ({ messages, rebootRequire
1516
<Icon>
1617
<PowerOffIcon className={rebootRequired ? 'reboot-required-icon' : 'no-reboot-required-icon'} />
1718
</Icon>
18-
<TextContent className="system-reboot-message__content">
19-
<Text component={TextVariants.p}>{messages.systemReboot}</Text>
20-
</TextContent>
19+
<Content className="system-reboot-message__content">
20+
<Content component={ContentVariants.p}>{messages.systemReboot}</Content>
21+
</Content>
2122
</span>
2223
);
2324

packages/advisor-components/src/ReportDetails/ReportDetails.scss

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
&__cards-stack {
55
pre {
66
display: block;
7-
color: var(--pf-v5-global--Color--100);
7+
color: var(--pf-t--color--gray--95);
88
word-break: break-all;
99
word-wrap: break-word;
10-
background-color: var(--pf-v5-global--BackgroundColor--light-200);
11-
border: 1px solid var(--pf-v5-global--BorderColor--100);
10+
background-color: var(pf-t--global--background--color--200);
11+
border: 1px solid var(--pf-t--global--border--color--100);
1212
border-radius: 4px;
1313
@include m.rem('padding', 10px);
1414
@include m.rem('margin', (10px, 0));
@@ -42,25 +42,25 @@
4242
h4,
4343
h5,
4444
h6 {
45-
font-family: var(--pf-v5-global--FontFamily--heading--sans-serif);
45+
font-family: var(--pf-t--global--font--family--heading);
4646
line-height: 1.5;
4747
}
4848

4949
h1 {
50-
font-size: var(--pf-v5-global--FontSize--2xl);
50+
font-size: var(--pf-t--global--font--size--2xl);
5151
line-height: 1.3;
5252
}
5353
h2 {
54-
font-size: var(--pf-v5-global--FontSize--xl);
54+
font-size: var(--pf-t--global--font--size--xl);
5555
}
5656
h3 {
57-
font-size: var(--pf-v5-global--FontSize--lg);
57+
font-size: var(--pf-t--global--font--size--lg);
5858
}
5959
h4, h5, h6 {
60-
font-size: var(--pf-v5-global--FontSize--md);
60+
font-size: var(--pf-t--global--font--size--md);
6161
}
6262

63-
.pf-v5-c-list {
63+
.pf-v6-c-list {
6464
@include m.rem('margin', 5px 0);
6565
}
6666

@@ -69,7 +69,7 @@
6969
@include m.rem('margin-top', 10px);
7070

7171
tr {
72-
border-bottom: 1px solid var(--pf-v5-global--BorderColor--300);
72+
border-bottom: 1px solid var(--pf-t--global--border--color--on-secondary);
7373
}
7474

7575
th,
@@ -80,6 +80,6 @@
8080
}
8181

8282
&__icon {
83-
margin-right: var(--pf-v5-global--spacer--sm);
83+
margin-right: var(--pf-t--global--spacer--sm);
8484
}
8585
}

packages/advisor-components/src/ReportDetails/ReportDetails.tsx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,17 @@ import './ReportDetails.scss';
22

33
import React, { useState } from 'react';
44

5-
import { Alert, Card, CardBody, CardHeader, Divider, Stack, StackItem } from '@patternfly/react-core';
6-
import { BullseyeIcon, InfoCircleIcon, LightbulbIcon, ThumbsUpIcon } from '@patternfly/react-icons';
5+
import { Alert } from '@patternfly/react-core/dist/dynamic/components/Alert';
6+
import { Card } from '@patternfly/react-core/dist/dynamic/components/Card';
7+
import { CardBody } from '@patternfly/react-core/dist/dynamic/components/Card';
8+
import { CardHeader } from '@patternfly/react-core/dist/dynamic/components/Card';
9+
import { Divider } from '@patternfly/react-core/dist/dynamic/components/Divider';
10+
import { Stack } from '@patternfly/react-core/dist/dynamic/layouts/Stack';
11+
import { StackItem } from '@patternfly/react-core/dist/dynamic/layouts/Stack';
12+
import BullseyeIcon from '@patternfly/react-icons/dist/dynamic/icons/bullseye-icon';
13+
import InfoCircleIcon from '@patternfly/react-icons/dist/dynamic/icons/info-circle-icon';
14+
import LightbulbIcon from '@patternfly/react-icons/dist/dynamic/icons/lightbulb-icon';
15+
import ThumbsUpIcon from '@patternfly/react-icons/dist/dynamic/icons/thumbs-up-icon';
716
import { Skeleton, SkeletonSize } from '@redhat-cloud-services/frontend-components/Skeleton';
817

918
import { RuleContentOcp, RuleContentRhel } from '../types';
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.ins-c-generic__override {
22
p {
33
margin-top: 0;
4-
margin-bottom: var(--pf-v5-global--spacer--md);
4+
margin-bottom: var(--pf-t--global--spacer--md);
55
}
66
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
.ins-c-line {
2-
border: 0.01rem solid var(--pf-v5-global--BorderColor--100);
2+
border: 0.01rem solid var(--pf-t--global--border--color--100);
33
}
44

55
.ins-c-rule-details__stack {
66
width: 600px;
7-
.pf-v5-c-content {
8-
font-size: var(--pf-v5-global--FontSize--sm);
7+
.pf-v6-c-content {
8+
font-size: var(--pf-t--global--font--size--sm);
99
}
1010
}

0 commit comments

Comments
 (0)