Skip to content

Enable hosting banner#1704

Merged
Alek99 merged 1 commit intomainfrom
enable-hosting-banner
Dec 6, 2025
Merged

Enable hosting banner#1704
Alek99 merged 1 commit intomainfrom
enable-hosting-banner

Conversation

@Alek99
Copy link
Copy Markdown
Member

@Alek99 Alek99 commented Dec 6, 2025

This PR enables the hosting banner by default and adds it to the navbar component so it displays on all pages.

Changes:

  • Set show_banner default value to True in HostingBannerState
  • Added hosting_banner() component to the navbar so it renders at the top of all pages

@Alek99 Alek99 force-pushed the enable-hosting-banner branch from 2823f41 to 4c86acd Compare December 6, 2025 00:16
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Dec 6, 2025

Greptile Overview

Greptile Summary

This PR enables the hosting banner by default and integrates it into the navbar component for site-wide visibility.

  • Sets show_banner default value to True in HostingBannerState, ensuring the on-premises deployment blog banner appears immediately on page load
  • Adds hosting_banner() component directly into the navbar, placing it above the header and ensuring consistent display across all pages
  • The banner remains user-dismissible via the X icon, which sets force_hide_banner to prevent future display during the session

Confidence Score: 5/5

  • This PR is safe to merge - simple default value change and component addition with no risk of breaking functionality.
  • The changes are minimal and low-risk: changing a boolean default from False to True and adding an existing component to the navbar. The banner functionality was already implemented and tested in PR Add on-premises deployment blog post and banner #1702. The component placement is correct as it's added inside a memoized navbar that's shared across all page templates.
  • No files require special attention.

Important Files Changed

File Analysis

Filename Score Overview
pcweb/components/hosting_banner.py 5/5 Changed show_banner default from False to True, enabling the on-premises deployment blog banner by default.
pcweb/components/docpage/navbar/navbar.py 5/5 Added hosting_banner() component inside the navbar to display the banner at the top of all pages.

Sequence Diagram

sequenceDiagram
    participant User
    participant Navbar
    participant HostingBanner
    participant HostingBannerState

    User->>Navbar: Loads any page
    Navbar->>HostingBanner: Renders hosting_banner()
    HostingBanner->>HostingBannerState: on_mount → show_blog_banner()
    HostingBannerState-->>HostingBanner: show_banner = True (already default)
    HostingBanner-->>User: Display banner (if is_banner_visible)
    
    User->>HostingBanner: Click X icon
    HostingBanner->>HostingBannerState: hide_banner()
    HostingBannerState-->>HostingBannerState: force_hide_banner = True
    HostingBannerState-->>HostingBanner: is_banner_visible = False
    HostingBanner-->>User: Banner hidden
Loading

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

2 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@Alek99 Alek99 merged commit 7101ee0 into main Dec 6, 2025
10 checks passed
@Alek99 Alek99 deleted the enable-hosting-banner branch December 6, 2025 00:19
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