Skip to content

Commit c5f1f92

Browse files
ryan-williamsclaude
andcommitted
fix(nav,ci): scope click-to-nav to outer 15% L/R + re-enable cr.yml
- `play.vue`: clicking the letterbox / pillarbox bars (or the middle of the slide) used to nudge the deck back/forward. Restrict the click-to-nav hot zones to the outer 15% on each side so off-slide clicks defocus without paging. - `cr.yml`: pkg-pr-new GitHub App is now installed on the `Open-Athena` org — re-enable per-push + per-PR auto-triggers so each commit publishes SHA-pinned preview packages users can install directly (see followup commit updating README + Install slide). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 594d295 commit c5f1f92

2 files changed

Lines changed: 17 additions & 12 deletions

File tree

.github/workflows/cr.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
# Continuous Releases provided by https://pkg.pr.new
22
#
3-
# Disabled for the Open-Athena fork: pkg-pr-new requires the `pkg-pr-new`
4-
# GitHub App to be installed on the org, which it isn't here. Every push was
5-
# failing with `Check failed (404): The app https://github.com/apps/pkg-pr-new
6-
# is not installed on Open-Athena/slidev`. We don't publish per-PR previews of
7-
# the slidev packages from this fork, so disable auto-triggers. Manual runs
8-
# stay available via `workflow_dispatch` if anyone wants to re-enable per-push
9-
# behaviour after installing the app.
3+
# Every push to main publishes preview packages keyed by commit SHA. Users
4+
# install with e.g.
5+
# npm i 'https://pkg.pr.new/Open-Athena/slidev/@slidev/cli@<sha>'
6+
# (any package manager). See README for the install pattern.
107
name: CR (Continuous Releases)
11-
on: workflow_dispatch
8+
on:
9+
push:
10+
branches: [main]
11+
pull_request:
12+
workflow_dispatch:
1213

1314
jobs:
1415
cr:

packages/client/pages/play.vue

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,15 @@ function onClick(e: MouseEvent) {
2727
return
2828
2929
if (e.button === 0 && (e.target as HTMLElement)?.id === 'slide-container') {
30-
// click right to next, left to previous
31-
if ((e.pageX / window.innerWidth) > 0.5)
32-
next()
33-
else
30+
// Only the outer 15% on each side advances/rewinds slides. The middle 70%
31+
// (and the letterbox/pillarbox bars near vertical center) is a no-op, so
32+
// clicking off-element to defocus doesn't accidentally page the deck.
33+
const x = e.pageX / window.innerWidth
34+
const HOT = 0.15
35+
if (x < HOT)
3436
prev()
37+
else if (x > 1 - HOT)
38+
next()
3539
}
3640
}
3741

0 commit comments

Comments
 (0)