primefaces / primefaces/primereact

Navigating back to landing page leaves empty whitespace from news banner

Open
#8,547 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Status: Needs Triage
Dominant language
CSS
Stars
8.3k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

Describe the bug

When navigating to inner documentation pages (e.g., /button, /inputtext), the <NewsSection /> banner renders at the top of the screen.

However, when a user clicks the logo to navigate back to the homepage (/), the news banner disappears, but an empty whitespace gap remains above the Topbar.

Landing page
Image
Docs page
Image
Reproducer

No response

System Information
System:
    OS: Windows 11 10.0.26200
    CPU: (12) x64 12th Gen Intel(R) Core(TM) i5-12450H
    Memory: 3.61 GB / 15.65 GB
  Binaries:
    Node: 22.22.0 - C:\nvm4w\nodejs\node.EXE
    Yarn: 4.10.3 - C:\nvm4w\nodejs\yarn.CMD
    npm: 11.12.0 - C:\Users\pgcet\AppData\Roaming\npm\npm.CMD
    bun: 1.3.11 - C:\Users\pgcet\AppData\Local\Microsoft\WinGet\Packages\Oven-sh.Bun_Microsoft.Winget.Source_8wekyb3d8bbwe\bun-windows-x64\bun.EXE
  Browsers:
    Chrome: 148.0.7778.179
    Edge: Chromium (140.0.3485.54)
    Internet Explorer: 11.0.26100.8115
Steps to reproduce the behavior
  1. Go to the PrimeReact homepage (/).
  2. Click on "Get Started" to navigate to an inner doc page. Notice the news/announcement banner appears at the very top.
  3. Click the PrimeReact logo in the top-left to return to the homepage.
  4. The banner component is gone, but the CSS layout spacing (padding-top: 6rem) remains, pushing the homepage Topbar down awkwardly with a white gap.
Expected behavior

I'm opening this issue to get feedback from maintainers before raising a PR. Should we:

Option A: Bring back the <NewsSection /> to the landing page so the banner is visible everywhere globally? (Simply uncommenting the import and the component in pages/index.js).

Option B: Explicitly disable the banner state when returning to the landing page to keep it clean?

Let me know which direction fits the project's design goals and I will happily submit a PR to implement it!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with pages/index.js and the NewsSection component, then trace the layout styles that leave padding-top: 6rem after navigating from an inner documentation page to /. Confirm the route transition reproduces the empty gap and determine the intended banner behavior with maintainers. Done means returning to the homepage leaves no unintended whitespace and the banner behavior matches the chosen design.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, javascript, react
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.