Skip to content

Footer: match new SSW.Rules + SSW.Website deployment line (text + tooltip + commit hash)#846

Merged
0xharkirat merged 4 commits into
mainfrom
hs/footer-consistent-with-rules
Jun 3, 2026
Merged

Footer: match new SSW.Rules + SSW.Website deployment line (text + tooltip + commit hash)#846
0xharkirat merged 4 commits into
mainfrom
hs/footer-consistent-with-rules

Conversation

@0xharkirat

Copy link
Copy Markdown
Member

Summary

Mirrors the footer deployment-line refresh shipped in SSWConsulting/SSW.Rules#2646 and being shipped in SSWConsulting/SSW.Website#4720, so ssw.com.au/people stays consistent with ssw.com.au + ssw.com.au/rules.

Tiago's review on the Rules PR:

Whatever is changed here should also be applied to: ssw.com.au/people/ and ssw.com.au/

This is the /people half — last of the three.

Before:

This website is under CONSTANT CONTINUOUS DEPLOYMENT. Last deployed 32 day(s) ago (Build # 801)

After:

This website is under continuous deployment. Last updated 32 day(s) ago. Last commit 2783661

Changes

  • src/components/footer/footer.js — deployment line only:
    • CONSTANT CONTINUOUS DEPLOYMENTcontinuous deployment (lowercase, link to rules-to-better-websites-deployment to match Rules + Website).
    • Last deployedLast updated.
    • Drop Build # link, add Last commit ${shortHash} linked to the GitHub commit using the full SHA in the URL (mirrors Footer: full commit SHA in URL, short hash for display SSW.Rules#2651).
    • 3 hoverables share one pattern — text-white + hover:text-ssw-red + transition-colors, no underline / no dotted border (skip the .footer-link class on these three so they get the new affordance).
    • Custom CSS tooltip on the time span (group-hover, pure CSS, no JS) showing Last updated D MMM YYYY at HH:mm UTC. Native title for AT fallback.
  • .github/workflows/template-build.yml: plumb COMMIT_HASH=${{ github.sha }} alongside the existing VERSION_DEPLOYED. Gatsby reads it via process.env.COMMIT_HASH at build, SSG-inlined into the static HTML.

Sibling "Chinafied / Powered by Azure / GitHub" row is untouched — keeps existing .footer-link style.

Verification

gatsby develop didn't boot locally — gatsby-source-git (clones SSW.People.Profiles) + CRM data sources didn't fully materialize even with Keeper creds, so the schema was missing allSkillUrls and the build bundle crashed. Verified instead via:

  • A static Tailwind harness mirroring the new JSX (1280 / 768 / 375 widths), tooltip + hover confirmed.
  • Pattern matches the already-merged Rules implementation byte-for-equivalent (same className shape, same conditional commitHash && ..., same tooltip markup).
  • Final verification will be on the PR-slot preview once the CI build completes (real gatsby-source-git + CRM data).

Test plan

  • PR slot footer reads "This website is under continuous deployment. Last updated X day(s) ago. Last commit YYY"
  • Hover "X day(s) ago" → tooltip "Last updated D MMM YYYY at HH:mm UTC"
  • Click "continuous deployment" → opens SSW Rule
  • Click commit hash → opens GitHub commit page
  • "Chinafied / Powered by Azure / GitHub" row visually unchanged
  • No layout regression at 1280 / 768 / 414 / 375

Follow-ups (out of scope)

  • Cross-repo commit: showing the latest commit from EITHER the code repo OR the content repo (SSW.People.Profiles). Discussed during planning; deferred — would touch all 3 SSW sites. Tracking-issue worthy if we want it.
  • day(s) / hour(s) plural parens in getLastDeployTime() — pre-existing, unrelated, leaving alone for "no scope creep".

🤖 Generated with Claude Code

…tip, 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) <noreply@anthropic.com>
…es 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) <noreply@anthropic.com>
Two follow-ups on the People footer change:

- Both deployment-line <a>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) <noreply@anthropic.com>
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 <a>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) <noreply@anthropic.com>
@0xharkirat

Copy link
Copy Markdown
Member Author

Footer change — before / after / cross-site references

BEFORE — current production ssw.com.au/people

This website is under CONSTANT CONTINUOUS DEPLOYMENT. Last deployed 32 day(s) ago (Build # 801)

before — ssw.com.au/people prod

AFTER — this PR's built artifact (run 26806142321)

PR has no slot/preview deploy, so verifying from the CI build artifact served locally.

This website is under continuous deployment. Last updated 1 min ago. Last commit 0c5b6af

after — built artifact

Hover on "X min/hour/day(s) ago" reveals the exact UTC datetime

after with custom tooltip

DOM verified on the artifact:

  • tabIndex={0} + aria-describedby="deployment-tooltip" for keyboard / screen-reader access
  • Commit URL uses full SHA (/commit/0c5b6afb9604965e5e5e7eac0db2c3b22d9372e0); display slice-7
  • rel="noopener noreferrer nofollow" on the commit link
  • Both links have inline text-decoration: none (skipping .footer-link's dotted bottom-border so the deployment row is visually quieter than the Chinafied/Powered-by row)

Cross-site references — what this is matching

SSWConsulting/SSW.Rules#2646 — already merged + live on ssw.com.au/rules:

rules reference — ssw.com.au/rules prod

SSWConsulting/SSW.Website#4720 — merged earlier today, now live on ssw.com.au:

website reference — ssw.com.au prod

All three sites share the same pattern now:

  • "This website is under continuous deployment." (lowercase, link to the rule)
  • "Last updated X ago." with hover-tooltip + native title showing the exact UTC datetime
  • "Last commit YYY" linking to the GitHub commit (full SHA in URL, slice-7 display)
  • White text + hover:text-ssw-red + focus-visible:text-ssw-red + no underline

Screenshots hosted on branch pr-846-footer-shots (assets only, deletable after merge).

@tiagov8 tiagov8 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@0xharkirat 0xharkirat merged commit d2dca08 into main Jun 3, 2026
2 checks passed
@0xharkirat 0xharkirat deleted the hs/footer-consistent-with-rules branch June 3, 2026 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants