Skip to content

Commit

Permalink
fix(plugin-stack-depth-change): invoke onDepthChanged only when tra…
Browse files Browse the repository at this point in the history
…nsition is done (#439)
  • Loading branch information
orionmiz authored Jan 19, 2024
1 parent e27cfd4 commit da18f07
Show file tree
Hide file tree
Showing 10 changed files with 60 additions and 10 deletions.
5 changes: 5 additions & 0 deletions .changeset/heavy-pigs-clap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@stackflow/plugin-stack-depth-change": patch
---

fix(plugin-stack-depth-change): invoke `onDepthChanged` only when transition is done
26 changes: 26 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"mode": "exit",
"tag": "canary",
"initialVersions": {
"@stackflow/core": "1.0.9",
"@stackflow/demo": "1.2.18",
"@stackflow/docs": "1.2.19",
"@stackflow/compat-await-push": "1.1.6",
"@stackflow/link": "1.3.15",
"@stackflow/plugin-basic-ui": "1.5.1",
"@stackflow/plugin-devtools": "0.1.7",
"@stackflow/plugin-google-analytics-4": "1.1.8",
"@stackflow/plugin-history-sync": "1.3.15",
"@stackflow/plugin-map-initial-activity": "1.0.4",
"@stackflow/plugin-preload": "1.2.14",
"@stackflow/plugin-renderer-basic": "1.1.6",
"@stackflow/plugin-renderer-web": "1.1.6",
"@stackflow/plugin-stack-depth-change": "1.1.0",
"@stackflow/react": "1.1.6",
"@stackflow/esbuild-config": "1.0.1",
"@stackflow/eslint-config": "1.0.2"
},
"changesets": [
"heavy-pigs-clap"
]
}
7 changes: 7 additions & 0 deletions demo/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @stackflow/demo

## 1.2.19-canary.0

### Patch Changes

- Updated dependencies
- @stackflow/plugin-stack-depth-change@1.1.1-canary.0

## 1.2.18

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions demo/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@stackflow/demo",
"version": "1.2.18",
"version": "1.2.19-canary.0",
"private": true,
"license": "MIT",
"exports": {
Expand Down Expand Up @@ -41,7 +41,7 @@
"@stackflow/plugin-map-initial-activity": "^1.0.4",
"@stackflow/plugin-preload": "^1.2.14",
"@stackflow/plugin-renderer-basic": "^1.1.6",
"@stackflow/plugin-stack-depth-change": "^1.1.0",
"@stackflow/plugin-stack-depth-change": "^1.1.1-canary.0",
"@stackflow/react": "^1.1.6",
"@typescript-eslint/eslint-plugin": "^5.32.0",
"@typescript-eslint/parser": "^5.20.0",
Expand Down
6 changes: 6 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @stackflow/docs

## 1.2.20-canary.0

### Patch Changes

- @stackflow/demo@1.2.19-canary.0

## 1.2.19

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions docs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@stackflow/docs",
"version": "1.2.19",
"version": "1.2.20-canary.0",
"private": true,
"description": "Mobile-first stack navigator framework with Composable Plugin System",
"license": "MIT",
Expand All @@ -12,7 +12,7 @@
"dependencies": {
"@mdx-js/react": "^2.1.1",
"@stackflow/core": "^1.0.9",
"@stackflow/demo": "^1.2.18",
"@stackflow/demo": "^1.2.19-canary.0",
"@stackflow/eslint-config": "^1.0.2",
"@stackflow/plugin-basic-ui": "^1.4.2",
"@stackflow/plugin-history-sync": "^1.3.14",
Expand Down
6 changes: 6 additions & 0 deletions extensions/plugin-stack-depth-change/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @stackflow/plugin-stack-depth-change

## 1.1.1-canary.0

### Patch Changes

- fix(plugin-stack-depth-change): invoke `onDepthChanged` only when transition is done

## 1.1.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion extensions/plugin-stack-depth-change/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@stackflow/plugin-stack-depth-change",
"version": "1.1.0",
"version": "1.1.1-canary.0",
"license": "MIT",
"exports": {
".": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type StackDepthChangePluginOptions = {
function getActiveActivities(activities: Activity[]) {
return activities.filter(
(activity) =>
activity.transitionState === "enter-active" ||
activity.transitionState === "exit-active" ||
activity.transitionState === "enter-done",
);
}
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1918,7 +1918,7 @@ __metadata:
languageName: unknown
linkType: soft

"@stackflow/demo@^1.2.18, @stackflow/demo@workspace:demo":
"@stackflow/demo@^1.2.19-canary.0, @stackflow/demo@workspace:demo":
version: 0.0.0-use.local
resolution: "@stackflow/demo@workspace:demo"
dependencies:
Expand All @@ -1935,7 +1935,7 @@ __metadata:
"@stackflow/plugin-map-initial-activity": ^1.0.4
"@stackflow/plugin-preload": ^1.2.14
"@stackflow/plugin-renderer-basic": ^1.1.6
"@stackflow/plugin-stack-depth-change": ^1.1.0
"@stackflow/plugin-stack-depth-change": ^1.1.1-canary.0
"@stackflow/react": ^1.1.6
"@types/react": ^18.0.10
"@types/react-dom": ^18.0.5
Expand Down Expand Up @@ -1975,7 +1975,7 @@ __metadata:
"@mdx-js/react": ^2.1.1
"@seed-design/stylesheet": ^1.0.0-alpha.0
"@stackflow/core": ^1.0.9
"@stackflow/demo": ^1.2.18
"@stackflow/demo": ^1.2.19-canary.0
"@stackflow/eslint-config": ^1.0.2
"@stackflow/plugin-basic-ui": ^1.4.2
"@stackflow/plugin-history-sync": ^1.3.14
Expand Down Expand Up @@ -2339,7 +2339,7 @@ __metadata:
languageName: unknown
linkType: soft

"@stackflow/plugin-stack-depth-change@^1.1.0, @stackflow/plugin-stack-depth-change@workspace:extensions/plugin-stack-depth-change":
"@stackflow/plugin-stack-depth-change@^1.1.1-canary.0, @stackflow/plugin-stack-depth-change@workspace:extensions/plugin-stack-depth-change":
version: 0.0.0-use.local
resolution: "@stackflow/plugin-stack-depth-change@workspace:extensions/plugin-stack-depth-change"
dependencies:
Expand Down

1 comment on commit da18f07

@vercel
Copy link

@vercel vercel bot commented on da18f07 Jan 19, 2024

Choose a reason for hiding this comment

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

Please sign in to comment.