Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
3a2e2c1
fix spacing inconsistencies across foundation and design token pages
twjeffery Aug 11, 2025
6758147
feat(#2127): button group - added examples
mxsoco Aug 13, 2025
8977e16
Chore(#2966): Add initial Copilot instructions
bdfranck Aug 11, 2025
1468014
fix(#2801): fix Angular LTS initial tab example
bdfranck Aug 14, 2025
7b7b5ec
feat(#2132): drop down - added more contextual examples
mxsoco Aug 15, 2025
6082294
Merge branch 'alpha' into copilot/2801-lts-initial-tab-example
bdfranck Aug 18, 2025
247dab2
feat(#2137): input - added phone number and bank account examples
mxsoco Aug 19, 2025
f90727b
feat(#2137): input - removed redundant imports
mxsoco Aug 19, 2025
deaec3f
Merge pull request #419 from GovAlta/copilot/2801-lts-initial-tab-exa…
ArakTaiRoth Aug 20, 2025
3435e20
fix: update playground script path in docs
chrisolsen Aug 20, 2025
ab120d9
Merge pull request #424 from GovAlta/chris/playground-script-tweak
chrisolsen Aug 20, 2025
76bd0f3
feat(#2126): button - add "compact buttons" example
mxsoco Aug 22, 2025
149054c
feat(#2126): button - fixed error
mxsoco Aug 22, 2025
a8030ac
feat(#2126): button - adjusted code samples
mxsoco Aug 22, 2025
af17d7f
fix(#1321): docs button deprecate submit type
syedszeeshan Aug 25, 2025
59d8641
Merge pull request #416 from GovAlta/thomasjeffery/content-spacing-fix
bdfranck Aug 26, 2025
a348f6f
Merge branch 'alpha' into mxsoco/feat-2132
mxsoco Aug 27, 2025
0d91fed
feat(#2132): drop down - replaced "back-link" tags with GoabLink
mxsoco Aug 27, 2025
8ae8d57
feat(#2300): details - adjusted margins in examples
mxsoco Aug 28, 2025
1612546
Merge pull request #428 from mxsoco/mxsoco/feat-2300
bdfranck Sep 9, 2025
70a8ff2
Merge pull request #420 from mxsoco/mxsoco/feat-2132
bdfranck Sep 9, 2025
a6fea81
Merge pull request #423 from mxsoco/msoco/feat-2137
bdfranck Sep 10, 2025
f919fb7
Merge pull request #417 from mxsoco/mxsoco/feat-2127
bdfranck Sep 10, 2025
56e7183
Merge pull request #426 from GovAlta/Syed/docs-1321
ArakTaiRoth Sep 10, 2025
ee35961
Merge pull request #418 from GovAlta/benjifranck/2966-copilot-instruc…
ArakTaiRoth Sep 10, 2025
4375087
Merge pull request #425 from mxsoco/mxsoco/feat-2126
bdfranck Sep 10, 2025
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
37 changes: 37 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Project Overview
This project contains the public documentation for the Government of Alberta's Design System.

## Libraries and Frameworks
- The site is built with React components from the Government of Alberta's UI Components library.

## Folder Structure
- `src/routes/home.tsx`: The home page.
- `src/routes/get-started`: The pages for starting with the design system.
- `src/routes/examples/ExamplesOverview.tsx`: The page listing all examples.
- `src/examples`: Examples of patterns, pages, tasks, component configurations, flows, and more.
- `src/routes/components/AllComponents.tsx`: The page listing all components.
- `src/routes/components`: The pages for each UI component.
- `src/routes/design-tokens`: The pages for design tokens.
- `src/routes/foundations`: The pages for design foundations.

## Component versions
- Documentation for the most recent version of components are shown with `version === "new"`.
- Documentation for old Long-Term Support (LTS) components are shown with `version === "old"`.

## Commits & Pull Requests
- Use Conventional Commits format for commit messages.
- Use the present tense.
- Use the imperative mood.
- Limit the first line to 72 characters or less.
- Start the commit message with a reference to the GitHub Issue number, such as `feat(#1234):`
- If the commit relates to an issue, include "Closes #ISSUE_NUMBER" in the commit message.
- If the commit relates to a breaking change, include "BREAKING CHANGE:" in the commit message.

## Pull Requests
- Only add a single commit to a Pull Request.
- Start the Pull Request title with a reference to the GitHub Issue number, such as `feat(#1234):`

## CSS and Design Tokens
- Use CSS custom properties that are defined by our design tokens.
- Name custom properties for global styles in this format: `--goa-[category]-[name]`, such as `--goa-color-primary`.
- Name custom properties for component-specific styles in this format: `--goa-[component]-[category]-[name]`.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export function AccessibilityEmpty(props: Props) {
component page in Figma.
</a>{" "}
</GoabText>
<GoabText size="body-m" mb="none" mt="m">
<GoabText size="body-m" mb="none" mt="none">
More accessibility guidance for design and development is coming soon.
</GoabText>
</GoabContainer>
Expand Down
197 changes: 197 additions & 0 deletions src/examples/ask-a-user-for-bank-details.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,197 @@
import { Sandbox } from "@components/sandbox";
import { GoabBlock, GoabFormItem, GoabInput } from "@abgov/react-components";
import { useContext } from "react";
import { LanguageVersionContext } from "@contexts/LanguageVersionContext.tsx";
import { CodeSnippet } from "@components/code-snippet/CodeSnippet.tsx";

export const AskAUserForBankDetails = () => {
const {version} = useContext(LanguageVersionContext);
const noop = () => {}

return (
<Sandbox fullWidth flags={["reactive"]} skipRenderOnly={"react"}>
{/*React code*/}

{version === "old" && <CodeSnippet
lang="html"
tags="react"
allowCopy={true}
code={`
const [name, setName] = useState<string>('');
const [account, setAccount] = useState<string>('');
const [bank, setBank] = useState<string>('');
function onChangeName(event: GoabInputOnChangeDetail) {
setName(event.value);
}
function onChangeAccount(event: GoabInputOnChangeDetail) {
setAccount(event.value);
}
function onChangeBank(event: GoabInputOnChangeDetail) {
setBank(event.value);
}
`}
/>}

{version === "old" && <CodeSnippet
lang="html"
tags="react"
allowCopy={true}
code={`
<GoAFormItem label="Bank account details" labelSize="large">
<GoABlock gap="m" direction="column">
<GoAFormItem label="Name on account">
<GoAInput
onChange={onChangeName}
value={name}
name="name"
width="100%"
/>
</GoAFormItem>
<GoAFormItem label="Account number">
<GoAInput
onChange={onChangeAccount}
value={account}
name="account"
width="167px"
/>
</GoAFormItem>
<GoAFormItem label="Bank number" helpText="Must be between 6 and 8 digits long">
<GoAInput
onChange={onChangeBank}
value={bank}
name="bank"
width="167px"
maxLength={8}
/>
</GoAFormItem>
</GoABlock>
</GoAFormItem>
`}
/>}

{version === "new" && <CodeSnippet
lang="typescript"
tags="react"
allowCopy={true}
code={`
const [name, setName] = useState<string>('');
const [account, setAccount] = useState<string>('');
const [bank, setBank] = useState<string>('');
function onChangeName(event: GoabInputOnChangeDetail) {
setName(event.value);
}
function onChangeAccount(event: GoabInputOnChangeDetail) {
setAccount(event.value);
}
function onChangeBank(event: GoabInputOnChangeDetail) {
setBank(event.value);
}
`}
/>}
{version === "new" && <CodeSnippet
lang="html"
tags="react"
allowCopy={true}
code={`
<GoabFormItem label="Bank account details" labelSize="large">
<GoabBlock gap="m" direction="column">
<GoabFormItem label="Name on account">
<GoabInput
onChange={onChangeName}
value={name}
name="name"
width="100%"
/>
</GoabFormItem>
<GoabFormItem label="Account number">
<GoabInput
onChange={onChangeAccount}
value={account}
name="account"
width="167px"
/>
</GoabFormItem>
<GoabFormItem label="Bank number" helpText="Must be between 6 and 8 digits long">
<GoabInput
onChange={onChangeBank}
value={bank}
name="bank"
width="167px"
maxLength={8}
/>
</GoabFormItem>
</GoabBlock>
</GoabFormItem>
`}
/>}

{/*Angular code*/}

{version === "old" && <CodeSnippet
lang="typescript"
tags={["angular", "reactive"]}
allowCopy={true}
code={`
export class ExampleComponent {
bankDetails = new FormGroup({
name: new FormControl(""),
account: new FormControl(""),
bank: new FormControl(""),
});
}
`}
/>}

{version === "new" && <CodeSnippet
lang="typescript"
tags={["angular", "reactive"]}
allowCopy={true}
code={`
export class ExampleComponent {
form!: FormGroup;
constructor(private fb: FormBuilder) {
this.form = this.fb.group({
name: [''],
account: [''],
bank: [''],
});
}
}
`}
/>}


<GoabFormItem label="Bank account details" labelSize="large">
<GoabBlock gap="m" direction="column">
<GoabFormItem label="Name on account">
<GoabInput
onChange={noop}
value=""
name="name"
width="100%"
/>
</GoabFormItem>
<GoabFormItem label="Account number">
<GoabInput
onChange={noop}
value=""
name="account"
width="167px"
/>
</GoabFormItem>
<GoabFormItem label="Bank number" helpText="Must be between 6 and 8 digits long">
<GoabInput
onChange={noop}
value=""
name="bank"
width="167px"
maxLength={8}
/>
</GoabFormItem>
</GoabBlock>
</GoabFormItem>
</Sandbox>
)
}

export default AskAUserForBankDetails;
2 changes: 1 addition & 1 deletion src/examples/ask-a-user-for-direct-deposit-information.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export const AskAUserForDirectDepositInformation = () => {
</GoabFormItem>
</form>

<GoabDetails heading="Where can I find this information on a personal cheque?" mt="l">
<GoabDetails heading="Where can I find this information on a personal cheque?" mt="xl">
<p>
Below is an example of where you can find the required bank information on a personal
cheque.
Expand Down
Loading