Skip to content

Allow clicking on carousel slides to navigate - #169

Merged
kdkasad merged 2 commits into
masterfrom
carousel-nav
Sep 12, 2026
Merged

kdkasad merged 2 commits into
masterfrom
carousel-nav

Conversation

@ericswpark

Copy link
Copy Markdown
Member

No description provided.

Copilot AI lite review requested due to automatic review settings September 12, 2026 19:01
@github-actions

github-actions Bot commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

Test Results

56 tests   56 ✅  5s ⏱️
 1 suites   0 💤
 1 files     0 ❌

Results for commit f4f59ee.

♻️ This comment has been updated with latest results.

@codecov

codecov Bot commented Sep 12, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.32%. Comparing base (70417b2) to head (f4f59ee).
⚠️ Report is 1 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #169   +/-   ##
=======================================
  Coverage   85.32%   85.32%           
=======================================
  Files          12       12           
  Lines        3006     3006           
  Branches     3006     3006           
=======================================
  Hits         2565     2565           
  Misses        399      399           
  Partials       42       42           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Keyboard activation of nested links is intercepted and canceled for adjacent slides.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Enables users to click adjacent carousel slides to navigate between members.

Changes:

  • Centralizes carousel navigation behavior.
  • Adds previous/next slide click handling.
  • Enables pointer interaction on adjacent slides.
File summaries
File Summary
static/style.css Enables interaction with adjacent carousel slides.
static/index.js Adds shared navigation and slide click handling.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread static/index.js Resolved
@ericswpark
ericswpark added this pull request to stack #171 September 12, 2026 19:09
@kdkasad

kdkasad commented Sep 12, 2026 •

Copy link
Copy Markdown
Collaborator

Clicking seems to navigate the carousel but also visit the site. I think (60%) this is because the is-prev/is-next class is on the <div> surrounding the <a>, so the <a> gets the event before the <div>, and preventDefault() is only called in the div event handler.

GPT says:

• Umami analytics is causing the navigation.

  Each preview is an <a> with data-umami-event (static/index.html:198). Umami installs a capture-phase click handler that:

  1. Intercepts the anchor click.
  2. Sends the analytics event asynchronously.
  3. Explicitly assigns location.href afterward.

  Your carousel handler runs later during bubbling and calls event.preventDefault() (static/index.js:200). That cancels the anchor’s native default navigation, but it
  cannot cancel Umami’s explicit location.href assignment. Thus the carousel moves and then Umami navigates away.

  A straightforward fix is to give adjacent .preview-frame anchors pointer-events: none; the click will target the slide instead, while the current slide remains a
  clickable link.
2026-09-12.15-34-38.mp4

@kdkasad
kdkasad force-pushed the carousel-nav branch 2 times, most recently from c5e46b9 to 56f3dba Compare September 12, 2026 20:02
@kdkasad
kdkasad merged commit bd79045 into master Sep 12, 2026
16 checks passed
@kdkasad
kdkasad deleted the carousel-nav branch September 12, 2026 20:19
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.

3 participants