Skip to content

Fix homepage anchor return scroll and delay Professional animation until visible#26

Merged
dansbands merged 1 commit intomainfrom
codex/fix-homepage-scroll-to-anchors-issue
Mar 31, 2026
Merged

Fix homepage anchor return scroll and delay Professional animation until visible#26
dansbands merged 1 commit intomainfrom
codex/fix-homepage-scroll-to-anchors-issue

Conversation

@dansbands
Copy link
Copy Markdown
Owner

Motivation

  • Anchor links on the homepage did not reliably scroll to sections when clicked after navigating back from other routes like /resume or /portfolio, causing a poor navigation experience.
  • The Professional section animation started on page load rather than waiting until the section was visible, triggering before the user reached it.

Description

  • Updated app/components/layout/global-nav.tsx to use usePathname and useRouter and to navigate to /#<section-id> when an anchor is clicked from a non-home route, and to smooth-scroll to a hash when the homepage loads or the hash changes.
  • Reworked app/components/home/professional.tsx to use a dedicated animationContainerRef and an IntersectionObserver with a 0.35 threshold to add the is-visible class only when the section enters the viewport and to unobserve after the first intersection.
  • Added issue drafts documenting both problems and acceptance criteria in github-issues/10-fix-homepage-anchor-scroll-when-navigating-back-from-resume-or-portfolio.md and github-issues/11-trigger-professional-animation-only-when-section-enters-viewport.md.

Testing

  • Ran npm run lint and it completed with no ESLint warnings or errors (passed).

Codex Task

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 30, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
dansbands-github-io Ready Ready Preview, Comment Mar 30, 2026 10:14pm

Request Review

@dansbands
Copy link
Copy Markdown
Owner Author

@copilot can you create issues from the drafts included here? If so, add them to the project board

@dansbands
Copy link
Copy Markdown
Owner Author

@codex review this pr

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 30, 2026

@copilot can you create issues from the drafts included here? If so, add them to the project board

Unfortunately I'm unable to create GitHub issues or interact with project boards from this sandbox — the GitHub REST API, gh CLI, and browser access to github.com are all blocked here, and the available MCP tools are read-only for issues.

The two draft files with all the issue content are already in the repo under github-issues/:

  • 10-fix-homepage-anchor-scroll-when-navigating-back-from-resume-or-portfolio.md
  • 11-trigger-professional-animation-only-when-section-enters-viewport.md

You can create the issues (and add them to the project board) manually using those drafts, or I can help if you'd like the draft content adjusted in any way.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/graphql
    • Triggering command: /usr/bin/gh gh project list --owner dansbands (http block)
    • Triggering command: /usr/bin/gh gh project list (http block)
    • Triggering command: /usr/bin/gh gh api graphql -f query={ user(login: &#34;dansbands&#34;) { projectsV2(first: 10) { nodes { id number title } } } } (http block)
  • https://api.github.com/repos/dansbands/dansbands.github.io/issues
    • Triggering command: /usr/bin/gh gh api repos/dansbands/dansbands.github.io/issues --method POST -f title=Fix homepage anchor scroll when navigating back from resume or portfolio -f body=## Problem Homepage nav links for PROFESSIONAL, RECENT WORK, and CONTACT rely on direct scroll behavior. When a user is on /resume or /portfolio and clicks one of those links, the app returns to / but does not scroll to the requested section on the f (http block)
    • Triggering command: /usr/bin/curl curl -s -H Authorization: token ****** -H Accept: application/vnd.github.v3&#43;json REDACTED -o /dev/null -w %{http_code}\n (http block)
    • Triggering command: /usr/bin/curl curl -v -H Authorization: token ****** -H Content-Type: application/json REDACTED -d {&#34;title&#34;:&#34;test&#34;} (http block)
  • https://api.github.com/zen
    • Triggering command: /usr/bin/curl curl -s -o /dev/null -w %{http_code} REDACTED (http block)

If you need me to access, download, or install something from one of these locations, you can either:

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@dansbands dansbands merged commit 6a2533f into main Mar 31, 2026
3 checks passed
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