From 9ea2fd80b71eb047a788eb62478619b05c5abbb8 Mon Sep 17 00:00:00 2001 From: Katie McFaul Date: Thu, 31 Oct 2024 09:55:53 -0400 Subject: [PATCH 1/3] fix(section gallery): add exception for Tile --- .../sectionGallery/sectionGalleryWrapper.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/documentation-framework/components/sectionGallery/sectionGalleryWrapper.js b/packages/documentation-framework/components/sectionGallery/sectionGalleryWrapper.js index 9b67b94f84..7f4b222c13 100644 --- a/packages/documentation-framework/components/sectionGallery/sectionGalleryWrapper.js +++ b/packages/documentation-framework/components/sectionGallery/sectionGalleryWrapper.js @@ -74,8 +74,16 @@ export const SectionGalleryWrapper = ({ sources && sources.some( (source) => - source.source === 'react-deprecated' || - source.source === 'html-deprecated' + (source.source === 'react-deprecated' || + source.source === 'html-deprecated') && + // TODO: remove hardcoded Tile when Core PR merges + // https://github.com/patternfly/patternfly/pull/7178 + (source.id === 'Tile' || + !navObj.sources.some( + (source) => + source.source === 'react' || + source.source === 'html' + )) ) && !sources.some( (source) => source.source === 'react' || source.source === 'html' From a89626770b675466c7b15a42c5afedfaeb80b65f Mon Sep 17 00:00:00 2001 From: Katie McFaul Date: Thu, 31 Oct 2024 09:56:45 -0400 Subject: [PATCH 2/3] fix reference --- .../components/sectionGallery/sectionGalleryWrapper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/documentation-framework/components/sectionGallery/sectionGalleryWrapper.js b/packages/documentation-framework/components/sectionGallery/sectionGalleryWrapper.js index 7f4b222c13..32c8669803 100644 --- a/packages/documentation-framework/components/sectionGallery/sectionGalleryWrapper.js +++ b/packages/documentation-framework/components/sectionGallery/sectionGalleryWrapper.js @@ -79,7 +79,7 @@ export const SectionGalleryWrapper = ({ // TODO: remove hardcoded Tile when Core PR merges // https://github.com/patternfly/patternfly/pull/7178 (source.id === 'Tile' || - !navObj.sources.some( + !sources.some( (source) => source.source === 'react' || source.source === 'html' From 9cfe9bf3711757ccbb2b71c4cfa0a0f27286fab8 Mon Sep 17 00:00:00 2001 From: Katie McFaul Date: Thu, 31 Oct 2024 10:30:54 -0400 Subject: [PATCH 3/3] alternate workaround --- .../sectionGallery/sectionGalleryWrapper.js | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/packages/documentation-framework/components/sectionGallery/sectionGalleryWrapper.js b/packages/documentation-framework/components/sectionGallery/sectionGalleryWrapper.js index 32c8669803..d6cb743f2f 100644 --- a/packages/documentation-framework/components/sectionGallery/sectionGalleryWrapper.js +++ b/packages/documentation-framework/components/sectionGallery/sectionGalleryWrapper.js @@ -70,24 +70,19 @@ export const SectionGalleryWrapper = ({ const id = itemData.id || title; // Display beta label if tab other than a '-next' tab is marked Beta const isDeprecated = + // TODO: remove hardcoded Tile when Core PR merges + // https://github.com/patternfly/patternfly/pull/7178 + id === 'Tile' || ( !isSubsection && sources && sources.some( (source) => - (source.source === 'react-deprecated' || - source.source === 'html-deprecated') && - // TODO: remove hardcoded Tile when Core PR merges - // https://github.com/patternfly/patternfly/pull/7178 - (source.id === 'Tile' || - !sources.some( - (source) => - source.source === 'react' || - source.source === 'html' - )) + source.source === 'react-deprecated' || + source.source === 'html-deprecated' ) && !sources.some( (source) => source.source === 'react' || source.source === 'html' - ); + )); const isBeta = !isSubsection && sources &&