Skip to content

Commit

Permalink
drawer bug fix when quickStarts are passed as prop
Browse files Browse the repository at this point in the history
  • Loading branch information
jschuler committed Jul 1, 2021
1 parent 388f95f commit 07c669e
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 14 deletions.
2 changes: 1 addition & 1 deletion packages/dev/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"serve": "serve public"
},
"dependencies": {
"@patternfly/quickstarts": "1.0.0-rc.25",
"@patternfly/quickstarts": "1.0.0-rc.26",
"@patternfly/react-core": "^4.101.3",
"asciidoctor": "^2.2.1",
"react": "^16.14.0",
Expand Down
9 changes: 4 additions & 5 deletions packages/module/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@patternfly/quickstarts",
"version": "1.0.0-rc.25",
"version": "1.0.0-rc.26",
"description": "PatternFly quick starts",
"files": [
"dist"
Expand Down Expand Up @@ -43,10 +43,9 @@
"showdown": ">=1.8.6"
},
"dependencies": {
"@patternfly/patternfly": "^4.90.5",
"@patternfly/react-catalog-view-extension": "^4.10.13",
"@patternfly/react-core": "^4.101.3",
"@patternfly/react-icons": "^4.9.5",
"@patternfly/patternfly": "4.108.2",
"@patternfly/react-catalog-view-extension": "4.11.42",
"@patternfly/react-core": "4.128.2",
"bootstrap-sass": "^3.3.7",
"classnames": "^2.2.6",
"dompurify": "^2.2.6",
Expand Down
11 changes: 6 additions & 5 deletions packages/module/src/QuickStartDrawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export interface QuickStartDrawerProps extends React.HTMLProps<HTMLDivElement> {
}

export const QuickStartDrawer: React.FC<QuickStartDrawerProps> = ({
quickStarts,
quickStarts = [],
children,
appendTo,
isStatic,
Expand All @@ -29,13 +29,14 @@ export const QuickStartDrawer: React.FC<QuickStartDrawerProps> = ({
onCloseNotInProgress,
...props
}) => {
const { activeQuickStartID, setActiveQuickStart, allQuickStarts = quickStarts, activeQuickStartState } = React.useContext<QuickStartContextValues>(QuickStartContext);
const { activeQuickStartID, setActiveQuickStart, allQuickStarts, activeQuickStartState } = React.useContext<QuickStartContextValues>(QuickStartContext);
const combinedQuickStarts = allQuickStarts.concat(quickStarts);
React.useEffect(() => {
const params = new URLSearchParams(window.location.search);
const quickStartId = params.get(QUICKSTART_ID_FILTER_KEY) || '';
if (quickStartId && activeQuickStartID !== quickStartId) {
const activeQuickStart = getQuickStartByName(quickStartId, allQuickStarts);
if (!allQuickStarts || allQuickStarts.length === 0 || (activeQuickStart && !activeQuickStart.spec.link)) {
const activeQuickStart = getQuickStartByName(quickStartId, combinedQuickStarts);
if (!combinedQuickStarts || combinedQuickStarts.length === 0 || (activeQuickStart && !activeQuickStart.spec.link)) {
// don't try to load a quick start that is actually just an external resource
setActiveQuickStart(quickStartId);
}
Expand Down Expand Up @@ -86,7 +87,7 @@ export const QuickStartDrawer: React.FC<QuickStartDrawerProps> = ({

const panelContent = (
<QuickStartPanelContent
quickStarts={allQuickStarts}
quickStarts={combinedQuickStarts}
handleClose={handleClose}
activeQuickStartID={activeQuickStartID}
appendTo={appendTo}
Expand Down
58 changes: 55 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,27 @@
resolved "https://registry.yarnpkg.com/@patternfly/patternfly/-/patternfly-4.103.6.tgz#a01b1dced931eb4971a6c7366901fdde81a52284"
integrity sha512-veWpHv/Dlk0P7tu96QUjLzD2Aq4IysUSGOjGPXlbb/KOUfnIrErLRmQnljY01ykXLJ7kxQSnC3yaJqCU+4fDPQ==

"@patternfly/[email protected]":
version "4.108.2"
resolved "https://registry.yarnpkg.com/@patternfly/patternfly/-/patternfly-4.108.2.tgz#b6686b9865fd5d4233a15bdf04cc53bded5a8ccc"
integrity sha512-z0VB+1CXcH+eoClYQABwapX5FURSvm1nPr6asLWwg/Z4Wuxs0RjZpC6Gb+KRm8nGQwSAcMKZY1jLfPqVnznQnw==

"@patternfly/[email protected]":
version "4.70.2"
resolved "https://registry.yarnpkg.com/@patternfly/patternfly/-/patternfly-4.70.2.tgz#94b733f68f4f63040ab142eb2fa3c3ac5d08f2ae"
integrity sha512-XKCHnOjx1JThY3s98AJhsApSsGHPvEdlY7r+b18OecqUnmThVGw3nslzYYrwfCGlJ/xQtV5so29SduH2/uhHzA==

"@patternfly/[email protected]":
version "4.11.42"
resolved "https://registry.yarnpkg.com/@patternfly/react-catalog-view-extension/-/react-catalog-view-extension-4.11.42.tgz#ae69ffb3a6db5c05a3c0add2c37468a4b36262d4"
integrity sha512-MPoxsZ0A8nFOJpnyuv6pAKJEZmLaNIG+UyimXppiH/ICzvmcgnQ2RArnyv9OCIR6Wykl1c87I0wy+1J7f2/0TQ==
dependencies:
"@patternfly/patternfly" "4.108.2"
"@patternfly/react-core" "^4.128.2"
"@patternfly/react-styles" "^4.10.11"
classnames "^2.2.5"
patternfly "^3.59.4"

"@patternfly/react-catalog-view-extension@^4.10.13", "@patternfly/react-catalog-view-extension@^4.8.126":
version "4.11.25"
resolved "https://registry.yarnpkg.com/@patternfly/react-catalog-view-extension/-/react-catalog-view-extension-4.11.25.tgz#cddde9253046a8a5bdad948f42e4e9c69a36aef2"
Expand All @@ -176,6 +192,19 @@
classnames "^2.2.5"
patternfly "^3.59.4"

"@patternfly/[email protected]":
version "4.128.2"
resolved "https://registry.yarnpkg.com/@patternfly/react-core/-/react-core-4.128.2.tgz#dd0c218bc75a32ee41c69e3d51bead6b157c4aae"
integrity sha512-EhrxE3+V7AYVhbERrcRVH7oY6TeVRqqzaRx8HXWnyn/hxE2rTzhhaLHyjotxk9mGYmIYtMuMebBHFbX0g+6Ymg==
dependencies:
"@patternfly/react-icons" "^4.10.11"
"@patternfly/react-styles" "^4.10.11"
"@patternfly/react-tokens" "^4.11.12"
focus-trap "6.2.2"
react-dropzone "9.0.0"
tippy.js "5.1.2"
tslib "1.13.0"

"@patternfly/react-core@^4.101.3", "@patternfly/react-core@^4.121.1", "@patternfly/react-core@^4.84.4":
version "4.121.1"
resolved "https://registry.yarnpkg.com/@patternfly/react-core/-/react-core-4.121.1.tgz#25ce945c54366a202e1f581e48ff167df4d3f7fc"
Expand All @@ -189,15 +218,33 @@
tippy.js "5.1.2"
tslib "1.13.0"

"@patternfly/react-core@^4.128.2":
version "4.135.0"
resolved "https://registry.yarnpkg.com/@patternfly/react-core/-/react-core-4.135.0.tgz#b64ad4da10a8814926e28fad727bc7690cd60e66"
integrity sha512-DZcONUGOR7Znd6BsUJ4L+KrrnIpyjUvh3JNcYiHW3loytxShCGcx+a04QjOOcZm+MtFhkgs/t51yiC5IP12abA==
dependencies:
"@patternfly/react-icons" "^4.11.0"
"@patternfly/react-styles" "^4.11.0"
"@patternfly/react-tokens" "^4.12.0"
focus-trap "6.2.2"
react-dropzone "9.0.0"
tippy.js "5.1.2"
tslib "1.13.0"

"@patternfly/react-icons@^4.10.11", "@patternfly/react-icons@^4.11.0":
version "4.11.0"
resolved "https://registry.yarnpkg.com/@patternfly/react-icons/-/react-icons-4.11.0.tgz#26790eeff22dc3204aa8cd094470f0a2f915634a"
integrity sha512-WsIX34bO9rhVRmPG0jlV3GoFGfYgPC64TscNV0lxQosiVRnYIA6Z3nBSArtJsxo5Yn6c63glIefC/YTy6D/ZYg==

"@patternfly/react-icons@^4.10.7", "@patternfly/react-icons@^4.7.22":
version "4.10.7"
resolved "https://registry.yarnpkg.com/@patternfly/react-icons/-/react-icons-4.10.7.tgz#fe2eabf88512afe7dab0c0e7c71142ec6e594664"
integrity sha512-CiHYDOS8jrxNiy/KIxv9vPqg3cie4SzsbQKh+eW8lj41x68IrgILiw3VvjcJeVXXJDRW36T7u3IPKjMI6zuoyA==

"@patternfly/react-icons@^4.9.5":
"@patternfly/react-styles@^4.10.11", "@patternfly/react-styles@^4.11.0":
version "4.11.0"
resolved "https://registry.yarnpkg.com/@patternfly/react-icons/-/react-icons-4.11.0.tgz#26790eeff22dc3204aa8cd094470f0a2f915634a"
integrity sha512-WsIX34bO9rhVRmPG0jlV3GoFGfYgPC64TscNV0lxQosiVRnYIA6Z3nBSArtJsxo5Yn6c63glIefC/YTy6D/ZYg==
resolved "https://registry.yarnpkg.com/@patternfly/react-styles/-/react-styles-4.11.0.tgz#0068dcb18e1343242f93fa6024dcc077acd57fb9"
integrity sha512-4eIqTwGI4mjt9DMqX6hnan4eRS+3LUWNaneTEJdmk+flKxtAE/O/OmQHvH4GetDnlSbyfATcA0VFbVtR0aRJAg==

"@patternfly/react-styles@^4.10.7", "@patternfly/react-styles@^4.7.22":
version "4.10.7"
Expand All @@ -217,6 +264,11 @@
lodash "^4.17.19"
tslib "1.13.0"

"@patternfly/react-tokens@^4.11.12", "@patternfly/react-tokens@^4.12.0":
version "4.12.0"
resolved "https://registry.yarnpkg.com/@patternfly/react-tokens/-/react-tokens-4.12.0.tgz#2973c7f08a2f35997a0054bbf3c886b3c5c68822"
integrity sha512-Oj+GxqTtx0Yu9IDCTibZLQnpcKp58JneNKEFQkJ29WJydhPG4j6oFFElkK+ub+Ft/f9B1Ky1SsfR9eabo6IykQ==

"@patternfly/react-tokens@^4.11.8", "@patternfly/react-tokens@^4.9.22":
version "4.11.8"
resolved "https://registry.yarnpkg.com/@patternfly/react-tokens/-/react-tokens-4.11.8.tgz#ea0c9ca036f6b0506cda43e899c3248971920337"
Expand Down

0 comments on commit 07c669e

Please sign in to comment.