Skip to content

A3: Dated event banner - #2893

Open
AutomatedTester wants to merge 1 commit into
trunkfrom
site/a3-event-banner
Open

AutomatedTester wants to merge 1 commit into
trunkfrom
site/a3-event-banner

Conversation

@AutomatedTester

@AutomatedTester AutomatedTester commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

What changed

  • hugo.toml: replaced the banner_flag / announcement_banner booleans with a
    [params.announcement] table holding text, url, link_text, start and end (ISO dates),
    preceded by a comment explaining usage. The current values are the 2026 conference text with
    end = "2026-10-01", so nothing renders until someone sets a future window.
  • New partial layouts/partials/announcement-active.html returns true only when the build date
    is within [start, end] (both inclusive; end is treated as the end of that day). It returns
    false when text, start or end are missing.
  • layouts/partials/announcement-banner.html now renders text, and url + link_text (default
    "Learn more") when a URL is set, instead of hard-coded conference copy. It also checks the active
    partial itself, so it is safe to include from anywhere.
  • layouts/partials/navbar.html includes the banner via the new active check.
  • layouts/shortcodes/blocks/section.html used banner_flag to decide whether to add a 50px top
    margin on the first section; it now uses the same active check so the margin fallback still works.

Why

Plan item A3: the banner text was hard-coded in a template and toggled by config flags someone had to
remember to switch off, which is why the site was still thanking people for attending a past
conference. A config-driven banner with a date window expires on its own.

Acceptance criteria

  • [params.announcement] with text, url, link_text, start, end.
  • Partial renders only when now is within [start, end]. Verified by building once with
    end = "2026-10-12" (today) — banner present on index.html — and once with
    end = "2026-10-01" — banner absent and the 50px margin fallback applied.
  • Old banner_flag / announcement_banner flags removed (no remaining references in layouts).
  • Params left in place with a past end date and a usage comment.
  • Note: the window is evaluated at build time (static site), so a banner appears/disappears on the
    next deploy, not at midnight. The comment in hugo.toml says so.

Translated pages affected

none

Checks run

  • Site build (Hugo, vendored Docsy): no WARN or ERROR lines, in both the "inside window" and
    "outside window" configurations.
  • grep of generated index.html for announcement-banner in both states as described above.

Disclosure

Prepared with Claude (Anthropic); the author reviewed and edited all content.



Generated by Claude Code

@netlify

netlify Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for selenium-dev ready!

Name Link
🔨 Latest commit 065e886
🔍 Latest deploy log https://app.netlify.com/projects/selenium-dev/deploys/6ad8776c8b4dfac2a24d98bd
😎 Deploy Preview https://deploy-preview-2893--selenium-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown
Member Author

Superseded: the Phase 1 items are being regrouped into one PR per workstream to make the layout easier to review as a whole. This branch's commit is carried over unchanged.


Generated by Claude Code

Copy link
Copy Markdown
Member Author

Reopened. Part of the selenium.dev modernisation set; see #2912 for the full list and suggested review order.


Generated by Claude Code

@AutomatedTester
AutomatedTester marked this pull request as ready for review October 14, 2026 14:48
@rpallavisharma

Copy link
Copy Markdown
Member

good change.. thanks David. @AutomatedTester

diemol
diemol previously approved these changes Oct 20, 2026
@diemol

diemol commented Oct 20, 2026

Copy link
Copy Markdown
Member

@AutomatedTester can you please resolve the conflicts?

The announcement banner was hard-coded text in the partial and toggled
by two booleans (banner_flag, announcement_banner) that someone had to
remember to switch off after an event.

Replace them with [params.announcement] in hugo.toml carrying text, url,
link_text, start and end (ISO dates). A new announcement-active.html
partial returns true only when the build date falls within [start, end]
inclusive; the navbar and the blocks/section shortcode (which adds the
top margin when no banner is shown) both use it. The banner partial now
renders the configured text and link instead of hard-coded copy.

The params are left in place with an end date in the past so nothing is
shown, with a comment explaining how to announce the next event.

Copy link
Copy Markdown
Member Author

Rebased onto trunk. The conflict was with #2916 (the aria-pressed fix on the banner link); the templated link now omits that attribute too.


Generated by Claude Code

This branch has not been deployed

No deployments
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.

3 participants