Skip to content

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

Merged
y4nder merged 4 commits into
developfrom
claude/sticky-faculty-header-2Z63g
Apr 18, 2026
Merged

FAC-WEB feat: sticky faculty context header on analysis page#145
y4nder merged 4 commits into
developfrom
claude/sticky-faculty-header-2Z63g

Conversation

@y4nder

@y4nder y4nder commented Apr 18, 2026

Copy link
Copy Markdown
Member

Summary

  • Adds a compact sticky header bar to the faculty analysis page (FacultyReportScreen) that appears when the faculty name scrolls out of view
  • Bar shows the faculty avatar + name (left) and the course selector + Export PDF button (right) — giving the user persistent context about which faculty they are reviewing
  • Uses IntersectionObserver on the faculty name <h1> to toggle visibility; fades in/out with a translate-y + opacity transition
  • Warm frosted-glass styling: bg-background/80 backdrop-blur-md with a subtle border, consistent with the existing sticky pattern used in questionnaire-form-progress
  • All controls (course filter, export) remain fully functional in the sticky bar via the same handlers already wired in the title row

Closes #97

Test plan

  • Navigate to Dean → Faculties → any faculty → Analysis
  • Scroll past the faculty name — sticky bar fades in with avatar, name, course selector, and Export PDF
  • Scroll back to top — sticky bar fades out
  • Toggle dark/light mode — frosted glass renders correctly in both themes
  • Change the course via the sticky bar's dropdown — the tab content updates correctly
  • Verify no layout shift or z-index conflicts with the tab bar or pipeline card

https://claude.ai/code/session_017VN26i97mc9APZ11xfyNm2

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
@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:43pm

…oads

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
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
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
@y4nder y4nder changed the title feat: sticky faculty context header on analysis page FAC-WEB feat: sticky faculty context header on analysis page Apr 18, 2026
@y4nder y4nder self-assigned this Apr 18, 2026
@y4nder y4nder merged commit c0b1df0 into develop Apr 18, 2026
3 checks passed
y4nder added a commit that referenced this pull request Apr 18, 2026
* 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 added a commit that referenced this pull request Apr 18, 2026
…146)

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

2 participants