Skip to content

Commit da18f07

Browse files
authored
fix(plugin-stack-depth-change): invoke onDepthChanged only when transition is done (#439)
1 parent e27cfd4 commit da18f07

File tree

10 files changed

+60
-10
lines changed

10 files changed

+60
-10
lines changed

.changeset/heavy-pigs-clap.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@stackflow/plugin-stack-depth-change": patch
3+
---
4+
5+
fix(plugin-stack-depth-change): invoke `onDepthChanged` only when transition is done

.changeset/pre.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"mode": "exit",
3+
"tag": "canary",
4+
"initialVersions": {
5+
"@stackflow/core": "1.0.9",
6+
"@stackflow/demo": "1.2.18",
7+
"@stackflow/docs": "1.2.19",
8+
"@stackflow/compat-await-push": "1.1.6",
9+
"@stackflow/link": "1.3.15",
10+
"@stackflow/plugin-basic-ui": "1.5.1",
11+
"@stackflow/plugin-devtools": "0.1.7",
12+
"@stackflow/plugin-google-analytics-4": "1.1.8",
13+
"@stackflow/plugin-history-sync": "1.3.15",
14+
"@stackflow/plugin-map-initial-activity": "1.0.4",
15+
"@stackflow/plugin-preload": "1.2.14",
16+
"@stackflow/plugin-renderer-basic": "1.1.6",
17+
"@stackflow/plugin-renderer-web": "1.1.6",
18+
"@stackflow/plugin-stack-depth-change": "1.1.0",
19+
"@stackflow/react": "1.1.6",
20+
"@stackflow/esbuild-config": "1.0.1",
21+
"@stackflow/eslint-config": "1.0.2"
22+
},
23+
"changesets": [
24+
"heavy-pigs-clap"
25+
]
26+
}

demo/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# @stackflow/demo
22

3+
## 1.2.19-canary.0
4+
5+
### Patch Changes
6+
7+
- Updated dependencies
8+
- @stackflow/plugin-stack-depth-change@1.1.1-canary.0
9+
310
## 1.2.18
411

512
### Patch Changes

demo/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@stackflow/demo",
3-
"version": "1.2.18",
3+
"version": "1.2.19-canary.0",
44
"private": true,
55
"license": "MIT",
66
"exports": {
@@ -41,7 +41,7 @@
4141
"@stackflow/plugin-map-initial-activity": "^1.0.4",
4242
"@stackflow/plugin-preload": "^1.2.14",
4343
"@stackflow/plugin-renderer-basic": "^1.1.6",
44-
"@stackflow/plugin-stack-depth-change": "^1.1.0",
44+
"@stackflow/plugin-stack-depth-change": "^1.1.1-canary.0",
4545
"@stackflow/react": "^1.1.6",
4646
"@typescript-eslint/eslint-plugin": "^5.32.0",
4747
"@typescript-eslint/parser": "^5.20.0",

docs/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @stackflow/docs
22

3+
## 1.2.20-canary.0
4+
5+
### Patch Changes
6+
7+
- @stackflow/demo@1.2.19-canary.0
8+
39
## 1.2.19
410

511
### Patch Changes

docs/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@stackflow/docs",
3-
"version": "1.2.19",
3+
"version": "1.2.20-canary.0",
44
"private": true,
55
"description": "Mobile-first stack navigator framework with Composable Plugin System",
66
"license": "MIT",
@@ -12,7 +12,7 @@
1212
"dependencies": {
1313
"@mdx-js/react": "^2.1.1",
1414
"@stackflow/core": "^1.0.9",
15-
"@stackflow/demo": "^1.2.18",
15+
"@stackflow/demo": "^1.2.19-canary.0",
1616
"@stackflow/eslint-config": "^1.0.2",
1717
"@stackflow/plugin-basic-ui": "^1.4.2",
1818
"@stackflow/plugin-history-sync": "^1.3.14",

extensions/plugin-stack-depth-change/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @stackflow/plugin-stack-depth-change
22

3+
## 1.1.1-canary.0
4+
5+
### Patch Changes
6+
7+
- fix(plugin-stack-depth-change): invoke `onDepthChanged` only when transition is done
8+
39
## 1.1.0
410

511
### Minor Changes

extensions/plugin-stack-depth-change/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@stackflow/plugin-stack-depth-change",
3-
"version": "1.1.0",
3+
"version": "1.1.1-canary.0",
44
"license": "MIT",
55
"exports": {
66
".": {

extensions/plugin-stack-depth-change/src/stackDepthChangePlugin.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ type StackDepthChangePluginOptions = {
1414
function getActiveActivities(activities: Activity[]) {
1515
return activities.filter(
1616
(activity) =>
17-
activity.transitionState === "enter-active" ||
17+
activity.transitionState === "exit-active" ||
1818
activity.transitionState === "enter-done",
1919
);
2020
}

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1918,7 +1918,7 @@ __metadata:
19181918
languageName: unknown
19191919
linkType: soft
19201920

1921-
"@stackflow/demo@^1.2.18, @stackflow/demo@workspace:demo":
1921+
"@stackflow/demo@^1.2.19-canary.0, @stackflow/demo@workspace:demo":
19221922
version: 0.0.0-use.local
19231923
resolution: "@stackflow/demo@workspace:demo"
19241924
dependencies:
@@ -1935,7 +1935,7 @@ __metadata:
19351935
"@stackflow/plugin-map-initial-activity": ^1.0.4
19361936
"@stackflow/plugin-preload": ^1.2.14
19371937
"@stackflow/plugin-renderer-basic": ^1.1.6
1938-
"@stackflow/plugin-stack-depth-change": ^1.1.0
1938+
"@stackflow/plugin-stack-depth-change": ^1.1.1-canary.0
19391939
"@stackflow/react": ^1.1.6
19401940
"@types/react": ^18.0.10
19411941
"@types/react-dom": ^18.0.5
@@ -1975,7 +1975,7 @@ __metadata:
19751975
"@mdx-js/react": ^2.1.1
19761976
"@seed-design/stylesheet": ^1.0.0-alpha.0
19771977
"@stackflow/core": ^1.0.9
1978-
"@stackflow/demo": ^1.2.18
1978+
"@stackflow/demo": ^1.2.19-canary.0
19791979
"@stackflow/eslint-config": ^1.0.2
19801980
"@stackflow/plugin-basic-ui": ^1.4.2
19811981
"@stackflow/plugin-history-sync": ^1.3.14
@@ -2339,7 +2339,7 @@ __metadata:
23392339
languageName: unknown
23402340
linkType: soft
23412341

2342-
"@stackflow/plugin-stack-depth-change@^1.1.0, @stackflow/plugin-stack-depth-change@workspace:extensions/plugin-stack-depth-change":
2342+
"@stackflow/plugin-stack-depth-change@^1.1.1-canary.0, @stackflow/plugin-stack-depth-change@workspace:extensions/plugin-stack-depth-change":
23432343
version: 0.0.0-use.local
23442344
resolution: "@stackflow/plugin-stack-depth-change@workspace:extensions/plugin-stack-depth-change"
23452345
dependencies:

0 commit comments

Comments
 (0)