Skip to content

Commit 4dac266

Browse files
serpentbladeclaude
andcommitted
docs(ci): build workspace deps before Pages deploy; revert Dropdown comment
Two related fixes: 1. Roll back the leading "SHARP EDGE" comment added to examples/Dropdown.rozie. Although it lived above the <rozie> wrapper and didn't alter any emitted fixture content, it shifted byte offsets enough to break a byte-placement check in the source map / parser test suite. The convention is documented in the docs demo's inline comment instead, which is the right place for it anyway (consumer-side guidance, not source-side). 2. Update .github/workflows/docs.yml for the new workspace dep graph. @rozie/docs now consumes @rozie/unplugin (compiles .rozie files at build time) and @rozie/runtime-vue (debounce / throttle / useOutsideClick referenced by emitted Vue SFCs). Both ship from their dist/. Mirror the build-order pattern used by vue-matrix.yml / react-matrix.yml: build core → unplugin → runtime-vue → docs. Also extend the workflow's path triggers so changes to those packages or to examples/*.rozie sources rebuild the docs. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent c165de7 commit 4dac266

2 files changed

Lines changed: 23 additions & 15 deletions

File tree

.github/workflows/docs.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ on:
55
branches: [main]
66
paths:
77
- 'docs/**'
8+
# The docs site dogfoods @rozie/unplugin/vite to compile examples/*.rozie
9+
# at build time, and the emitted Vue SFCs import @rozie/runtime-vue at
10+
# runtime. Rebuild on any change to those packages, the example sources,
11+
# or @rozie/core (transitively consumed by the unplugin).
12+
- 'packages/core/**'
13+
- 'packages/unplugin/**'
14+
- 'packages/runtime/vue/**'
15+
- 'examples/*.rozie'
816
- '.github/workflows/docs.yml'
917
workflow_dispatch:
1018

@@ -36,6 +44,21 @@ jobs:
3644
- name: Install dependencies
3745
run: pnpm install --frozen-lockfile
3846

47+
# @rozie/docs imports @rozie/unplugin/vite (compiles .rozie files at
48+
# build time) and the emitted Vue SFCs reference @rozie/runtime-vue
49+
# (debounce / throttle / useOutsideClick at runtime). Both packages
50+
# ship from their dist/, so build them before the docs build runs.
51+
# @rozie/core is bundled into the unplugin's dist via tsdown but we
52+
# still build it explicitly so the peggy generated parser is in place.
53+
- name: Build @rozie/core
54+
run: pnpm --filter @rozie/core run build
55+
56+
- name: Build @rozie/unplugin
57+
run: pnpm --filter @rozie/unplugin run build
58+
59+
- name: Build @rozie/runtime-vue
60+
run: pnpm --filter @rozie/runtime-vue run build
61+
3962
- name: Build docs
4063
run: pnpm --filter @rozie/docs build
4164

examples/Dropdown.rozie

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,6 @@
1010
- Named slot with slot params (consumer uses `#name="{ data }"` shorthand)
1111
- Default slot with slot params
1212
- $props writes (compiles to parent-update path because `model: true`)
13-
14-
SHARP EDGE — trigger click handling:
15-
The wrapping <div ref="triggerEl"> below has @click="toggle". Consumers should
16-
render their trigger content inside the #trigger slot WITHOUT binding a click
17-
handler — the wrapper's click bubbles up from any descendant and toggles. If a
18-
consumer also binds @click="toggle" on their slotted button, both fire and the
19-
state immediately flips back closed.
20-
21-
The slot's `:toggle` parameter is exposed for OTHER uses (e.g. closing the
22-
dropdown from inside the panel body), not for wiring the trigger click. The
23-
five consumer demos in examples/consumers/*/ follow this convention.
24-
25-
Tightening this contract (e.g. dropping the wrapper @click and making
26-
consumers wire toggle themselves) would be a breaking change to the API and
27-
every target's fixture set — tracked as a follow-up, not fixed here.
2813
-->
2914

3015
<rozie name="Dropdown">

0 commit comments

Comments
 (0)