Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
6bbc1d3
chore(deps): bump tmp from 0.2.5 to 0.2.7
dependabot[bot] May 27, 2026
ca33ea2
feat(#3960): add Markdown bundle generator output
twjeffery May 29, 2026
ccf1938
Merge pull request #3991 from GovAlta/dependabot/npm_and_yarn/tmp-0.2.7
willcodeforcoffee Jun 2, 2026
1a91813
chore(deps-dev): bump @vitest/browser from 4.1.2 to 4.1.6
dependabot[bot] Jun 1, 2026
38775e7
Merge pull request #4003 from GovAlta/dependabot/npm_and_yarn/vitest/…
willcodeforcoffee Jun 2, 2026
bd47dd6
fix(#4001): scope PreviewLayout's full-viewport reset to its own pages
twjeffery Jun 3, 2026
0bdcf0f
chore(#3868): add pre-commit hook to keep generated docs files in sync
twjeffery May 25, 2026
7f0e60d
fix(#3885):reorganize roadmap page by fiscal quarter
Spark450 Jun 4, 2026
b8412b5
chore(#3868): address review feedback on docs pre-commit hook
twjeffery Jun 4, 2026
d7cf6db
fix(#3987): vertically align component titles and labels
bdfranck Jun 4, 2026
a153113
fix(#3960): address review feedback on the Markdown bundle
twjeffery Jun 5, 2026
b3a27c2
chore(#3868): move hook auto-install to root, adjust missing-deps beh…
twjeffery Jun 8, 2026
9279d9e
Merge pull request #4002 from GovAlta/tom/preview-layout-global-css-leak
twjeffery Jun 8, 2026
e33682c
fix(#3824): use goa-space-l gap between pagination Previous and Next …
Spark450 Jun 8, 2026
49455d3
chore(#3868): install docs deps via root postinstall, block on missin…
twjeffery Jun 8, 2026
5b0777d
fix(#3610): DatePicker month dropdown placeholder (#4019)
Spark450 Jun 9, 2026
f4cf3c6
Merge pull request #3993 from GovAlta/tom/docs-md-bundle
twjeffery Jun 9, 2026
d6e69bf
chore(#3868): watch libs/common sources in the pre-commit hook
twjeffery Jun 10, 2026
4141dd2
fix(#4030): Footer copyright text (#4032)
Spark450 Jun 10, 2026
586b8c6
fix(#3763): size dropdown and date picker popover to measured width f…
vanessatran-ddi Jun 9, 2026
be10f22
fix(#4020): document temporary notification show/dismiss/setProgress …
twjeffery Jun 10, 2026
94f8a3e
Merge pull request #3980 from GovAlta/tom/docs-precommit-freshness-hook
twjeffery Jun 11, 2026
aa875e8
chore(#4038): add CI gate to keep generated docs files in sync
twjeffery Jun 11, 2026
d69903f
chore(#4038): show full git diff when docs freshness check fails
twjeffery Jun 11, 2026
ef29878
Merge pull request #4021 from GovAlta/tom/extract-api-temp-notification
twjeffery Jun 11, 2026
bd0c382
Merge pull request #4039 from GovAlta/tom/docs-ci-freshness-gate
twjeffery Jun 11, 2026
6aa3258
feat(#4022): add skills/ folder (using-goa-design-system, content-des…
twjeffery Jun 5, 2026
9427d79
Merge pull request #4023 from GovAlta/tom/skills-folder
twjeffery Jun 11, 2026
59f1053
feat(#3789): add AI tools and resources section to get-started
twjeffery Jun 11, 2026
b7f0716
fix(#3683): vertically center text values for date and time input typ…
Spark450 Jun 12, 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
89 changes: 89 additions & 0 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
#!/usr/bin/env bash
#
# Pre-commit hook: keep committed docs generated files in sync with their sources.
#
# When a commit stages source that feeds a docs generator, this regenerates the
# docs outputs and blocks the commit if the staged outputs are stale. The
# generators run on every such commit; they are deterministic, so when the staged
# outputs are already fresh the regenerated files are byte-identical and the
# commit proceeds with nothing new to stage.
#
# Installed automatically by the root `npm install` (a `prepare` script sets
# core.hooksPath). To set it by hand: git config core.hooksPath .githooks
#
# Covers:
# docs/generated/component-apis/*.json from Svelte components + React/Angular wrappers
# + shared types and controllers (libs/common)
# docs/public/search-index.json from docs/src/content/** (MDX frontmatter)
#
# To add a new generator, extend SOURCE_REGEX and OUTPUTS below and run it in the
# regenerate step. See docs/ARCHITECTURE.md.
#
# Limitation: this validates the working tree, not the staged snapshot. With
# partial staging (git add -p, or staging some edits while leaving others
# unstaged) the generators read working-tree source, which can differ from what
# is being committed. Accepted for simplicity; see docs/ARCHITECTURE.md.

set -euo pipefail

cd "$(git rev-parse --show-toplevel)"

# Sources that feed a generator, and the output paths those generators own.
# extract-api scans four libs roots: Svelte components (web-components/src/components),
# React wrappers (react-components/src/lib), Angular wrappers
# (angular-components/src/lib/components), and shared types plus imperative-API
# controllers (common/src/lib). build:search-index scans MDX in docs/src/content.
SOURCE_REGEX='^(libs/(web-components/src/components|react-components/src/lib|angular-components/src/lib/components|common/src/lib)/|docs/src/content/)'
OUTPUTS=(docs/generated/component-apis docs/public/search-index.json)

# 1. Only act when staged changes touch a generator source.
# Capture to a variable rather than piping to grep: under `set -o pipefail`, grep -q
# can close the pipe early, making git diff exit with SIGPIPE and silently skipping
# the check on very large commits.
staged="$(git diff --cached --name-only)"
if ! grep -Eq "$SOURCE_REGEX" <<<"$staged"; then
exit 0
fi

# 2. The generators need docs dependencies (tsx). The root `postinstall` runs
# `npm install --prefix docs`, so a normal `npm install` at the repo root sets
# these up for everyone and the hook always has what it needs. If they are
# still missing the environment is not set up, so block rather than let a
# possibly-stale file through.
if [ ! -x docs/node_modules/.bin/tsx ]; then
echo "pre-commit: cannot verify generated docs files: docs dependencies missing." >&2
echo " run 'npm install' at the repo root and commit again." >&2
exit 1
fi

echo "pre-commit: checking generated docs files are up to date..." >&2

# 3. Regenerate. If a generator fails to run we cannot verify the outputs are
# fresh, so block the commit rather than letting a possibly-stale file through.
genlog="$(mktemp)"
if ! ( cd docs && npm --silent run extract-api && npm --silent run build:search-index ) >"$genlog" 2>&1; then
echo "pre-commit: cannot verify generated docs files: a generator failed to run." >&2
echo " ensure dependencies are installed (npm install at the repo root and in docs/)." >&2
sed 's/^/ | /' "$genlog" >&2 || true
rm -f "$genlog"
exit 1
fi
rm -f "$genlog"

# 4. Stale if regenerated outputs differ from what is staged (modified tracked
# files) or if a brand-new output was produced (untracked, e.g. a new
# component's JSON that was never generated).
stale=0
if ! git diff --quiet -- "${OUTPUTS[@]}"; then stale=1; fi
if [ -n "$(git ls-files --others --exclude-standard -- "${OUTPUTS[@]}")" ]; then stale=1; fi

if [ "$stale" -ne 0 ]; then
echo "pre-commit: generated docs files are out of date." >&2
echo " the regenerated files are already in your working tree." >&2
echo " stage them with 'git add ${OUTPUTS[*]}' and commit again." >&2
echo "" >&2
git status --short -- "${OUTPUTS[@]}" >&2
exit 1
fi

exit 0
65 changes: 65 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,68 @@ jobs:
if [ -d "./dist" ]; then
npm run test:pr
fi

docs-freshness:
name: Docs Freshness
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: read

env:
# The generators don't need browsers; skip the Playwright download in npm ci.
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "1"

steps:
- uses: actions/checkout@v5

- uses: actions/setup-node@v6
with:
node-version: "24"
cache: npm
cache-dependency-path: |
package-lock.json
docs/package-lock.json

- name: Install npm 11
run: npm install -g npm@11

- run: npm ci

- name: Check committed docs generated files match source
shell: bash
run: |
# Regenerate the docs outputs from source. npm ci ran the root postinstall
# (npm install --prefix docs), so tsx and the docs deps are available here.
( cd docs && npm run extract-api && npm run build:search-index )

# The committed generated files are the single source of truth for the docs
# build, so fail if regeneration changed a tracked file (drift) or produced a
# new untracked one (a component whose JSON was never committed). This mirrors
# the .githooks/pre-commit check so local and CI tell the same story.
outputs=(docs/generated/component-apis docs/public/search-index.json)
stale=0
if ! git diff --quiet -- "${outputs[@]}"; then stale=1; fi
if [ -n "$(git ls-files --others --exclude-standard -- "${outputs[@]}")" ]; then stale=1; fi

if [ "$stale" -ne 0 ]; then
echo "::error::Generated docs files are out of date."
echo "The committed files do not match what the generators produce from source."
echo ""
echo "To fix, from the repo root run:"
echo " npm install"
echo " cd docs && npm run extract-api && npm run build:search-index"
echo "then commit the updated files under:"
echo " docs/generated/component-apis/ docs/public/search-index.json"
echo ""
echo "Note: extracted fields (types, JSDoc descriptions) come from the component"
echo "source and are overwritten on regeneration, so don't hand-edit these files."
echo ""
git status --short -- "${outputs[@]}"
git add --intent-to-add -- "${outputs[@]}"
git diff --stat -- "${outputs[@]}"
git diff -- "${outputs[@]}"
exit 1
fi

echo "Generated docs files are up to date."
19 changes: 19 additions & 0 deletions apps/prs/angular/src/routes/bugs/3610/bug3610.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<goab-block gap="m" direction="column">
<goab-text tag="h1" mt="m">Bug #3610: DatePicker month dropdown placeholder</goab-text>
<goab-text tag="span">
The month dropdown placeholder should display em dashes and title case:
<strong>—Select a month—</strong>
</goab-text>
<goab-text tag="span">
Previously it showed <strong>--select a month--</strong> (hyphens, lowercase).
</goab-text>

<goab-form-item label="What is your birthday?">
<goab-date-picker
type="input"
name="birthday"
[value]="date"
(onChange)="onDateChange($event)"
></goab-date-picker>
</goab-form-item>
</goab-block>
16 changes: 16 additions & 0 deletions apps/prs/angular/src/routes/bugs/3610/bug3610.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { Component } from "@angular/core";
import { GoabBlock, GoabDatePicker, GoabFormItem, GoabText } from "@abgov/angular-components";

@Component({
standalone: true,
selector: "abgov-bug3610",
templateUrl: "./bug3610.component.html",
imports: [GoabBlock, GoabDatePicker, GoabFormItem, GoabText],
})
export class Bug3610Component {
date: Date | undefined = undefined;

onDateChange(event: { value: Date | undefined }) {
this.date = event.value;
}
}
6 changes: 6 additions & 0 deletions apps/prs/angular/src/routes/bugs/3610/bug3610.route.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"type": "bug",
"id": "3610",
"path": "bugs/3610",
"title": "DatePicker month placeholder"
}
32 changes: 32 additions & 0 deletions apps/prs/angular/src/routes/bugs/3683/bug3683.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<goab-block direction="column" gap="l" mt="l">
<goab-text tag="h1" mt="none">Bug #3683: Input date/time vertical alignment</goab-text>
<goab-text tag="p">
The text value in date and time input types should be vertically centered in the
input box, matching how type=text renders. Compare each type below against the
reference text input.
</goab-text>

<goab-form-item label="Reference: type=text">
<goab-input name="text" type="text" [value]="textVal"></goab-input>
</goab-form-item>

<goab-form-item label="type=date">
<goab-input name="date" type="date" [value]="dateVal"></goab-input>
</goab-form-item>

<goab-form-item label="type=time">
<goab-input name="time" type="time" [value]="timeVal"></goab-input>
</goab-form-item>

<goab-form-item label="type=datetime-local">
<goab-input name="datetime-local" type="datetime-local" [value]="datetimeVal"></goab-input>
</goab-form-item>

<goab-form-item label="type=month">
<goab-input name="month" type="month" [value]="monthVal"></goab-input>
</goab-form-item>

<goab-form-item label="type=week">
<goab-input name="week" type="week" [value]="weekVal"></goab-input>
</goab-form-item>
</goab-block>
17 changes: 17 additions & 0 deletions apps/prs/angular/src/routes/bugs/3683/bug3683.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { Component } from "@angular/core";
import { GoabBlock, GoabFormItem, GoabInput, GoabText } from "@abgov/angular-components";

@Component({
standalone: true,
selector: "abgov-bug3683",
templateUrl: "./bug3683.component.html",
imports: [GoabBlock, GoabFormItem, GoabInput, GoabText],
})
export class Bug3683Component {
dateVal = "2025-06-09";
timeVal = "09:30";
datetimeVal = "2025-06-09T09:30";
monthVal = "2025-06";
weekVal = "2025-W23";
textVal = "Reference text value";
}
6 changes: 6 additions & 0 deletions apps/prs/angular/src/routes/bugs/3683/bug3683.route.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"type": "bug",
"id": "3683",
"path": "bugs/3683",
"title": "Input date/time vertical alignment"
}
Loading
Loading