Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export const AutoLinkHeader = ({
component={headingLevel}
className={css('ws-heading', className)}
tabIndex={-1}
isEditorial
>
<Link href={`#${slug}`} className="ws-heading-anchor" tabIndex="-1" aria-hidden>
<LinkIcon className="ws-heading-anchor-icon" style={{ verticalAlign: 'middle' }} />
Expand Down
15 changes: 8 additions & 7 deletions packages/documentation-framework/components/footer/footer.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import React from "react";
import {
Brand,
Grid,
Expand All @@ -7,11 +7,11 @@ import {
ListItem,
PageSection,
Content,
} from '@patternfly/react-core';
import { Link } from '@patternfly/documentation-framework/components';
import { GithubIcon, TwitterIcon } from '@patternfly/react-icons';
import redhatLogo from './RHLogo.png';
import redhatLogoDark from './RHLogoDark.png';
} from "@patternfly/react-core";
import { Link } from "@patternfly/documentation-framework/components";
import { GithubIcon, TwitterIcon } from "@patternfly/react-icons";
import redhatLogo from "./RHLogo.png";
import redhatLogoDark from "./RHLogoDark.png";

export const Footer = ({ isDarkTheme }) => (
<React.Fragment>
Expand Down Expand Up @@ -39,7 +39,7 @@ export const Footer = ({ isDarkTheme }) => (
<ListItem className="ws-org-pfsite-footer-menu-list-item">
<Link
className="ws-org-pfsite-footer-menu-link"
to={'/get-started/about-patternfly'}
to={"/get-started/about-patternfly"}
aria-label="Get started with PatternFly"
>
Get started
Expand Down Expand Up @@ -237,6 +237,7 @@ export const Footer = ({ isDarkTheme }) => (
<Content
component="p"
className="ws-org-pfsite-footer-menu-about-description"
isEditorial
>
PatternFly is an open source design system built to drive
consistency and unify teams. From documentation and components
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,28 @@ import { Content } from "@patternfly/react-core";

// convert summary text from string to jsx, remove links
export const SummaryComponent = ({ id, itemsData }) => {
const itemDasherized = id.split(' ').join('-').toLowerCase();
const itemDasherized = id.split(" ").join("-").toLowerCase();
const summary = itemsData?.[itemDasherized]?.summary;
if (!summary) {
return null;
}
// Remove anchor tags to avoid <a> in summary nested within <a> of Link card/datalistitem
const summaryNoLinks = summary.replace(/<Link[^>]*>([^<]+)<\/Link>/gm, '$1');
const summaryNoLinks = summary.replace(/<Link[^>]*>([^<]+)<\/Link>/gm, "$1");
const { code } = convertToReactComponent(`<>${summaryNoLinks}</>`);
const getSummaryComponent = new Function('React', code);
const getSummaryComponent = new Function("React", code);
return getSummaryComponent(React);
}
};

export const TextSummary = ({ id, itemsData }) => {
if (!id) {
return null;
}

return (
<Content>
<Content isEditorial>
<Content component="p">
<SummaryComponent id={id} itemsData={itemsData} />
</Content>
</Content>
)
);
};
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import React from "react";
import {
DataList,
DataListItem,
Expand All @@ -10,17 +10,17 @@ import {
Content,
ContentVariants,
Label,
} from '@patternfly/react-core';
import { Link } from '../link/link';
import { TextSummary } from './TextSummary';
} from "@patternfly/react-core";
import { Link } from "../link/link";
import { TextSummary } from "./TextSummary";

export const SectionDataListLayout = ({
galleryItems,
layoutView,
hasListText,
hasListImages,
}) => {
if (layoutView !== 'list') {
if (layoutView !== "list") {
return null;
}

Expand Down Expand Up @@ -55,9 +55,9 @@ export const SectionDataListLayout = ({
</DataListCell>
),
<DataListCell width={5} key="text-description">
<Split className={hasListText ? 'pf-v6-u-mb-md' : null}>
<Split className={hasListText ? "pf-v6-u-mb-md" : null}>
<SplitItem isFilled>
<Content>
<Content isEditorial>
<Content component={ContentVariants.h2}>
<span>{title}</span>
</Content>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import React from "react";
import {
Button,
SearchInput,
Expand All @@ -10,18 +10,18 @@ import {
ContentVariants,
ToggleGroup,
ToggleGroupItem,
} from '@patternfly/react-core';
import ListIcon from '@patternfly/react-icons/dist/esm/icons/list-icon';
import ThIcon from '@patternfly/react-icons/dist/esm/icons/th-icon';
} from "@patternfly/react-core";
import ListIcon from "@patternfly/react-icons/dist/esm/icons/list-icon";
import ThIcon from "@patternfly/react-icons/dist/esm/icons/th-icon";

export const SectionGalleryToolbar = ({
galleryItems,
searchTerm,
setSearchTerm,
layoutView,
setLayoutView,
placeholderText = 'Search by name',
countText = ' items',
placeholderText = "Search by name",
countText = " items",
}) => (
<Toolbar isSticky>
<ToolbarContent>
Expand All @@ -35,7 +35,7 @@ export const SectionGalleryToolbar = ({
</ToolbarItem>
{searchTerm && (
<ToolbarItem>
<Button variant="link" onClick={() => setSearchTerm('')}>
<Button variant="link" onClick={() => setSearchTerm("")}>
Reset
</Button>
</ToolbarItem>
Expand All @@ -46,25 +46,25 @@ export const SectionGalleryToolbar = ({
<ToggleGroupItem
icon={<ThIcon />}
aria-label="grid icon button"
isSelected={layoutView === 'grid'}
onChange={() => setLayoutView('grid')}
isSelected={layoutView === "grid"}
onChange={() => setLayoutView("grid")}
></ToggleGroupItem>
<ToggleGroupItem
icon={<ListIcon />}
aria-label="list icon button"
isSelected={layoutView === 'list'}
onChange={() => setLayoutView('list')}
isSelected={layoutView === "list"}
onChange={() => setLayoutView("list")}
></ToggleGroupItem>
</ToggleGroup>
</ToolbarItem>
</ToolbarGroup>
<ToolbarItem
variant="pagination"
gap={{ default: 'gapMd', md: 'gapNone' }}
style={{ '--pf-v6-c-toolbar__item--MinWidth': 'max-content' }}
gap={{ default: "gapMd", md: "gapNone" }}
style={{ "--pf-v6-c-toolbar__item--MinWidth": "max-content" }}
className="pf-m-align-self-center"
>
<Content component={ContentVariants.small}>
<Content isEditorial component={ContentVariants.small}>
{galleryItems.length}
{countText}
</Content>
Expand Down
2 changes: 1 addition & 1 deletion packages/documentation-framework/scripts/md/styled-tags.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function styledTags() {
node.properties.className = node.properties.className || '';

if (contentStyledMdTags.includes(node.tagName)) {
node.properties.className += `pf-v6-c-content--${node.tagName}`;
node.properties.className += `pf-v6-c-content--${node.tagName} pf-m-editorial`;
}

if (styledMdTags.includes(node.tagName)) {
Expand Down
2 changes: 1 addition & 1 deletion packages/documentation-framework/templates/mdx.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ export const MDXTemplate = ({
variant={!isSinglePage ? PageSectionVariants.light : ""}
isWidthLimited
>
<Content>
<Content isEditorial>
<Flex alignItems={{ default: 'alignItemsCenter'}}>
<FlexItem>
<Title headingLevel='h1' size='4xl' id="ws-page-title">
Expand Down
2 changes: 1 addition & 1 deletion packages/documentation-site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"screenshots": "pf-docs-framework screenshots"
},
"dependencies": {
"@patternfly/documentation-framework": "6.0.0-alpha.100",
"@patternfly/documentation-framework": "6.0.0-alpha.102",
"@patternfly/react-catalog-view-extension": "6.0.0-alpha.7",
"@patternfly/react-console": "6.0.0-prerelease.1",
"@patternfly/react-docs": "7.0.0-prerelease.24",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const ColorFamily = ({color, computedStyles}) => {

return (
<GridItem>
<Content className="ws-heading ws-title" component="h3">{color} family</Content>
<Content className="ws-heading ws-title" component="h3" isEditorial>{color} family</Content>
<Flex direction={{ default: 'column' }} gap={{ default: 'gapMd' }}>
{entries}
</Flex>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ export function ColorFamily({
}) {
const [expanded, setExpanded] = React.useState([]);
const rootTokens = tokens[':root'];

const familyTokens = Object.values(rootTokens).filter(token => token.name.includes(`${palettePrefix}${family}--`));

if (family === 'gray') {
const whiteToken = rootTokens.t_color_white;
familyTokens.unshift(whiteToken);
Expand Down Expand Up @@ -69,9 +69,9 @@ export function ColorFamily({
{tokenList?.length > 0 ? (
<>
<Title headingLevel="h4" size="md">Semantic tokens<span className='pf-v6-screen-reader'>for {token.value.toUpperCase()}</span></Title>
<Content className="pf-v6-u-m-sm" component={ContentVariants.ol} isPlainList>
<Content isEditorial className="pf-v6-u-m-sm" component={ContentVariants.ol} isPlainList>
{tokenList.map(tokenName =>
<Content component={ContentVariants.li} key={tokenName}>{tokenName}</Content>
<Content isEditorial component={ContentVariants.li} key={tokenName}>{tokenName}</Content>
)}
</Content>
</>
Expand Down
5 changes: 1 addition & 4 deletions packages/documentation-site/patternfly-docs/pages/home.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,7 @@ const HomePage = () => (
<span className="pf-v6-u-primary-color-100"> open </span>
with PatternFly
</Title>
<Content
component={ContentVariants.p}
className="pf-v6-u-font-size-lg"
>
<Content component={ContentVariants.p} className="pf-v6-u-font-size-lg">
PatternFly is an open source design system that enables teams to
create consistent and scalable enterprise products. PatternFly is
sponsored and maintained by Red Hat, but is open to all.
Expand Down
39 changes: 26 additions & 13 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5491,10 +5491,10 @@ exponential-backoff@^3.1.1:
resolved "https://registry.npmjs.org/exponential-backoff/-/exponential-backoff-3.1.1.tgz#64ac7526fe341ab18a39016cd22c787d01e00bf6"
integrity sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw==

express@4.20.0:
version "4.20.0"
resolved "https://registry.yarnpkg.com/express/-/express-4.20.0.tgz#f1d08e591fcec770c07be4767af8eb9bcfd67c48"
integrity sha512-pLdae7I6QqShF5PnNTCVn4hI91Dx0Grkn2+IAsMTgMIKuQVte2dN9PeGSSAME2FR8anOhVA62QDIUaWVfEXVLw==
express@4.21.0:
version "4.21.0"
resolved "https://registry.yarnpkg.com/express/-/express-4.21.0.tgz#d57cb706d49623d4ac27833f1cbc466b668eb915"
integrity sha512-VqcNGcj/Id5ZT1LZ/cfihi3ttTn+NJmkli2eZADigjq29qTlWi/hAQ43t/VLPq8+UX06FCEx3ByOYet6ZFblng==
dependencies:
accepts "~1.3.8"
array-flatten "1.1.1"
Expand All @@ -5508,7 +5508,7 @@ express@4.20.0:
encodeurl "~2.0.0"
escape-html "~1.0.3"
etag "~1.8.1"
finalhandler "1.2.0"
finalhandler "1.3.1"
fresh "0.5.2"
http-errors "2.0.0"
merge-descriptors "1.0.3"
Expand All @@ -5517,11 +5517,11 @@ express@4.20.0:
parseurl "~1.3.3"
path-to-regexp "0.1.10"
proxy-addr "~2.0.7"
qs "6.11.0"
qs "6.13.0"
range-parser "~1.2.1"
safe-buffer "5.2.1"
send "0.19.0"
serve-static "1.16.0"
serve-static "1.16.2"
setprototypeof "1.2.0"
statuses "2.0.1"
type-is "~1.6.18"
Expand Down Expand Up @@ -5753,6 +5753,19 @@ finalhandler@1.2.0:
statuses "2.0.1"
unpipe "~1.0.0"

finalhandler@1.3.1:
version "1.3.1"
resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.3.1.tgz#0c575f1d1d324ddd1da35ad7ece3df7d19088019"
integrity sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==
dependencies:
debug "2.6.9"
encodeurl "~2.0.0"
escape-html "~1.0.3"
on-finished "2.4.1"
parseurl "~1.3.3"
statuses "2.0.1"
unpipe "~1.0.0"

find-cache-dir@^3.3.2:
version "3.3.2"
resolved "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz#b30c5b6eff0730731aea9bbd9dbecbd80256d64b"
Expand Down Expand Up @@ -10937,15 +10950,15 @@ serve-static@1.15.0:
parseurl "~1.3.3"
send "0.18.0"

serve-static@1.16.0:
version "1.16.0"
resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.16.0.tgz#2bf4ed49f8af311b519c46f272bf6ac3baf38a92"
integrity sha512-pDLK8zwl2eKaYrs8mrPZBJua4hMplRWJ1tIFksVC3FtBEBnl8dxgeHtsaMS8DhS9i4fLObaon6ABoc4/hQGdPA==
serve-static@1.16.2:
version "1.16.2"
resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.16.2.tgz#b6a5343da47f6bdd2673848bf45754941e803296"
integrity sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==
dependencies:
encodeurl "~1.0.2"
encodeurl "~2.0.0"
escape-html "~1.0.3"
parseurl "~1.3.3"
send "0.18.0"
send "0.19.0"

set-blocking@^2.0.0:
version "2.0.0"
Expand Down