Skip to content

Commit

Permalink
fix(build): issues/296 npm updates for pf4 react core (#326)
Browse files Browse the repository at this point in the history
* graphCard, c3, cardTitle component
* graphCardChartLegend, c3, tooltip distance
* optinView, cardTitle and flex layout
* pageHeader, revert to pf title component
* select, isExpanded to isOpen prop
* toolbar, dataToolbar to toolbar component rename
* style, card header
  • Loading branch information
cdcabrera committed Jul 13, 2020
1 parent 66f971f commit c210245
Show file tree
Hide file tree
Showing 22 changed files with 922 additions and 652 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"dependencies": {
"@patternfly/patternfly": "4.16.7",
"@patternfly/react-charts": "6.5.4",
"@patternfly/react-core": "3.158.3",
"@patternfly/react-core": "4.23.1",
"@patternfly/react-icons": "4.4.2",
"@patternfly/react-styles": "4.4.2",
"@patternfly/react-tokens": "4.5.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,24 +73,15 @@ exports[`Authentication Component should render a non-connected component error:
className="pf-l-page-header pf-c-page-header pf-l-page__main-section pf-c-page__main-section pf-m-light"
widget-type="InsightsPageHeader"
>
<PageHeaderTitle
title="Subscription Watch"
<Title
headingLevel="h1"
>
<Title
className=""
size="2xl"
widget-type="InsightsPageHeaderTitle"
<h1
className="pf-c-title pf-m-2xl"
>
<h1
className="pf-c-title pf-m-2xl"
widget-type="InsightsPageHeaderTitle"
>
Subscription Watch
</h1>
</Title>
</PageHeaderTitle>
Subscription Watch
</h1>
</Title>
</section>
</PageHeader>
</PageHeader>
Expand All @@ -108,55 +99,59 @@ exports[`Authentication Component should render a non-connected component error:
<div
className="pf-c-empty-state fadein"
>
<Title
headingLevel="h2"
size="lg"
<div
className="pf-c-empty-state__content"
>
<h2
className="pf-c-title pf-m-lg"
<Title
headingLevel="h2"
size="lg"
>
t(curiosity-auth.authorizedTitle, [object Object])
</h2>
</Title>
<EmptyStateIcon
icon={[Function]}
>
<LockIcon
aria-hidden="true"
className="pf-c-empty-state__icon"
color="currentColor"
noVerticalAlign={false}
size="sm"
<h2
className="pf-c-title pf-m-lg"
>
t(curiosity-auth.authorizedTitle, [object Object])
</h2>
</Title>
<EmptyStateIcon
icon={[Function]}
>
<svg
<LockIcon
aria-hidden="true"
aria-labelledby={null}
className="pf-c-empty-state__icon"
fill="currentColor"
height="1em"
role="img"
style={
Object {
"verticalAlign": "-0.125em",
color="currentColor"
noVerticalAlign={false}
size="sm"
>
<svg
aria-hidden="true"
aria-labelledby={null}
className="pf-c-empty-state__icon"
fill="currentColor"
height="1em"
role="img"
style={
Object {
"verticalAlign": "-0.125em",
}
}
}
viewBox="0 0 448 512"
width="1em"
viewBox="0 0 448 512"
width="1em"
>
<path
d="M400 224h-24v-72C376 68.2 307.8 0 224 0S72 68.2 72 152v72H48c-26.5 0-48 21.5-48 48v192c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V272c0-26.5-21.5-48-48-48zm-104 0H152v-72c0-39.7 32.3-72 72-72s72 32.3 72 72v72z"
transform=""
/>
</svg>
</LockIcon>
</EmptyStateIcon>
<EmptyStateBody>
<div
className="pf-c-empty-state__body"
>
<path
d="M400 224h-24v-72C376 68.2 307.8 0 224 0S72 68.2 72 152v72H48c-26.5 0-48 21.5-48 48v192c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V272c0-26.5-21.5-48-48-48zm-104 0H152v-72c0-39.7 32.3-72 72-72s72 32.3 72 72v72z"
transform=""
/>
</svg>
</LockIcon>
</EmptyStateIcon>
<EmptyStateBody>
<div
className="pf-c-empty-state__body"
>
t(curiosity-auth.authorizedCopy, ...)
</div>
</EmptyStateBody>
t(curiosity-auth.authorizedCopy, ...)
</div>
</EmptyStateBody>
</div>
</div>
</EmptyState>
</section>
Expand Down
8 changes: 4 additions & 4 deletions src/components/c3GraphCard/c3GraphCard.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import { Card, CardHead, CardActions, CardBody } from '@patternfly/react-core';
import { Card, CardTitle, CardHeader, CardActions, CardBody } from '@patternfly/react-core';
import { Skeleton, SkeletonSize } from '@redhat-cloud-services/frontend-components/components/Skeleton';
import _isEqual from 'lodash/isEqual';
import { Select } from '../form/select';
Expand Down Expand Up @@ -181,8 +181,8 @@ class C3GraphCard extends React.Component {

return (
<Card className="curiosity-usage-graph fadein">
<CardHead>
<h2>{cardTitle}</h2>
<CardHeader>
<CardTitle>{cardTitle}</CardTitle>
<CardActions>
{children}
<Select
Expand All @@ -193,7 +193,7 @@ class C3GraphCard extends React.Component {
placeholder={t('curiosity-graph.dropdownPlaceholder')}
/>
</CardActions>
</CardHead>
</CardHeader>
<CardBody>
<div className={`curiosity-skeleton-container ${(error && 'blur') || ''}`}>
{pending && (
Expand Down
2 changes: 1 addition & 1 deletion src/components/c3GraphCard/c3GraphCardLegendItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ class C3GraphCardLegendItem extends React.Component {
key={`curiosity-tooltip-${chartId}`}
content={tooltipContent}
position={TooltipPosition.top}
distance={-10}
distance={0}
entryDelay={100}
exitDelay={0}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ exports[`C3GraphCard Component should render a non-connected component: non-conn
<Card
className="curiosity-usage-graph fadein"
>
<CardHead>
<h2 />
<CardHeader>
<CardTitle />
<CardActions>
<Select
aria-label="t(curiosity-graph.dropdownPlaceholder)"
Expand Down Expand Up @@ -137,7 +137,7 @@ exports[`C3GraphCard Component should render a non-connected component: non-conn
variant="single"
/>
</CardActions>
</CardHead>
</CardHeader>
<CardBody>
<div
className="curiosity-skeleton-container "
Expand Down Expand Up @@ -186,8 +186,8 @@ exports[`C3GraphCard Component should render multiple states: fulfilled 1`] = `
<Card
className="curiosity-usage-graph fadein"
>
<CardHead>
<h2 />
<CardHeader>
<CardTitle />
<CardActions>
<Select
aria-label="t(curiosity-graph.dropdownPlaceholder)"
Expand Down Expand Up @@ -223,7 +223,7 @@ exports[`C3GraphCard Component should render multiple states: fulfilled 1`] = `
variant="single"
/>
</CardActions>
</CardHead>
</CardHeader>
<CardBody>
<div
className="curiosity-skeleton-container "
Expand Down Expand Up @@ -334,8 +334,8 @@ exports[`C3GraphCard Component should render multiple states: pending 1`] = `
<Card
className="curiosity-usage-graph fadein"
>
<CardHead>
<h2 />
<CardHeader>
<CardTitle />
<CardActions>
<Select
aria-label="t(curiosity-graph.dropdownPlaceholder)"
Expand Down Expand Up @@ -371,7 +371,7 @@ exports[`C3GraphCard Component should render multiple states: pending 1`] = `
variant="single"
/>
</CardActions>
</CardHead>
</CardHeader>
<CardBody>
<div
className="curiosity-skeleton-container "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ exports[`C3GraphCardLegendItem Component should render a tooltip with button: to
lorem ipsum
</div>
}
distance={-10}
distance={0}
enableFlip={true}
entryDelay={100}
exitDelay={0}
Expand Down
Loading

0 comments on commit c210245

Please sign in to comment.