Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
2858d23
feat(#2685): prettierjs cleanup
willcodeforcoffee Dec 1, 2025
f7f4e4f
feat(#2685): move the buttongroup into the actions
willcodeforcoffee Dec 1, 2025
1838d91
feat(#2685): remove buttongroup margins
willcodeforcoffee Dec 2, 2025
8f3f49e
bug(#2685): remove the actions bar from the sandbox demo because the …
willcodeforcoffee Dec 4, 2025
3dc2f34
bug(#2685): fix linting error
willcodeforcoffee Dec 4, 2025
858a7ba
fix(#3198): Removed all mention of LTS from documentation
ArakTaiRoth Dec 5, 2025
79e905e
Revert "fix(#3198): Removed all mention of LTS from documentation"
ArakTaiRoth Dec 5, 2025
fd8044c
fix(#3198): Removed all mention of LTS from documentation
ArakTaiRoth Dec 5, 2025
e4e2caf
Merge pull request #464 from GovAlta/eric/2685-modal-buttongroup-actions
twjeffery Dec 5, 2025
afb487f
fix(#3239): Updated various small documentation things across the site
ArakTaiRoth Dec 9, 2025
0d42752
Merge pull request #466 from GovAlta/dustin/3239
chrisolsen Dec 11, 2025
e3b74cd
Merge pull request #465 from GovAlta/dustin/3198
chrisolsen Dec 12, 2025
dec8287
feat(1908): added docs for the linear progress
willcodeforcoffee Dec 11, 2025
313da4e
feat(#1908): rename ProgressIndicator to CircularProgressIndicator to…
willcodeforcoffee Dec 12, 2025
4b3dc55
feat(#1908): updated packages to a version that has LinearProgressInd…
willcodeforcoffee Dec 18, 2025
d78121b
feat(#1908): fixed the playground example
willcodeforcoffee Dec 18, 2025
298f35c
feat(#1908): Fix menu sizing so labels dont overflow
willcodeforcoffee Dec 23, 2025
ee01421
feat(#1908): Fix example so sandbox works
willcodeforcoffee Dec 23, 2025
15a4ba9
feat(#1908): Fix menu titles
willcodeforcoffee Dec 23, 2025
77e02ca
Merge pull request #467 from GovAlta/eric/feat1908-linear-progress
twjeffery Jan 15, 2026
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
24 changes: 12 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
"prettier": "npx prettier . --write"
},
"dependencies": {
"@abgov/react-components": "6.9.3-next.1",
"@abgov/ui-components-common": "1.9.1-next.1",
"@abgov/web-components": "1.39.3-next.1",
"@abgov/react-components": "6.10.0-dev.8",
"@abgov/ui-components-common": "1.10.0-dev.2",
"@abgov/web-components": "1.40.0-dev.17",
"@faker-js/faker": "^8.3.1",
"highlight.js": "^11.8.0",
"js-cookie": "^3.0.5",
Expand Down
8 changes: 3 additions & 5 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ import TypographyPage from "@routes/design-tokens/typography/Typography";
import DevelopersOverviewPage from "@routes/get-started/developers/DevelopersOverview";
import DevelopersSetupPage from "@routes/get-started/developers/DevelopersSetup";
import DevelopersTechnologiesPage from "@routes/get-started/developers/DevelopersTechnologies";
import DevelopersVSCodePage from "@routes/get-started/developers/DevelopersVSCode";
import BugVerificationPage from "@routes/get-started/developers/BugVerification";
import GetStartedLayout from "@routes/get-started/GetStartedLayout";
import GetStartedOverviewPage from "@routes/get-started/GetStartedOverview";
Expand All @@ -50,7 +49,7 @@ import RoadmapPage from "@routes/get-started/Roadmap";
import SupportedBrowsersPage from "@routes/get-started/developers/SupportedBrowsers";
import UxDesignerPage from "@routes/get-started/designers/UxDesigner";
import UserExperienceGuidelinesPage from "@routes/get-started/UserExperienceGuidelines";
import { LtsPolicyPage } from "@routes/get-started/LtsPolicyPage.tsx";
import { OutOfSupportPage } from "@routes/get-started/OutOfSupport";

// Examples Pages
import { VersionFromUrlProvider } from "@contexts/VersionFromUrlContext.tsx";
Expand Down Expand Up @@ -108,7 +107,6 @@ const router = createBrowserRouter(
<Route path="browsers" element={<SupportedBrowsersPage />} />
<Route path="setup" element={<DevelopersSetupPage />} />
<Route path="technologies" element={<DevelopersTechnologiesPage />} />
<Route path="vscode" element={<DevelopersVSCodePage />} />
<Route path="bug" element={<BugVerificationPage />} />
<Route path="update" element={<DevelopersUpgradePage />} />
</Route>
Expand All @@ -120,8 +118,8 @@ const router = createBrowserRouter(
<Route index element={<AutomatedAccessibilityPage />} />
</Route>
<Route path="component-lifecycle" element={<ComponentLifecyclePage />} />
<Route path="lts-policy">
<Route index element={<LtsPolicyPage />} />
<Route path="out-of-support">
<Route index element={<OutOfSupportPage />} />
</Route>
<Route path="contribute">
<Route index element={<ContributePage />} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export function VersionUpdateNotification({ version }: VersionUpdateNotification
<GoabNotification type={version === "old" ? "important" : "information"} maxContentWidth={MAX_CONTENT_WIDTH}>
{version === "old" ? (
<>
Long-term support (LTS) for v3 (Angular) and v5 (React) has ended. Read the{" "}
Support for v3 (Angular) and v5 (React) has ended. Read the{" "}
<a ref={oldLinkRef} href="/get-started/developers/update">
<span style={{ whiteSpace: "nowrap" }}>upgrade guide</span>
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export type LanguageVersion = "old" | "new";
export type Language = "react" | "angular";
export const ANGULAR_VERSIONS = {
OLD: {
label: "v3.2.2 (LTS)",
label: "v3.2.2",
value: "old"
},
NEW: {
Expand All @@ -12,7 +12,7 @@ export const ANGULAR_VERSIONS = {
}
export const REACT_VERSIONS = {
OLD: {
label: "v5.4.1 (LTS)",
label: "v5.4.1",
value: "old"
},
NEW: {
Expand Down
77 changes: 77 additions & 0 deletions src/examples/linear-progress/linear-progress-auto-example.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
import { useEffect, useState } from "react";
import { GoabLinearProgress } from "@abgov/react-components";
import { CodeSnippet } from "@components/code-snippet/CodeSnippet.tsx";

export function LinearProgressAutoExample() {
const [autoProgress, setAutoProgress] = useState(0);

useEffect(() => {
const intervalId = setInterval(() => {
let nextProgress = autoProgress + 0.25;
if (nextProgress > 100) {
nextProgress = 0;
}
setAutoProgress(nextProgress);
}, 100);

return () => {
clearInterval(intervalId);
};
});

return (
<>
<GoabLinearProgress progress={autoProgress} />
<CodeSnippet
lang="typescript"
tags="react"
allowCopy={true}
code={`
export function LinearProgressAutoExample() {
const [autoProgress, setAutoProgress] = useState(0);

useEffect(() => {
const intervalId = setInterval(() => {
let nextProgress = autoProgress + 0.25;
if (nextProgress > 100) {
nextProgress = 0;
}
setAutoProgress(nextProgress);
}, 100);

return () => {
clearInterval(intervalId);
};
});

return <GoabLinearProgress progress={autoProgress} />;
};`}
/>
<CodeSnippet
lang="typescript"
tags="angular"
allowCopy={true}
code={`
autoProgress = 0;
private intervalId: any;

ngOnInit() {
this.intervalId = setInterval(() => {
this.autoProgress += 0.25;
if (this.autoProgress > 100) {
this.autoProgress = 0;
}
}, 100);
}

ngOnDestroy() {
if (this.intervalId) {
clearInterval(this.intervalId);
}
}

<goab-linear-progress [progress]="autoProgress" />`}
/>{" "}
</>
);
}
7 changes: 6 additions & 1 deletion src/global-constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,9 @@ export const DEFAULT_VERSION = "new";
export const DEFAULT_LANGUAGE = "react";

// Array of 'New' components
export const NEW_COMPONENTS = ["Drawer", "Temporary notification", "Checkbox list"];
export const NEW_COMPONENTS = [
"Drawer",
"Temporary notification",
"Checkbox list",
"Linear Progress indicator",
];
Original file line number Diff line number Diff line change
Expand Up @@ -11,33 +11,36 @@ import {
GoabTab,
GoabTabs,
GoabCircularProgress,
GoabCircularProgressProps, GoabButton
GoabCircularProgressProps,
GoabButton,
} from "@abgov/react-components";
import { resetScrollbars } from "../../utils/styling";
import { ComponentContent } from "@components/component-content/ComponentContent";
import { TestIdProperty } from "@components/component-properties/common-properties.ts";
import { CodeSnippet } from "@components/code-snippet/CodeSnippet.tsx";
import { DesignEmpty } from "@components/empty-states/design-empty/DesignEmpty.tsx";
import { AccessibilityEmpty } from "@components/empty-states/accessibility-empty/AccessibilityEmpty.tsx";
import {ExamplesEmpty} from "@components/empty-states/examples-empty/ExamplesEmpty.tsx";
import { ExamplesEmpty } from "@components/empty-states/examples-empty/ExamplesEmpty.tsx";

// == Page props ==

const FIGMA_LINK = "https://www.figma.com/design/3pb2IK8s2QUqWieH79KdN7/%E2%9D%96-Component-library-%7C-DDD?node-id=622-13604";
const FIGMA_LINK =
"https://www.figma.com/design/3pb2IK8s2QUqWieH79KdN7/%E2%9D%96-Component-library-%7C-DDD?node-id=622-13604";
const componentName = "Progress indicator";
const description = "Provide visual feedback to users while loading.";
const category = Category.FEEDBACK_AND_ALERTS;
const relatedComponents = [
{ link: "/components/linear-progress-indicator", name: "Linear Progress indicator" },
{ link: "/components/file-uploader", name: "File uploader" },
{ link: "/components/skeleton-loader", name: "Skeleton loading" }
{ link: "/components/skeleton-loader", name: "Skeleton loading" },
];
type ComponentPropsType = GoabCircularProgressProps;
type CastingType = {
// add any required props here
[key: string]: unknown;
};

export default function ProgressIndicatorPage() {
export default function CircularProgressIndicatorPage() {
const [componentProps, setComponentProps] = useState<ComponentPropsType>({
variant: "inline",
size: "large",
Expand Down Expand Up @@ -137,7 +140,7 @@ export default function ProgressIndicatorPage() {
const [visible, setVisible] = useState<boolean>(true);

function onSandboxChange(bindings: ComponentBinding[], props: Record<string, unknown>) {
const updatedProps = { ...props} as CastingType;
const updatedProps = { ...props } as CastingType;

setComponentBindings(bindings);
setComponentProps(updatedProps);
Expand All @@ -155,7 +158,7 @@ export default function ProgressIndicatorPage() {
// reset body styles after closing the modal, sandbox renders multiple times that not trigger modal component no-scroll destroy effects
resetScrollbars();
}, 3000);
}
};

return (
<>
Expand All @@ -168,24 +171,32 @@ export default function ProgressIndicatorPage() {
githubLink="Progress indicator"
/>
<ComponentContent tocCssQuery="goa-tab[open=true] :is(h2[id], h3[id])">

<GoabTabs initialTab={1}>
<GoabTab heading="Code playground">
<h2 id="component" style={{ display: "none" }}>Playground</h2>
<Sandbox properties={componentBindings} onChange={onSandboxChange} variableNames={["visible"]}>
<h2 id="component" style={{ display: "none" }}>
Playground
</h2>
<Sandbox
properties={componentBindings}
onChange={onSandboxChange}
variableNames={["visible"]}>
<CodeSnippet
lang="typescript"
tags="react"
allowCopy={true}
code={`
const [visible, setVisible] = useState(${visible});
${componentProps.variant === 'fullscreen' ? `
${
componentProps.variant === "fullscreen"
? `
function onClick() {
setVisible(true);
setTimeout(() => {
setVisible(false);
}, 3000);
}` : ''}
}`
: ""
}
`}
/>
<CodeSnippet
Expand All @@ -195,19 +206,28 @@ export default function ProgressIndicatorPage() {
code={`
export class ExampleComponent {
visible = ${visible};
${componentProps.variant === 'fullscreen' ? `
${
componentProps.variant === "fullscreen"
? `
onClick() {
this.visible = true;
setTimeout(() => {
this.visible = false;
}, 3000);
}` : ''}
}`
: ""
}
`}
/>
{componentProps.variant === "fullscreen" && <GoabButton onClick={openFullScreenProgress}>Show Fullscreen</GoabButton>}
{componentProps.variant === "fullscreen" && (
<GoabButton onClick={openFullScreenProgress}>Show Fullscreen</GoabButton>
)}
<GoabCircularProgress {...componentProps} visible={visible} />
</Sandbox>
<ComponentProperties properties={componentProperties} oldProperties={oldComponentProperties} />
<ComponentProperties
properties={componentProperties}
oldProperties={oldComponentProperties}
/>
</GoabTab>

<GoabTab
Expand All @@ -216,8 +236,7 @@ export default function ProgressIndicatorPage() {
Examples
<GoabBadge type="information" content="0" />
</>
}
>
}>
<ExamplesEmpty />
</GoabTab>

Expand Down
11 changes: 8 additions & 3 deletions src/routes/components/Components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export function Components() {
};

return (
<GoabBlock alignment="center">
<GoabBlock alignment="center" width="185px">
{componentName} <GoabBadge type={getBadgeType()} content={getBadgeLabel()}></GoabBadge>
</GoabBlock>
);
Expand Down Expand Up @@ -78,9 +78,14 @@ export function Components() {
<Link to={getUrl("filter-chip")}>Filter chip</Link>
<Link to={getUrl("modal")}>Modal</Link>
<Link to={getUrl("notification-banner")}>Notification banner</Link>
<Link to={getUrl("progress-indicator")}>Progress indicator</Link>
<Link to={getUrl("circular-progress-indicator")}>Circular Progress indicator</Link>
<Link to={getUrl("linear-progress-indicator")}>
{newComponentLabel("Linear Progress indicator")}
</Link>
<Link to={getUrl("skeleton-loader")}>Skeleton loader</Link>
<Link to={getUrl("temporary-notification")}>{newComponentLabel("Temporary notification")}</Link>
<Link to={getUrl("temporary-notification")}>
{newComponentLabel("Temporary notification")}
</Link>
<Link to={getUrl("tooltip")}>Tooltip</Link>
</GoabSideMenuGroup>
<GoabSideMenuGroup heading="Inputs and actions">
Expand Down
Loading