Skip to content

Conversation

@gocanto
Copy link
Contributor

@gocanto gocanto commented Oct 17, 2025

Summary

  • hide the SideNav avatar when visiting the About page
  • suppress rendering of SideNav social links on the About page

Testing

  • make format
  • npm run test (fails: vitest binary unavailable in environment)

https://chatgpt.com/codex/tasks/task_e_68f1af1c46d48333a3607c19811aa55b

Summary by CodeRabbit

  • Bug Fixes
    • Avatar now hides on the About page and social links are suppressed there; visibility behaves correctly across other pages.
  • New Features
    • Navigation now applies route-aware top padding so nav alignment matches main content on specific pages (including post pages).
  • Tests
    • Expanded route and layout tests to cover avatar/social visibility and navigation padding across multiple pages.

@coderabbitai
Copy link

coderabbitai bot commented Oct 17, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

SideNavPartial.vue adds route-aware logic: introduces isAbout, CONTENT_ALIGNED_ROUTES, POST_ROUTE_PREFIX, and navPaddingTopClass; avatar now shows only when !isHome && !isAbout; social links are hidden on the about page; nav element applies dynamic top padding based on route. Tests updated accordingly.

Changes

Cohort / File(s) Summary
Side navigation component
src/partials/SideNavPartial.vue
Added route-aware constants and isAbout computed; changed avatar visibility from !isHome to !isHome && !isAbout; wrapped social links in conditional hidden-on-about; added navPaddingTopClass binding to nav for route-dependent top padding; adjusted route-aware visibility for posts and content-aligned routes.
Tests for side nav
tests/partials/SideNavPartial.test.ts
Added post route (/post/:slug) to test router; expanded tests for avatar and social visibility across routes (/, /about, /projects, /resume, /post/example-post); added assertions for nav padding behavior on home vs content-aligned routes; verified social link URLs, SVG classes, separator placement, and social fetch invocation; updated expectations to hide avatar/social on about route.

Sequence Diagram(s)

sequenceDiagram
  participant Router
  participant SideNav as SideNavPartial
  participant ViewRender as Renderer

  Router->>SideNav: provide current route
  Note right of SideNav: compute flags\nisHome, isAbout,\nCONTENT_ALIGNED_ROUTES,\nPOST_ROUTE_PREFIX
  SideNav->>SideNav: compute navPaddingTopClass
  SideNav->>SideNav: evaluate avatarVisible = !isHome && !isAbout
  SideNav->>SideNav: evaluate showSocial = !isAbout
  SideNav->>ViewRender: render nav with navPaddingTopClass
  alt avatarVisible
    SideNav->>ViewRender: render Avatar
  else avatar hidden
    Note right of ViewRender: Avatar omitted
  end
  alt showSocial
    SideNav->>ViewRender: render Social links
  else social hidden
    Note right of ViewRender: Social omitted (about page)
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰
I checked the routes with careful eyes,
Hid my portrait where the about page lies,
Social sprouts only where it's meant to be,
Padded the nav to match the page I see,
Hooray—tiny changes, neat and spry! 🎉

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The PR title "fix: Hide SideNav avatar and socials on about page" directly aligns with the stated PR objectives, which are to hide the SideNav avatar and suppress social links rendering on the About page. The title is concise, specific, and clearly communicates the primary intent of the changeset. While the implementation also includes route-aware navigation padding adjustments and new route constants, the title appropriately focuses on the main user-facing changes (hiding avatar and social elements on the about page) rather than implementation details, which is expected and acceptable per the guidelines.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch gus/hide-social-links-and-avatar-on-about-page-2025-10-17

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

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

@gocanto gocanto marked this pull request as draft October 17, 2025 03:01
@gemini-code-assist
Copy link

Summary of Changes

Hello @gocanto, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the user experience by implementing conditional rendering for elements within the SideNav component. Specifically, it ensures that both the user avatar and social media links are hidden when the user is on the 'About' page, leading to a more focused and contextually appropriate display.

Highlights

  • SideNav Avatar Visibility: The avatar in the SideNav is now hidden when the user is viewing the 'About' page, providing a cleaner interface for that specific route.
  • SideNav Social Links Visibility: The social media links in the SideNav are no longer displayed when navigating to the 'About' page, streamlining the navigation experience.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request correctly implements the hiding of the side navigation avatar and social links on the /about page by introducing an isAbout computed property and updating the template conditions. The changes are logical and directly address the requirements.

However, the unit tests have not been updated to reflect these changes. One existing test will now fail, and there is no test coverage for the new logic of hiding social links. I've added comments with details on how to address these critical testing gaps to ensure the codebase remains robust and prevent future regressions.

Copy link

@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.

Actionable comments posted: 0

🧹 Nitpick comments (1)
src/partials/SideNavPartial.vue (1)

121-121: LGTM! Consider adding a clarifying comment.

The isAbout computed property is implemented correctly and consistently with the isHome pattern.

For consistency with the isHome computed property (lines 115-119), consider adding a brief comment explaining the use of path instead of fullPath:

+// `path` excludes query strings, ensuring correct route detection
+// even when query parameters are present (e.g. `/about?foo=bar`).
 const isAbout = computed<boolean>(() => currentRoute.path === '/about');
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ab78554 and 9516bf8.

📒 Files selected for processing (1)
  • src/partials/SideNavPartial.vue (3 hunks)
🔇 Additional comments (2)
src/partials/SideNavPartial.vue (2)

5-5: LGTM! Avatar correctly hidden on About page.

The avatar visibility logic now correctly hides the avatar on both the home page and the About page, as intended.


68-87: LGTM! Social links properly hidden on About page.

The social links section is now conditionally rendered and correctly hidden on the About page using the isAbout flag.

@gocanto gocanto added testing and removed codex labels Oct 17, 2025
@gocanto gocanto marked this pull request as ready for review October 17, 2025 03:31
@gocanto gocanto changed the title Hide SideNav avatar and socials on about page fix: Hide SideNav avatar and socials on about page Oct 17, 2025
Copy link

@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.

Actionable comments posted: 0

🧹 Nitpick comments (1)
src/partials/SideNavPartial.vue (1)

123-138: LGTM! Route-aware padding logic is well-structured.

The padding logic correctly handles different route types using a Set for efficient lookup. The default case provides good defensive coding for potential future routes.

One minor observation: the default case (line 137) returns the same value as the home route case (line 130). While this is good defensive coding, you could simplify by removing the home check and relying on the default. However, the explicit home case makes the intent clearer, so the current approach is perfectly fine.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9516bf8 and 8518491.

📒 Files selected for processing (2)
  • src/partials/SideNavPartial.vue (3 hunks)
  • tests/partials/SideNavPartial.test.ts (2 hunks)
🔇 Additional comments (8)
src/partials/SideNavPartial.vue (4)

5-5: LGTM! Avatar correctly hidden on about page.

The avatar visibility logic now properly hides the avatar on both home and about pages as required. The past review comment regarding the broken test has been addressed in the updated test file.


13-13: LGTM! Dynamic padding binding implemented correctly.

The nav element now applies route-aware padding through the navPaddingTopClass computed property, providing consistent layout alignment across different page types.


68-87: LGTM! Social links correctly hidden on about page.

The conditional rendering with v-if="!isAbout" properly suppresses social links on the about page as required. The past review comment regarding missing test coverage has been addressed with comprehensive tests in the test file.


121-121: LGTM! Clean implementation of route check.

The isAbout computed property follows the same pattern as isHome and correctly identifies the about route.

tests/partials/SideNavPartial.test.ts (4)

39-39: LGTM! Post route added for comprehensive testing.

Adding the /post/:slug route enables proper testing of the POST_ROUTE_PREFIX logic in the component.


96-124: LGTM! Comprehensive avatar visibility tests.

The test suite now properly covers:

  • Avatar hidden on home route (existing)
  • Avatar hidden on about route (new, addresses past review comment)
  • Avatar shown on other non-home routes (updated to test multiple paths)

The tests are well-structured and thoroughly validate the avatar visibility logic.


104-136: LGTM! Thorough social links testing.

Both tests comprehensively verify that social links are not rendered on the about page:

  • Lines 104-112: Direct check that social links are absent
  • Lines 126-136: Additional verification that the separator is also absent and that fetchSocial is still called

These tests address the past review comment about missing test coverage. While there's some overlap between the two tests, they validate different aspects of the behavior and provide good regression protection.


138-163: LGTM! Excellent padding alignment tests.

The tests thoroughly validate the route-aware padding logic:

  • Home route uses default padding pt-16
  • Content-aligned routes (about, projects, resume, post) use responsive padding pt-12 md:pt-16

The use of loops to test multiple paths ensures consistent behavior across similar route types.

@gocanto gocanto merged commit fbba8a1 into main Oct 17, 2025
7 checks passed
@gocanto gocanto deleted the gus/hide-social-links-and-avatar-on-about-page-2025-10-17 branch October 17, 2025 03:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants