Skip to content

docs: add dismissible announcement banner#2243

Merged
naorpeled merged 1 commit intomainfrom
docs/dismissible-announcement-banner
Mar 3, 2026
Merged

docs: add dismissible announcement banner#2243
naorpeled merged 1 commit intomainfrom
docs/dismissible-announcement-banner

Conversation

@naorpeled
Copy link
Copy Markdown
Collaborator

No description provided.

Add an announcement banner to the docs site using MkDocs Material announce
block and announce.dismiss feature. The banner displays open source PR Agent
documentation with a link to Qodo free version, and can be dismissed by the user.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings March 3, 2026 16:36
@qodo-free-for-open-source-projects
Copy link
Copy Markdown
Contributor

Review Summary by Qodo

Add dismissible announcement banner to documentation site

📝 Documentation ✨ Enhancement

Grey Divider

Walkthroughs

Description
• Add dismissible announcement banner to docs site
• Move announcement from config to template override
• Enable announce.dismiss feature for user dismissal
• Adjust header title margin for layout improvement
Diagram
flowchart LR
  A["mkdocs.yml config"] -- "enable announce.dismiss" --> B["Announcement feature"]
  C["main.html template"] -- "define announce block" --> B
  B -- "displays banner" --> D["User sees dismissible banner"]
  D -- "can dismiss" --> E["Banner hidden"]
  F["custom.css"] -- "adjust margin" --> G["Header layout"]
Loading

Grey Divider

File Changes

1. docs/mkdocs.yml ⚙️ Configuration changes +1/-1

Enable announce.dismiss and remove config announcement

• Enable announce.dismiss feature in theme features list
• Remove announcement key from extra configuration section
• Announcement content moved to template override for better control

docs/mkdocs.yml


2. docs/overrides/main.html ✨ Enhancement +4/-0

Add dismissible announcement banner block

• Add new announce block with dismissible banner content
• Display open source PR Agent documentation message
• Include link to Qodo free version get started page

docs/overrides/main.html


3. docs/docs/css/custom.css Formatting +1/-1

Adjust header title margin for banner layout

• Adjust .md-header__title margin-left from 0px to 12px
• Improves header layout spacing with new banner

docs/docs/css/custom.css


Grey Divider

Qodo Logo

@qodo-free-for-open-source-projects
Copy link
Copy Markdown
Contributor

qodo-free-for-open-source-projects bot commented Mar 3, 2026

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider


Remediation recommended

1. Unpinned mkdocs-material dependency 🐞 Bug ⛯ Reliability
Description
Docs CI/local setup installs mkdocs-material without a version pin while the site now enables the
announce.dismiss theme feature. This makes docs builds non-reproducible over time and increases
the chance that a future theme update changes/affects the announcement/dismiss behavior
unexpectedly.
Code

docs/mkdocs.yml[64]

+    - announce.dismiss
Evidence
The PR enables a specific Material feature (announce.dismiss) in docs/mkdocs.yml, but the repo’s
docs deployment workflow installs mkdocs-material without a version constraint, so the effective
theme version can change between runs.

docs/mkdocs.yml[46-66]
.github/workflows/docs-ci.yaml[23-33]
AGENTS.md[30-33]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Docs builds install `mkdocs-material` without a version pin, while `docs/mkdocs.yml` now enables `announce.dismiss`. This makes the docs build output dependent on whichever mkdocs-material version happens to be installed at build time.

## Issue Context
- GitHub Actions workflow installs mkdocs-material with `pip install mkdocs-material` (no version).
- Local dev instructions mirror this unpinned approach.

## Fix Focus Areas
- .github/workflows/docs-ci.yaml[23-33]
- AGENTS.md[30-33]
- docs/mkdocs.yml[46-66]

## Suggested approach
- Update the workflow to install a pinned version, e.g. `pip install mkdocs-material==X.Y.Z` and `pip install &quot;mkdocs-material[imaging]==X.Y.Z&quot;`.
- Optionally document the same pin in `AGENTS.md` so local preview uses the same version.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a dismissible announcement banner to the MkDocs Material documentation site to promote the Qodo free version “Get Started” page.

Changes:

  • Adds an announce block override to display a site-wide announcement banner.
  • Enables the Material feature announce.dismiss to allow users to dismiss the banner.
  • Tweaks header title spacing in custom CSS.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
docs/overrides/main.html Defines the announcement banner content via the announce block override.
docs/mkdocs.yml Enables announce.dismiss and removes the prior extra.announcement config entry.
docs/docs/css/custom.css Adjusts header title margin to improve layout spacing.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@naorpeled naorpeled merged commit fa3b233 into main Mar 3, 2026
6 checks passed
@naorpeled naorpeled deleted the docs/dismissible-announcement-banner branch March 3, 2026 17:18
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