Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
6902fdd
changes to tooltip guidelines (#3400)
tiyiprh Feb 9, 2023
37ad6e0
chore(release): releasing packages [ci skip]
patternfly-build Feb 9, 2023
093c6c7
feat(docs): customize tabs with optional tabText frontmatter (#3394)
evwilkin Feb 9, 2023
a9a48b1
chore(release): releasing packages [ci skip]
patternfly-build Feb 9, 2023
b630ed9
feat(docs): enabled manual ordering of sidenav (#3403)
evwilkin Feb 9, 2023
473ad93
chore(release): releasing packages [ci skip]
patternfly-build Feb 9, 2023
0294ebd
fix(whitespace): test github actions
nicolethoen Feb 13, 2023
138065a
add action guidance (#3347)
mmenestr Feb 20, 2023
40d1a8a
chore(release): releasing packages [ci skip]
patternfly-build Feb 20, 2023
a8dee99
feat(trainings): remove broken trainings and replace some with blog s…
nicolethoen Feb 27, 2023
8efb032
chore(release): releasing packages [ci skip]
patternfly-build Feb 27, 2023
ac6752c
docs(Badge): Small typo in a11y section (#3405)
Venefilyn Feb 27, 2023
7a23c00
chore(release): releasing packages [ci skip]
patternfly-build Feb 27, 2023
d52628e
Updates colors guideline content. (#3233)
edonehoo Mar 1, 2023
6987bc9
chore(release): releasing packages [ci skip]
patternfly-build Mar 1, 2023
f3eb5bf
feat(docs): add react console documentation (#3366)
wise-king-sullyman Mar 1, 2023
2f21780
chore(release): releasing packages [ci skip]
patternfly-build Mar 1, 2023
39a2852
chore: remove hard coded GA ID (#3431)
evwilkin Mar 2, 2023
ee80668
chore(release): releasing packages [ci skip]
patternfly-build Mar 2, 2023
d06eb61
fix(menu): update and clarify description (#3438)
nicolethoen Mar 8, 2023
78bd2ec
chore(release): releasing packages [ci skip]
patternfly-build Mar 8, 2023
6c75f76
updates to skeleton guidelines (#3422)
kelseamann Mar 13, 2023
c1e36fc
chore(release): releasing packages [ci skip]
patternfly-build Mar 13, 2023
f5066aa
fix(release): update docs for 2023.02 release (#3453)
nicolethoen Mar 27, 2023
6109756
chore(release): releasing packages [ci skip]
patternfly-build Mar 27, 2023
7b43e14
Added guidance around disabling menu actions (#3424)
kaedward Mar 29, 2023
09c2e26
feat(v5): pull in alphas, set up doc-framework alpha (#3401)
nicolethoen Feb 13, 2023
88b18f7
chore(release): releasing packages [ci skip]
patternfly-build Feb 13, 2023
8d409e5
fix(whitespace): test github actions
nicolethoen Feb 13, 2023
e57594c
chore(release): releasing packages [ci skip]
patternfly-build Feb 13, 2023
dcfeb63
chore(release): releasing packages [ci skip]
patternfly-build Feb 13, 2023
12a002f
fix(README): small wording change to test build
nicolethoen Feb 27, 2023
ae00121
chore(release): releasing packages [ci skip]
patternfly-build Feb 27, 2023
1f92cb9
fix(404 Page): Removed CardHeaderMain (#3429)
tlabaj Mar 1, 2023
9a2b07a
chore(release): releasing packages [ci skip]
patternfly-build Mar 1, 2023
e097da6
chore(Card): update a11y card docs (#3384)
jenny-s51 Mar 1, 2023
6085b18
chore(release): releasing packages [ci skip]
patternfly-build Mar 1, 2023
9697ac4
chore(multiple): updated verbiage for arialabel props or attributes (…
thatblindgeye Mar 1, 2023
718e3dd
chore(release): releasing packages [ci skip]
patternfly-build Mar 1, 2023
23bfc79
feat(docs-framework): add legacy ssl cli option (#3433)
wise-king-sullyman Mar 3, 2023
051cb11
chore(release): releasing packages [ci skip]
patternfly-build Mar 3, 2023
888a969
fix(versions): add alpha.0 of drag-drop
nicolethoen Mar 9, 2023
4153b27
fix(versions): fix typo
nicolethoen Mar 9, 2023
46c232e
chore(release): releasing packages [ci skip]
patternfly-build Mar 9, 2023
50095fd
Update to website title PatternFly 5 (#3443)
mcarrano Mar 15, 2023
77d6520
chore(release): releasing packages [ci skip]
patternfly-build Mar 15, 2023
22916a5
Update website IA for v5 (#3416)
mcarrano Mar 29, 2023
bd00a6d
chore(release): releasing packages [ci skip]
patternfly-build Mar 29, 2023
47598e4
updated community with yew (#3461)
evwilkin Mar 30, 2023
14c3823
chore(release): releasing packages [ci skip]
patternfly-build Mar 30, 2023
34a974a
chore(webpack5): Initial working commit with webpack5 (#3454)
dgutride Mar 31, 2023
37d0652
chore(release): releasing packages [ci skip]
patternfly-build Mar 31, 2023
62f1dc8
fix(Tables): temporarily comment out tables so Table can be deprecate…
nicolethoen Apr 3, 2023
5259a1d
chore(release): releasing packages [ci skip]
patternfly-build Apr 3, 2023
4db99f9
Iss3159 (#3442)
kuklas Apr 6, 2023
b5d19c8
chore(release): releasing packages [ci skip]
patternfly-build Apr 6, 2023
87b809f
rebased from main
evwilkin Apr 10, 2023
7004554
Merge branch 'v5' into chore/3470-rebase-v5
evwilkin Apr 10, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/documentation-framework/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import './layouts/sideNavLayout/sideNavLayout.css';
const AppRoute = ({ child, katacodaLayout, title, path }) => {
const pathname = useLocation().pathname;
if (typeof window !== 'undefined' && window.gtag) {
gtag('config', 'UA-47523816-6', {
gtag('config', process.env.googleAnalyticsID, {
'page_path': pathname,
'page_title': (title || pathname)
});
Expand Down
13 changes: 10 additions & 3 deletions packages/documentation-framework/components/sideNav/sideNav.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ const getIsActive = (location, section, subsection = null) => {
return location.pathname.startsWith(`${process.env.pathPrefix}${slug}`);
}

const defaultValue = 50;

const NavItem = ({ text, href }) => {
const isMobileView = window.innerWidth < Number.parseInt(globalBreakpointXl.value, 10);
return (
Expand Down Expand Up @@ -67,9 +69,14 @@ const ExpandableNav = ({groupedRoutes, location, section, subsection = null}) =>
}}
>
{Object.entries(routes || {})
.filter(([id, { hideNavItem }]) => !Boolean(hideNavItem) && (id !== 'isSubsection'))
.map(([id, { slug, isSubsection = false }]) => ({ text: id, href: slug, isSubsection }))
.sort(({ text: text1 }, { text: text2 }) => text1.localeCompare(text2))
.filter(([id, navObj]) => !Boolean(navObj.hideNavItem) && (Object.entries(navObj).length > 0))
.map(([id, { slug, isSubsection = false, sortValue = defaultValue, subsectionSortValue = defaultValue }]) => ({ text: id, href: slug, isSubsection, sortValue: (isSubsection ? subsectionSortValue : sortValue) }))
.sort(({text: text1, sortValue: sortValue1}, {text: text2, sortValue: sortValue2}) => {
if (sortValue1 === sortValue2) {
return text1.localeCompare(text2);
}
return sortValue1 > sortValue2 ? 1 : -1;
})
.map(navObj => navObj.isSubsection
? ExpandableNav({groupedRoutes, location, section, subsection: navObj.text})
: NavItem(navObj)
Expand Down
23 changes: 19 additions & 4 deletions packages/documentation-framework/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ const routes = {
...generatedRoutes
};

const defaultOrder = 50;

for (let route in routes) {
const pageData = routes[route];
if (pageData.SyncComponent) {
Expand All @@ -28,7 +30,7 @@ const isNull = o => o === null || o === undefined;
const groupedRoutes = Object.entries(routes)
.filter(([_slug, { id, section }]) => !isNull(id) && !isNull(section))
.reduce((accum, [slug, pageData]) => {
const { section, subsection = null, id, title, source, katacodaLayout, hideNavItem, relPath } = pageData;
const { section, subsection = null, id, title, source, katacodaLayout, hideNavItem, relPath, sortValue = null, subsectionSortValue = null } = pageData;
pageData.slug = slug;
// add section to groupedRoutes obj if not yet created
accum[section] = accum[section] || {};
Expand All @@ -42,7 +44,9 @@ const groupedRoutes = Object.entries(routes)
sources: [],
katacodaLayout,
hideNavItem,
relPath
relPath,
...(sortValue && { sortValue }),
...(subsectionSortValue && { subsectionSortValue })
}
// add page to groupedRoutes obj section or subsection
if (subsection) {
Expand All @@ -52,10 +56,21 @@ const groupedRoutes = Object.entries(routes)
// add page to subsection
accum[section][subsection][id] = accum[section][subsection][id] || data;
accum[section][subsection][id].sources.push(pageData);
// nav item ordering
if (sortValue) {
accum[section][subsection].sortValue = sortValue;
}
if (subsectionSortValue) {
accum[section][subsection].subsectionSortValue = subsectionSortValue;
}
} else {
// add page to section
accum[section][id] = accum[section][id] || data;
accum[section][id].sources.push(pageData);
// nav item ordering
if (sortValue) {
accum[section][id].sortValue = sortValue;
}
}

return accum;
Expand All @@ -73,7 +88,6 @@ const sourceOrder = {
'design-guidelines': 99,
'accessibility': 100
};
const defaultOrder = 50;

const sortSources = ({ source: s1 }, { source: s2 }) => {
const s1Index = sourceOrder[s1] || defaultOrder;
Expand Down Expand Up @@ -108,7 +122,8 @@ Object.entries(groupedRoutes)
// Loop through each page in expandable subsection
if (pageData.isSubsection) {
Object.entries(pageData).map(([section, ids]) => {
if (section !== 'isSubsection') {
// only push nested page objects
if (ids && ids?.id) {
pageDataArr.push(ids);
}
})
Expand Down
12 changes: 11 additions & 1 deletion packages/documentation-framework/scripts/md/parseMD.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ function toReactComponent(mdFilePath, source, buildMode) {
section: frontmatter.section || '',
subsection: frontmatter.subsection || '',
source,
tabName: frontmatter.tabName || null,
slug,
sourceLink: frontmatter.sourceLink || `https://github.com/patternfly/${
sourceRepo}/blob/main/${
Expand Down Expand Up @@ -126,6 +127,12 @@ function toReactComponent(mdFilePath, source, buildMode) {
if (frontmatter.hideNavItem) {
pageData.hideNavItem = frontmatter.hideNavItem;
}
if (frontmatter.sortValue) {
pageData.sortValue = frontmatter.sortValue;
}
if (frontmatter.subsectionSortValue) {
pageData.subsectionSortValue = frontmatter.subsectionSortValue;
}
})
// Delete HTML comments
.use(require('./remove-comments'))
Expand Down Expand Up @@ -266,8 +273,11 @@ function sourceMDFile(file, source, buildMode) {
section: pageData.section,
subsection: pageData.subsection,
source: pageData.source,
tabName: pageData.tabName,
...(pageData.katacodaLayout && { katacodaLayout: pageData.katacodaLayout }),
...(pageData.hideNavItem && { hideNavItem: pageData.hideNavItem })
...(pageData.hideNavItem && { hideNavItem: pageData.hideNavItem }),
...(pageData.sortValue && { sortValue: pageData.sortValue }),
...(pageData.subsectionSortValue && { subsectionSortValue: pageData.subsectionSortValue })
};
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ module.exports = (_env, argv) => {
const {
pathPrefix = '',
mode,
googleAnalyticsID = false,
algolia = {},
hasGdprBanner = false,
hasFooter = false,
Expand Down Expand Up @@ -40,9 +41,12 @@ module.exports = (_env, argv) => {
include: [
path.resolve(process.cwd(), 'src'),
path.resolve(process.cwd(), 'patternfly-docs'),
path.resolve(process.cwd(), 'examples'),
path.resolve(__dirname, '../..'), // Temporarily compile theme using webpack for development
/react-[\w-]+\/src\/.*\/examples/,
/react-[\w-]+\\src\\.*\\examples/, // fix for Windows
/react-[\w-]+\/patternfly-docs\/.*\/examples/, //fixes for extensions
/react-[\w-]+\\patternfly-docs\\.*\\examples/,
].concat(includePaths.map(path => new RegExp(path))),
exclude: [
path.resolve(__dirname, '../../node_modules'), // Temporarily compile theme using webpack for development
Expand Down Expand Up @@ -134,6 +138,7 @@ module.exports = (_env, argv) => {
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify(mode),
'process.env.pathPrefix': JSON.stringify(isProd ? pathPrefix : ''),
'process.env.googleAnalyticsID': JSON.stringify(isProd ? googleAnalyticsID : ''),
'process.env.algolia': JSON.stringify(algolia),
'process.env.hasGdprBanner': JSON.stringify(hasGdprBanner),
'process.env.hasFooter': JSON.stringify(hasFooter),
Expand Down
12 changes: 10 additions & 2 deletions packages/documentation-framework/templates/mdx.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,15 @@ export const MDXTemplate = ({
id,
componentsData
}) => {
const sourceKeys = sources.map(v => v.source);
// Build obj mapping source names to text displayed on tabs
const tabNames = sources.reduce((acc, curSrc) => {
const { source, tabName } = curSrc;
// use tabName for tab name if present, otherwise default to source
const tabLinkText = tabName || capitalize(source.replace('html', 'HTML').replace(/-/g, ' '));
acc[source] = tabLinkText;
return acc;
}, {});
const sourceKeys = Object.keys(tabNames);
const isSinglePage = sourceKeys.length === 1;

let isDevResources, isComponent, isExtension, isChart, isDemo, isLayout, isUtility;
Expand Down Expand Up @@ -223,7 +231,7 @@ export const MDXTemplate = ({
onClick={() => trackEvent('tab_click', 'click_event', source.toUpperCase())}
>
<Link className="pf-c-tabs__link" to={`${path}${index === 0 ? '' : '/' + source}`}>
{capitalize(source.replace('html', 'HTML').replace(/-/g, ' '))}
{tabNames[source]}
</Link>
</li>
))}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ section: extensions
id: My extension
# Tab (react | react-demos | html | html-demos | design-guidelines | accessibility)
source: design-guidelines
# Optional custom text to display in tab in place of source
tabName: My custom tab-name
---

Design guidelines intro
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ section: extensions
id: My extension
# Tab (react | react-demos | html | html-demos | design-guidelines | accessibility)
source: react
# Optional custom text to display in tab in place of source
tabName: My custom tab-name
# If you use typescript, the name of the interface to display props for
# These are found through the sourceProps function provdided in patternfly-docs.source.js
# Can also pass object { component: string, source: string } allowing to specify the source
Expand Down
21 changes: 20 additions & 1 deletion packages/documentation-framework/versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,29 @@
"@patternfly/react-virtualized-extension": "4.88.113"
}
},
{
"name": "2023.02",
"date": "2022-03-27",
"versions": {
"@patternfly/patternfly": "4.224.4",
"@patternfly/react-catalog-view-extension": "4.96.0",
"@patternfly/react-charts": "6.94.19",
"@patternfly/react-code-editor": "4.82.115",
"@patternfly/react-console": "4.95.5",
"@patternfly/react-core": "4.276.8",
"@patternfly/react-icons": "4.93.6",
"@patternfly/react-inline-edit-extension": "4.86.122",
"@patternfly/react-log-viewer": "4.87.100",
"@patternfly/react-styles": "4.92.6",
"@patternfly/react-table": "4.113.0",
"@patternfly/react-tokens": "4.94.6",
"@patternfly/react-topology": "4.91.40",
"@patternfly/react-virtualized-extension": "4.88.115"
}
},
{
"name": "2023.01",
"date": "2022-01-31",
"latest": true,
"versions": {
"@patternfly/patternfly": "4.224.2",
"@patternfly/react-catalog-view-extension": "4.95.1",
Expand Down
114 changes: 114 additions & 0 deletions packages/v4/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,120 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## 4.21.4 (2023-03-27)


### Bug Fixes

* **release:** update docs for 2023.02 release ([#3453](https://github.com/patternfly/patternfly-org/issues/3453)) ([f5066aa](https://github.com/patternfly/patternfly-org/commit/f5066aa0faff8e0ac0045daf4a689cf40b1bddcf))





## 4.21.3 (2023-03-13)

**Note:** Version bump only for package patternfly-org-4





## 4.21.2 (2023-03-08)


### Bug Fixes

* **menu:** update and clarify description ([#3438](https://github.com/patternfly/patternfly-org/issues/3438)) ([d06eb61](https://github.com/patternfly/patternfly-org/commit/d06eb619e6bfd185ade10fcfcd703003ec0e606f))





## 4.21.1 (2023-03-02)

**Note:** Version bump only for package patternfly-org-4





# 4.21.0 (2023-03-01)


### Features

* **docs:** add react console documentation ([#3366](https://github.com/patternfly/patternfly-org/issues/3366)) ([f3eb5bf](https://github.com/patternfly/patternfly-org/commit/f3eb5bf0ee2557c93068e01e68de1953d6f67716))





## 4.20.2 (2023-03-01)

**Note:** Version bump only for package patternfly-org-4





## 4.20.1 (2023-02-27)

**Note:** Version bump only for package patternfly-org-4





# 4.20.0 (2023-02-27)


### Features

* **trainings:** remove broken trainings and replace some with blog style training ([#3353](https://github.com/patternfly/patternfly-org/issues/3353)) ([a8dee99](https://github.com/patternfly/patternfly-org/commit/a8dee99d6b4d1f702b070653a6823e389f7d9759))





## 4.19.1 (2023-02-20)

**Note:** Version bump only for package patternfly-org-4





# 4.19.0 (2023-02-09)


### Features

* **docs:** enabled manual ordering of sidenav ([#3403](https://github.com/patternfly/patternfly-org/issues/3403)) ([b630ed9](https://github.com/patternfly/patternfly-org/commit/b630ed9e7062e1302d58793bfec65d49da7764d3))





# 4.18.0 (2023-02-09)


### Features

* **docs:** customize tabs with optional tabText frontmatter ([#3394](https://github.com/patternfly/patternfly-org/issues/3394)) ([093c6c7](https://github.com/patternfly/patternfly-org/commit/093c6c77053f544605d40f8918dc5621829ac7c3))





## 4.17.1 (2023-02-09)

**Note:** Version bump only for package patternfly-org-4





# 4.17.0 (2023-02-07)


Expand Down
9 changes: 5 additions & 4 deletions packages/v4/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "patternfly-org-4",
"description": "Documentation for PatternFly 4.",
"private": true,
"version": "4.17.0",
"version": "4.21.4",
"author": "Red Hat",
"license": "MIT",
"scripts": {
Expand All @@ -18,11 +18,12 @@
},
"dependencies": {
"@patternfly/documentation-framework": "^2.0.0-alpha.0",
"@patternfly/quickstarts": "^2.3.3",
"@patternfly/react-catalog-view-extension": "4.95.1",
"@patternfly/quickstarts": "^2.4.0",
"@patternfly/react-catalog-view-extension": "^4.96.0",
"@patternfly/react-console": "^4.95.5",
"@patternfly/react-docs": "6.0.0-alpha.8",
"@patternfly/react-log-viewer": "4.87.100",
"@patternfly/react-topology": "^4.91.27",
"@patternfly/react-topology": "^4.91.40",
"react": "^17.0.0 || ^18.0.0",
"react-dom": "^17.0.0 || ^18.0.0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/v4/patternfly-docs/components-data.json
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@
},
"menu": {
"illustration": "./images/component-illustrations/menu.png",
"summary": "A <b>menu</b> is a list of options or actions that users can choose from. It can be used in a variety of contexts whenever the user needs to choose between multiple values, options, or actions. A menu can be opened in a <Link to='/components/dropdown'>dropdown</Link> or <Link to='/components/select'>select list</Link>, or it can be revealed by right clicking on a specific region within a page."
"summary": "A <b>menu</b> is a list of options or actions that users can choose from. It can be used in a variety of contexts whenever the user needs to choose between multiple values, options, or actions. A menu is most often paired with a <Link to='/components/menu-toggle'>menu toggle</Link> as its trigger, but can also be used inline or can be attached to other interactable elements to toggle it open and close."
},
"modal": {
"illustration": "./images/component-illustrations/modal.png",
Expand Down
Loading