Skip to content

FAC-WEB feat: sticky faculty context header on analysis page (#145)#146

Merged
y4nder merged 1 commit into
mainfrom
release/main/analysis-page-sticky-header
Apr 18, 2026
Merged

FAC-WEB feat: sticky faculty context header on analysis page (#145)#146
y4nder merged 1 commit into
mainfrom
release/main/analysis-page-sticky-header

Conversation

@y4nder

@y4nder y4nder commented Apr 18, 2026

Copy link
Copy Markdown
Member
  • feat: add sticky faculty context header on analysis page

Shows a compact frosted-glass bar (avatar + name + course selector + export button) that fades in when the faculty name scrolls out of view, giving the user persistent context about which faculty they are reviewing.

Uses IntersectionObserver on the title to toggle visibility, following the existing sticky pattern from questionnaire-form-progress.

https://claude.ai/code/session_017VN26i97mc9APZ11xfyNm2

  • fix: use callback ref so sticky header observer attaches after data loads

The previous useEffect with [] ran during the loading state when the h1 hadn't mounted yet, so titleRef.current was null and the IntersectionObserver was never set up. Switching to a callback ref ensures the observer is created the moment the faculty name element actually enters the DOM.

https://claude.ai/code/session_017VN26i97mc9APZ11xfyNm2

  • refactor: simplify sticky faculty header to pure Tailwind

Replace the IntersectionObserver + callback ref + separate component approach with a single sticky Tailwind row on the existing title div. No JS, no state, no extra file — just sticky/backdrop-blur classes on the header that already contains the avatar, name, and controls.

https://claude.ai/code/session_017VN26i97mc9APZ11xfyNm2

  • fix: swap overflow-x-hidden for overflow-x-clip so sticky header works

overflow: hidden (even on one axis) creates a scroll container in CSS, which traps position: sticky — making it stick relative to the section instead of the viewport. overflow-x: clip clips visually without creating a scroll container, so sticky now works against the real scroller.

https://claude.ai/code/session_017VN26i97mc9APZ11xfyNm2


* feat: add sticky faculty context header on analysis page

Shows a compact frosted-glass bar (avatar + name + course selector +
export button) that fades in when the faculty name scrolls out of view,
giving the user persistent context about which faculty they are reviewing.

Uses IntersectionObserver on the title <h1> to toggle visibility, following
the existing sticky pattern from questionnaire-form-progress.

https://claude.ai/code/session_017VN26i97mc9APZ11xfyNm2

* fix: use callback ref so sticky header observer attaches after data loads

The previous useEffect with [] ran during the loading state when the h1
hadn't mounted yet, so titleRef.current was null and the IntersectionObserver
was never set up. Switching to a callback ref ensures the observer is created
the moment the faculty name element actually enters the DOM.

https://claude.ai/code/session_017VN26i97mc9APZ11xfyNm2

* refactor: simplify sticky faculty header to pure Tailwind

Replace the IntersectionObserver + callback ref + separate component approach
with a single sticky Tailwind row on the existing title div. No JS, no state,
no extra file — just sticky/backdrop-blur classes on the header that already
contains the avatar, name, and controls.

https://claude.ai/code/session_017VN26i97mc9APZ11xfyNm2

* fix: swap overflow-x-hidden for overflow-x-clip so sticky header works

overflow: hidden (even on one axis) creates a scroll container in CSS,
which traps position: sticky — making it stick relative to the section
instead of the viewport. overflow-x: clip clips visually without creating
a scroll container, so sticky now works against the real scroller.

https://claude.ai/code/session_017VN26i97mc9APZ11xfyNm2

---------

Co-authored-by: Claude <noreply@anthropic.com>
@y4nder y4nder self-assigned this Apr 18, 2026
@vercel

vercel Bot commented Apr 18, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
app-faculytics Ready Ready Preview, Comment Apr 18, 2026 7:48pm

@y4nder y4nder merged commit 198413d into main Apr 18, 2026
3 checks passed
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.

1 participant