From 3b83b06a8cc3ca5af2d09ed23f77f21ffd767855 Mon Sep 17 00:00:00 2001 From: 0xharkirat <65155920+0xharkirat@users.noreply.github.com> Date: Tue, 2 Jun 2026 15:58:34 +1000 Subject: [PATCH 1/4] Footer: match new SSW.Rules + SSW.Website deployment line (text, tooltip, commit hash) Mirrors the change shipped in SSWConsulting/SSW.Rules#2646 and in SSWConsulting/SSW.Website#4720 so ssw.com.au/people stays consistent with ssw.com.au + ssw.com.au/rules. Tiago's Rules-PR review: "Whatever is changed here should also be applied to ssw.com.au/people and ssw.com.au". This is the /people half. - src/components/footer/footer.js (deployment line only): * Text: drop "CONSTANT", lowercase "continuous deployment", "Last updated" instead of "Last deployed", drop Build # link, add "Last commit YYY" linked to the GitHub commit. * 3 hoverables (continuous-deployment link, time span, commit link) all white text + hover:text-ssw-red transition + no dotted bottom-border (skipping .footer-link class which adds the dots). * Custom CSS tooltip on the time span (group-hover) showing "Last updated D MMM YYYY at HH:mm UTC" using the existing moment + preval-derived buildTimestamp. Native title fallback for AT. * Full SHA in commit URL, slice-7 for display (matches Rules#2651). - .github/workflows/template-build.yml: plumb COMMIT_HASH=${{ github.sha }} alongside VERSION_DEPLOYED. Gatsby reads via process.env.COMMIT_HASH at build, SSG-inlined. Untouched: Chinafied / Powered by Azure + GitHub row, all other footer links, getLastDeployTime() helper, layout/breakpoints. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/template-build.yml | 1 + src/components/footer/footer.js | 34 ++++++++++++++++++++++++---- 2 files changed, 30 insertions(+), 5 deletions(-) diff --git a/.github/workflows/template-build.yml b/.github/workflows/template-build.yml index c2ea1577..5c780623 100644 --- a/.github/workflows/template-build.yml +++ b/.github/workflows/template-build.yml @@ -44,6 +44,7 @@ jobs: APPLICATIONINSIGHTS_CONNECTION_STRING: ${{ secrets.APPLICATIONINSIGHTS_CONNECTION_STRING }} CHINA_BUILD: FALSE VERSION_DEPLOYED: ${{ github.run_number }} + COMMIT_HASH: ${{ github.sha }} - name: Rename env file run: | diff --git a/src/components/footer/footer.js b/src/components/footer/footer.js index 08187e27..7fc91a19 100644 --- a/src/components/footer/footer.js +++ b/src/components/footer/footer.js @@ -149,13 +149,37 @@ const Footer = () => {
This website is under{' '} - CONSTANT CONTINUOUS DEPLOYMENT + continuous deployment - . Last deployed {getLastDeployTime()} ago (Build #{' '} - {process.env.VERSION_DEPLOYED}) + . Last updated{' '} + + {getLastDeployTime()} ago + + Last updated {moment(buildTimestamp).utc().format('D MMM YYYY [at] HH:mm UTC')} + + + {process.env.COMMIT_HASH && ( + <> + . Last commit{' '} + + {process.env.COMMIT_HASH.slice(0, 7)} + + + )}
Date: Tue, 2 Jun 2026 16:33:37 +1000 Subject: [PATCH 2/4] .env.template: add COMMIT_HASH placeholder so token replacement reaches Gatsby The previous commit added COMMIT_HASH to the replace-tokens env block in template-build.yml, but missed the corresponding `COMMIT_HASH=#{COMMIT_HASH}` line in .env.template. The replace-tokens action only substitutes #{...} placeholders that exist in the file, so the value never reached .env.production -> Gatsby's dotenv -> process.env.COMMIT_HASH -> the JSX conditional, and the "Last commit" footer segment never rendered in the artifact. Verified: VERSION_DEPLOYED has its own #{VERSION_DEPLOYED} line in .env.template (line 5), which is why "Build # 801" worked in prod historically. COMMIT_HASH now follows the same pattern. Co-Authored-By: Claude Opus 4.7 (1M context) --- .env.template | 1 + 1 file changed, 1 insertion(+) diff --git a/.env.template b/.env.template index 28fd2337..3fc83cb0 100644 --- a/.env.template +++ b/.env.template @@ -3,6 +3,7 @@ GOOGLE_GTM_ID=#{GOOGLE_GTM_ID} GOOGLE_ANALYTICS=#{GOOGLE_ANALYTICS} YOUTUBE_API_KEY=#{YOUTUBE_API_KEY} VERSION_DEPLOYED=#{VERSION_DEPLOYED} +COMMIT_HASH=#{COMMIT_HASH} CHINA_BUILD=FALSE WEBSITE_API=#{WEBSITE_API} CRM_APP_ID=#{CRM_APP_ID} From ad81ff623440db83b8553742957810b937b6110e Mon Sep 17 00:00:00 2001 From: 0xharkirat <65155920+0xharkirat@users.noreply.github.com> Date: Tue, 2 Jun 2026 17:31:09 +1000 Subject: [PATCH 3/4] Footer: drop default link underline + fix getLastDeployTime plurals Two follow-ups on the People footer change: - Both deployment-line s (continuous-deployment + commit) were picking up the browser default text-decoration: underline once I dropped the .footer-link class. Restore "no underline" with an inline style={{ textDecoration: 'none' }} (same approach the matching SSW.Website PR uses; inline style beats parent CSS). - getLastDeployTime: replace "day(s)" / "hour(s)" / "minute" / "minutes" with proper plurals -> "day" / "days" / "hour" / "hours" / "min" (matches the merged SSW.Rules formatRelative). Also fix the pre-existing ternary bug `' ' + hours !== 0` (string concat made that branch always-true so the minute branch was unreachable - hence local builds always showed "0 hour(s) ago" instead of "1 min ago"). Co-Authored-By: Claude Opus 4.7 (1M context) --- src/components/footer/footer.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/components/footer/footer.js b/src/components/footer/footer.js index 7fc91a19..50893ef9 100644 --- a/src/components/footer/footer.js +++ b/src/components/footer/footer.js @@ -150,6 +150,7 @@ const Footer = () => { This website is under{' '} continuous deployment @@ -172,6 +173,7 @@ const Footer = () => { . Last commit{' '} { delta -= minutes * 60; return days !== 0 - ? `${days} day(s)` - : ' ' + hours !== 0 - ? `${hours} hour(s)` - : ' ' + minutes > 1 - ? `${minutes} minutes` - : '1 minute'; + ? `${days} day${days > 1 ? 's' : ''}` + : hours !== 0 + ? `${hours} hour${hours > 1 ? 's' : ''}` + : minutes > 1 + ? `${minutes} min` + : '1 min'; }; Footer.propTypes = {}; From 7b44874cf9c10ec7bbc4e56bf0f6898bf955a851 Mon Sep 17 00:00:00 2001 From: 0xharkirat <65155920+0xharkirat@users.noreply.github.com> Date: Tue, 2 Jun 2026 17:49:49 +1000 Subject: [PATCH 4/4] Footer: a11y parity with Rules + Website + DRY consts Brings the People footer to full a11y parity with the matching SSW.Rules + SSW.Website implementations, plus a small DRY pass: - Wrapper span around "X min ago" is now keyboard-focusable (tabIndex={0}); the custom tooltip reveals on focus via group-focus-visible:opacity-100; both s + the wrapper get focus-visible:text-ssw-red so keyboard users see the same red affordance as mouse users on hover. - Tooltip span has a stable id ("deployment-tooltip") and the wrapper carries aria-describedby pointing at it, so screen readers announce the exact UTC datetime after the visible relative time. - Commit link rel="noreferrer" -> rel="noopener noreferrer nofollow" to match the rel attrs Rules + Website use on the same link. - Extract commitHash + lastUpdatedTooltip + deploymentTooltipId into module-level consts so process.env.COMMIT_HASH isn't read 3 times and the moment(...).utc().format(...) call is computed once. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/components/footer/footer.js | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/src/components/footer/footer.js b/src/components/footer/footer.js index 50893ef9..5a4c9fd4 100644 --- a/src/components/footer/footer.js +++ b/src/components/footer/footer.js @@ -15,6 +15,11 @@ import { import China from '../../images/china.png'; const buildTimestamp = preval`module.exports = new Date().getTime();`; +const commitHash = process.env.COMMIT_HASH; +const lastUpdatedTooltip = `Last updated ${moment(buildTimestamp) + .utc() + .format('D MMM YYYY [at] HH:mm UTC')}`; +const deploymentTooltipId = 'deployment-tooltip'; const Footer = () => { return ( @@ -149,7 +154,7 @@ const Footer = () => {
This website is under{' '} @@ -157,28 +162,31 @@ const Footer = () => { . Last updated{' '} {getLastDeployTime()} ago - Last updated {moment(buildTimestamp).utc().format('D MMM YYYY [at] HH:mm UTC')} + {lastUpdatedTooltip} - {process.env.COMMIT_HASH && ( + {commitHash && ( <> . Last commit{' '} - {process.env.COMMIT_HASH.slice(0, 7)} + {commitHash.slice(0, 7)} )}