Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
2b4cbdf
feat: add @stackflow/plugin-blocker package scaffold
ENvironmentSet Mar 10, 2026
3359cff
chore(plugin-blocker): set up Jest test harness with React Testing Li…
ENvironmentSet Mar 10, 2026
7248d39
chore: add multiple new package dependencies to Yarn cache
ENvironmentSet Mar 10, 2026
0d6572f
feat(plugin-blocker): define public API types and function signatures
ENvironmentSet Mar 10, 2026
789ff4a
docs(plugin-blocker): add technical specification for blockerPlugin
ENvironmentSet Mar 10, 2026
4da8d69
add test plan
ENvironmentSet Mar 10, 2026
37341dc
test(plugin-blocker): add 1-1 기본 차단 test cases
ENvironmentSet Mar 10, 2026
89950f9
add guidelines
ENvironmentSet Mar 10, 2026
0466f8d
test(plugin-blocker): add 1-2 through 2단락 test cases
ENvironmentSet Mar 10, 2026
ba60265
add feedback
ENvironmentSet Mar 10, 2026
b3488f7
plan update
ENvironmentSet Mar 10, 2026
a23e96a
test(plugin-blocker): add 3-1 기본 bypass test cases
ENvironmentSet Mar 10, 2026
7cb3730
test(plugin-blocker): add 3-2, 3-3 bypass test cases
ENvironmentSet Mar 10, 2026
c294846
test(plugin-blocker): add 4. Composition 다중 블로커 test cases
ENvironmentSet Mar 10, 2026
60024f5
test(plugin-blocker): add 5. Lifecycle test cases
ENvironmentSet Mar 10, 2026
c32f142
refactor(plugin-blocker): replace bypass(BlockedNavigation) with over…
ENvironmentSet Mar 12, 2026
8da3b5e
update spec
ENvironmentSet Mar 12, 2026
1b4ac4b
test update
ENvironmentSet Mar 12, 2026
a46b633
interface change
ENvironmentSet Mar 13, 2026
199b356
fix test
ENvironmentSet Mar 13, 2026
e57416c
fix test
ENvironmentSet Mar 13, 2026
11c91cf
update spec
ENvironmentSet Mar 13, 2026
2e09695
update spec
ENvironmentSet Mar 14, 2026
4e7225d
update spec
ENvironmentSet Mar 14, 2026
570929f
update tests and interface to use proceed (blocking set model)
ENvironmentSet Mar 14, 2026
aa8f9bb
add lifecycle test: unmount proceed with single blocker executes navi…
ENvironmentSet Mar 14, 2026
319275b
impl
ENvironmentSet Mar 14, 2026
5fdabb6
add onError option and error isolation for onBlocked callbacks
ENvironmentSet Mar 14, 2026
a4d0f08
serialize onBlocked notifications to preserve navigation order
ENvironmentSet Mar 14, 2026
c45ab89
add changeset for @stackflow/plugin-blocker minor release
ENvironmentSet Mar 14, 2026
5788288
fix test script to use yarn jest for CI compatibility
ENvironmentSet Mar 14, 2026
f79c705
Merge branch 'main' into add-plugin-blocker
ENvironmentSet Mar 14, 2026
89013a5
guard skipNext with try/finally to prevent flag leak on throw
ENvironmentSet Mar 14, 2026
103b669
add test
ENvironmentSet Mar 15, 2026
82bab4e
replace skipNext boolean with per-action Symbol marker
ENvironmentSet Mar 15, 2026
5958c23
add react peerdep
ENvironmentSet Mar 15, 2026
445f9a4
update lockfile
ENvironmentSet Mar 15, 2026
8412b23
remove plugin-blocker design docs
ENvironmentSet Mar 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .changeset/add-plugin-blocker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
"@stackflow/plugin-blocker": minor
---

Add blockerPlugin and useBlocker hook for navigation blocking

- `useBlocker({ shouldBlock, onBlocked })` hook to declare blocking policies per activity
- Blocking set model: multiple blockers can block a navigation, all must `proceed()` for it to execute
- Only blockers from active (`isActive: true`) activities are evaluated
- `onBlocked` notifications are serialized in navigation occurrence order (no re-entrancy)
- Error isolation: one blocker's `onBlocked` throwing does not prevent other blockers from being notified
- Plugin-level `onError` option for custom error handling (defaults to `console.error`)
- Blocker cleanup on component unmount; previously captured `proceed` remains callable
Loading
Loading