Skip to content

fix: the rendering issue in the website-ui for the navbar#5376

Merged
princerajpoot20 merged 2 commits into
asyncapi:website-uifrom
Sourya07:fix/flickering
May 5, 2026
Merged

fix: the rendering issue in the website-ui for the navbar#5376
princerajpoot20 merged 2 commits into
asyncapi:website-uifrom
Sourya07:fix/flickering

Conversation

@Sourya07
Copy link
Copy Markdown
Contributor

@Sourya07 Sourya07 commented May 3, 2026

Description
Fixed a rendering issue where the UI was flickering due to incorrect state handling.

Changes

  • Resolved the rendering/flickering issue
  • Improved component update behavior

Before

Screen.Recording.2026-05-03.at.12.32.04.AM.mov

After

Screen.Recording.2026-05-03.at.11.46.33.AM.mov
  • ...
  • ...
  • ...

Related issue(s)

Summary by CodeRabbit

  • Performance
    • Improved scroll event handling in navigation components with optimized event listener management.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 3, 2026

Deploy Preview for asyncapi-website ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit db89a7d
🔍 Latest deploy log https://app.netlify.com/projects/asyncapi-website/deploys/69f6e679908a340008684e11
😎 Deploy Preview https://deploy-preview-5376--asyncapi-website.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.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 3, 2026

📝 Walkthrough

Walkthrough

Both NavBar and StickyNavbar components now use debounced scroll event handlers via lodash/debounce. Cleanup logic cancels pending debounced executions on unmount. NavBar also adjusts styling (z-index, padding) and simplifies logo height from scroll-state-dependent to fixed.

Changes

Scroll Handler Debouncing

Layer / File(s) Summary
Dependency Addition
components/navigation/NavBar.tsx, components/navigation/StickyNavbar.tsx
Both components import debounce from lodash/debounce.
Core Scroll Logic
components/navigation/NavBar.tsx (lines 48-60), components/navigation/StickyNavbar.tsx (lines 20-32)
Scroll handlers are wrapped with debounce to defer execution; cleanup functions remove listeners and call handleScroll.cancel() to prevent pending debounced invocations.
UI & Styling
components/navigation/NavBar.tsx (lines 169-170, 180-181)
Navbar wrapper className updated (z-index changed from z-100 to z-50, padding/spacing adjusted); AsyncAPILogo now uses constant h-8 class instead of isScrolled-conditional sizing.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 With a hop and a bound through the scroll so profound,
We debounce the handler, no jitter we've found!
The navbar stays nimble, the logo stays true,
Performance springs forth—hop, skip, scroll, whee! 🎉

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: fixing a rendering/flickering issue in the navbar components by implementing debounced scroll handlers and simplified logo logic.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 7/8 reviews remaining, refill in 7 minutes and 30 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

@asyncapi-bot asyncapi-bot requested a review from vishvamsinh28 May 3, 2026 06:03
@Sourya07 Sourya07 changed the title fix:the rendering issue in the website-ui for the navbar fix: the rendering issue in the website-ui for the navbar May 3, 2026
@Sourya07
Copy link
Copy Markdown
Contributor Author

Sourya07 commented May 3, 2026

As discussed -> #5253 (comment)

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 3, 2026

@Sourya07
Copy link
Copy Markdown
Contributor Author

Sourya07 commented May 3, 2026

Hi @princerajpoot20, could you please take a look? I’ve fixed the rendering issue.
Also, I noticed there are some linting issues in the repository. Should I address those in this PR, or would you prefer that I create a separate PR for them?

@sammy200-ui
Copy link
Copy Markdown
Contributor

Great stuff @Sourya07 , one suggestion - can you have it like before and after comparison in the description of the pr , so its much easier for maintainers to check and merge

@Sourya07
Copy link
Copy Markdown
Contributor Author

Sourya07 commented May 3, 2026

Great stuff @Sourya07 , one suggestion - can you have it like before and after comparison in the description of the pr , so its much easier for maintainers to check and merge

got it .

@sammy200-ui
Copy link
Copy Markdown
Contributor

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 3, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
components/navigation/NavBar.tsx (1)

172-174: ⚡ Quick win

Remove the commented-out code and stale JSX comment.

Lines 172–174 contain an old commented-out <div> with its full className, and line 284 has a leftover {/* </div> */} comment. Both are dead code that add noise and can mislead future reviewers about the intended structure.

🧹 Proposed cleanup
-        {/* <div
-        className={`bg-white/60 mx-auto fixed flex left-0 right-0 top-0 w-full z-[12] items-center justify-between max-w-[76rem] select-none transition-all duration-300 ease-spring ring-1 ring-black/5 bg-white/76 backdrop-blur-lg shadow-lg lg:rounded-full lg:mt-3 translate-y-0 ${className} z-50`}
-      ></div> */}
-      {/* </div> */}

Also applies to: 284-284

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@components/navigation/NavBar.tsx` around lines 172 - 174, Remove the dead
commented JSX in the NavBar component: delete the commented-out <div> block
containing the big className string and also remove the stray JSX comment token
"{/* </div> */}" that closes it; ensure the component JSX structure remains
balanced after removal (check NavBar's render/return and surrounding elements)
and run a quick lint/format to confirm no leftover comment artifacts remain.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@components/navigation/NavBar.tsx`:
- Around line 172-174: Remove the dead commented JSX in the NavBar component:
delete the commented-out <div> block containing the big className string and
also remove the stray JSX comment token "{/* </div> */}" that closes it; ensure
the component JSX structure remains balanced after removal (check NavBar's
render/return and surrounding elements) and run a quick lint/format to confirm
no leftover comment artifacts remain.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 2f4be283-bbb5-4b90-90ff-0c325872bc46

📥 Commits

Reviewing files that changed from the base of the PR and between 7c2813c and db89a7d.

📒 Files selected for processing (2)
  • components/navigation/NavBar.tsx
  • components/navigation/StickyNavbar.tsx

Copy link
Copy Markdown
Member

@princerajpoot20 princerajpoot20 left a comment

Choose a reason for hiding this comment

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

@Sourya07 Thanks for your effort.
Please go ahead and pick other remaining bugs.

@princerajpoot20 princerajpoot20 merged commit 29da255 into asyncapi:website-ui May 5, 2026
22 of 25 checks passed
@github-project-automation github-project-automation Bot moved this from To Be Triaged to Done in Website - Kanban May 5, 2026
@Sourya07
Copy link
Copy Markdown
Contributor Author

Sourya07 commented May 5, 2026

@princerajpoot20 thanks

@princerajpoot20
Copy link
Copy Markdown
Member

Also, I noticed there are some linting issues in the repository. Should I address those in this PR, or would you prefer that I create a separate PR for them?

@Sourya07 If they are few and manageable, like within the same file (the one you’re making changes to), then we can include them. If there are many such occurrences, we can handle those later in a single PR. Otherwise, the review may become slightly challenging.

@Sourya07
Copy link
Copy Markdown
Contributor Author

Sourya07 commented May 5, 2026

@princerajpoot20 solving the linting issue

@princerajpoot20
Copy link
Copy Markdown
Member

@princerajpoot20 solving the linting issue

@Sourya07 Solving linting issues is our last priority for now. Focus on bugs first.

@Sourya07
Copy link
Copy Markdown
Contributor Author

Sourya07 commented May 5, 2026

okay

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants