@patternfly/documentation-framework 1.7.0 → 2.0.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,20 +3,12 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- # 1.7.0 (2023-02-09)
6
+ # 2.0.0-alpha.1 (2023-02-13)
7
7
 
8
8
 
9
9
  ### Features
10
10
 
11
- * **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))
12
-
13
-
14
-
15
-
16
-
17
- ## 1.6.1 (2023-02-09)
18
-
19
- **Note:** Version bump only for package @patternfly/documentation-framework
11
+ * **v5:** pull in alphas, set up doc-framework alpha ([#3401](https://github.com/patternfly/patternfly-org/issues/3401)) ([082d048](https://github.com/patternfly/patternfly-org/commit/082d048f33505fb1efc39a3c9928d1552c7f9cea))
20
12
 
21
13
 
22
14
 
package/package.json CHANGED
@@ -1,10 +1,14 @@
1
1
  {
2
2
  "name": "@patternfly/documentation-framework",
3
3
  "description": "A framework to build documentation for PatternFly.",
4
- "version": "1.7.0",
4
+ "version": "2.0.0-alpha.1",
5
5
  "author": "Red Hat",
6
6
  "license": "MIT",
7
7
  "private": false,
8
+ "publishConfig": {
9
+ "access": "public",
10
+ "tag": "alpha"
11
+ },
8
12
  "bin": {
9
13
  "pf-docs-framework": "scripts/cli/cli.js"
10
14
  },
@@ -77,12 +81,12 @@
77
81
  "webpack-merge": "5.8.0"
78
82
  },
79
83
  "peerDependencies": {
80
- "@patternfly/patternfly": ">=4.185.1",
81
- "@patternfly/react-code-editor": ">=4.43.16",
82
- "@patternfly/react-core": ">=4.202.16",
83
- "@patternfly/react-table": ">=4.71.16",
84
- "react": "^16.8.0 || ^17.0.0",
85
- "react-dom": "^16.8.0 || ^17.0.0"
84
+ "@patternfly/patternfly": "^5.0.0-alpha.13",
85
+ "@patternfly/react-code-editor": "^5.0.0-alpha.7",
86
+ "@patternfly/react-core": "^5.0.0-alpha.7",
87
+ "@patternfly/react-table": "^5.0.0-alpha.7",
88
+ "react": "^17.0.0 || ^18.0.0",
89
+ "react-dom": "^17.0.0 || ^18.0.0"
86
90
  },
87
- "gitHead": "a9a48b143a7a72b044d35960fee0c8122a117b9c"
91
+ "gitHead": "b9ec67db0e229b808ea53376209393c25b3e1869"
88
92
  }
@@ -85,7 +85,6 @@ function toReactComponent(mdFilePath, source, buildMode) {
85
85
  section: frontmatter.section || '',
86
86
  subsection: frontmatter.subsection || '',
87
87
  source,
88
- tabName: frontmatter.tabName || null,
89
88
  slug,
90
89
  sourceLink: frontmatter.sourceLink || `https://github.com/patternfly/${
91
90
  sourceRepo}/blob/main/${
@@ -267,7 +266,6 @@ function sourceMDFile(file, source, buildMode) {
267
266
  section: pageData.section,
268
267
  subsection: pageData.subsection,
269
268
  source: pageData.source,
270
- tabName: pageData.tabName,
271
269
  ...(pageData.katacodaLayout && { katacodaLayout: pageData.katacodaLayout }),
272
270
  ...(pageData.hideNavItem && { hideNavItem: pageData.hideNavItem })
273
271
  };
package/templates/mdx.js CHANGED
@@ -121,15 +121,7 @@ export const MDXTemplate = ({
121
121
  id,
122
122
  componentsData
123
123
  }) => {
124
- // Build obj mapping source names to text displayed on tabs
125
- const tabNames = sources.reduce((acc, curSrc) => {
126
- const { source, tabName } = curSrc;
127
- // use tabName for tab name if present, otherwise default to source
128
- const tabLinkText = tabName || capitalize(source.replace('html', 'HTML').replace(/-/g, ' '));
129
- acc[source] = tabLinkText;
130
- return acc;
131
- }, {});
132
- const sourceKeys = Object.keys(tabNames);
124
+ const sourceKeys = sources.map(v => v.source);
133
125
  const isSinglePage = sourceKeys.length === 1;
134
126
 
135
127
  let isDevResources, isComponent, isExtension, isChart, isDemo, isLayout, isUtility;
@@ -231,7 +223,7 @@ export const MDXTemplate = ({
231
223
  onClick={() => trackEvent('tab_click', 'click_event', source.toUpperCase())}
232
224
  >
233
225
  <Link className="pf-c-tabs__link" to={`${path}${index === 0 ? '' : '/' + source}`}>
234
- {tabNames[source]}
226
+ {capitalize(source.replace('html', 'HTML').replace(/-/g, ' '))}
235
227
  </Link>
236
228
  </li>
237
229
  ))}
@@ -7,8 +7,6 @@ section: extensions
7
7
  id: My extension
8
8
  # Tab (react | react-demos | html | html-demos | design-guidelines | accessibility)
9
9
  source: design-guidelines
10
- # Optional custom text to display in tab in place of source
11
- tabName: My custom tab-name
12
10
  ---
13
11
 
14
12
  Design guidelines intro
@@ -7,8 +7,6 @@ section: extensions
7
7
  id: My extension
8
8
  # Tab (react | react-demos | html | html-demos | design-guidelines | accessibility)
9
9
  source: react
10
- # Optional custom text to display in tab in place of source
11
- tabName: My custom tab-name
12
10
  # If you use typescript, the name of the interface to display props for
13
11
  # These are found through the sourceProps function provdided in patternfly-docs.source.js
14
12
  # Can also pass object { component: string, source: string } allowing to specify the source
package/versions.json CHANGED
@@ -1,5 +1,25 @@
1
1
  {
2
2
  "Releases": [
3
+ {
4
+ "name": "alphas",
5
+ "date": "2022-02-08",
6
+ "latest": true,
7
+ "versions": {
8
+ "@patternfly/patternfly": "5.0.0-alpha.13",
9
+ "@patternfly/react-catalog-view-extension": "4.95.1",
10
+ "@patternfly/react-charts": "7.0.0-alpha.3",
11
+ "@patternfly/react-code-editor": "5.0.0-alpha.7",
12
+ "@patternfly/react-core": "5.0.0-alpha.7",
13
+ "@patternfly/react-icons": "5.0.0-alpha.2",
14
+ "@patternfly/react-inline-edit-extension": "4.86.118",
15
+ "@patternfly/react-log-viewer": "4.87.100",
16
+ "@patternfly/react-styles": "5.0.0-alpha.2",
17
+ "@patternfly/react-table": "5.0.0-alpha.7",
18
+ "@patternfly/react-tokens": "5.0.0-alpha.2",
19
+ "@patternfly/react-topology": "4.91.27",
20
+ "@patternfly/react-virtualized-extension": "4.88.113"
21
+ }
22
+ },
3
23
  {
4
24
  "name": "2023.01",
5
25
  "date": "2022-01-31",