Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 fix the app randomly navigating back (closing) #2772

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MatissJanis
Copy link
Member

Closes #2596

Reproduction:

  1. open demo link and create an empty budget
  2. close the tab
  3. open demo link /accounts
  4. close the tab
  5. open demo link /accounts
  6. 💣

@github-actions github-actions bot changed the title 🐛 fix the app randomly navigating back (closing) [WIP] 🐛 fix the app randomly navigating back (closing) May 17, 2024
Copy link

netlify bot commented May 17, 2024

Deploy Preview for actualbudget ready!

Name Link
🔨 Latest commit 0fc9430
🔍 Latest deploy log https://app.netlify.com/sites/actualbudget/deploys/6647ac748896430008e87740
😎 Deploy Preview https://deploy-preview-2772.demo.actualbudget.org
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@trafico-bot trafico-bot bot added 🔍 Ready for Review Pull Request is not reviewed yet 🚧 WIP Still work-in-progress, please don't review and don't merge and removed 🔍 Ready for Review Pull Request is not reviewed yet labels May 17, 2024
Copy link
Contributor

Bundle Stats — desktop-client

Hey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle.

As this PR is updated, I'll keep you updated on how the bundle size is impacted.

Total

Files count Total bundle size % Changed
9 4.72 MB → 4.72 MB (-37 B) -0.00%
Changeset
File Δ Size
src/hooks/useNavigate.ts 📉 -37 B (-3.91%) 946 B → 909 B
View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

No assets were bigger

Smaller

Asset File Size % Changed
static/js/index.js 3 MB → 3 MB (-37 B) -0.00%

Unchanged

Asset File Size % Changed
static/js/indexeddb-main-thread-worker-e59fee74.js 13.5 kB 0%
static/js/resize-observer.js 18.37 kB 0%
static/js/BackgroundImage.js 122.29 kB 0%
static/js/narrow.js 59.97 kB 0%
static/js/usePreviewTransactions.js 790 B 0%
static/js/AppliedFilters.js 20.54 kB 0%
static/js/wide.js 261.78 kB 0%
static/js/ReportRouter.js 1.23 MB 0%

Copy link
Contributor

Bundle Stats — loot-core

Hey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle.

As this PR is updated, I'll keep you updated on how the bundle size is impacted.

Total

Files count Total bundle size % Changed
1 1.2 MB 0%

Changeset

No files were changed

View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

No assets were bigger

Smaller

No assets were smaller

Unchanged

Asset File Size % Changed
kcab.worker.js 1.2 MB 0%

@MatissJanis MatissJanis changed the title [WIP] 🐛 fix the app randomly navigating back (closing) 🐛 fix the app randomly navigating back (closing) May 17, 2024
@trafico-bot trafico-bot bot added 🔍 Ready for Review Pull Request is not reviewed yet and removed 🚧 WIP Still work-in-progress, please don't review and don't merge labels May 17, 2024
Copy link
Contributor

@carkom carkom left a comment

Choose a reason for hiding this comment

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

LGTM!

@trafico-bot trafico-bot bot added ✅ Approved Pull Request has been approved and can be merged and removed 🔍 Ready for Review Pull Request is not reviewed yet labels May 22, 2024
@youngcw youngcw added this to the v24.6.0 milestone May 22, 2024
@joel-jeremy
Copy link
Contributor

joel-jeremy commented May 27, 2024

Removing this code will regress into the old bug where if you press back, it will appear as if nothing is happening. Steps to reproduce:

  1. Go to an account
  2. Add a transaction using the top right + button
  3. Press back
  4. Nothing happens - app stays on the same page

Maybe we could instead add a check to only do the navigate(-1) if there is still a previous location left or history stack still has entries.

@youngcw youngcw removed this from the v24.6.0 milestone May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✅ Approved Pull Request has been approved and can be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Site closes when opening
4 participants