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

Port App and FatalError components to TS and functional components #1535

Merged
merged 6 commits into from
Aug 19, 2023

Conversation

joel-jeremy
Copy link
Contributor

@joel-jeremy joel-jeremy commented Aug 17, 2023

Related to #1483

@netlify
Copy link

netlify bot commented Aug 17, 2023

Deploy Preview for actualbudget ready!

Name Link
🔨 Latest commit 2695293
🔍 Latest deploy log https://app.netlify.com/sites/actualbudget/deploys/64dfdefba620fc0008229c00
😎 Deploy Preview https://deploy-preview-1535.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.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 17, 2023

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
14 2.12 MB → 2.12 MB (+1.75 kB) +0.08%
Changeset
File Δ Size
src/components/FatalError.tsx 🆕 +4.72 kB 0 B → 4.72 kB
../../node_modules/react-error-boundary/dist/react-error-boundary.esm.js 🆕 +4.68 kB 0 B → 4.68 kB
src/components/App.tsx 🆕 +3.79 kB 0 B → 3.79 kB
src/components/AppBackground.tsx 🆕 +893 B 0 B → 893 B
package.json 📈 +33 B (+1.71%) 1.89 kB → 1.92 kB
src/components/FatalError.js 🔥 -4.72 kB (-100%) 4.72 kB → 0 B
src/components/App.js 🔥 -3.77 kB (-100%) 3.77 kB → 0 B
src/components/AppBackground.js 🔥 -893 B (-100%) 893 B → 0 B
View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

Asset File Size % Changed
static/js/main.js 963.68 kB → 965.43 kB (+1.75 kB) +0.18%

Smaller

No assets were smaller

Unchanged

Asset File Size % Changed
static/js/171.chunk.js 396.24 kB 0%
static/media/Inter-italic.var.woff2 239.29 kB 0%
static/media/Inter-roman.var.woff2 221.86 kB 0%
static/js/wide-components.chunk.js 136.97 kB 0%
static/js/383.chunk.js 117.35 kB 0%
static/js/reports.chunk.js 41.22 kB 0%
static/js/narrow-components.chunk.js 24.86 kB 0%
static/js/969.chunk.js 12.94 kB 0%
static/js/resize-observer-polyfill.chunk.js 8.12 kB 0%
static/css/main.css 5.82 kB 0%
asset-manifest.json 1.78 kB 0%
index.html 1.66 kB 0%
static/media/browser-server.js 963 B 0%

@github-actions
Copy link
Contributor

github-actions bot commented Aug 17, 2023

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
2 1.97 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 1012.22 kB 0%
xfo.xfo.kcab.worker.js 1004.04 kB 0%

@joel-jeremy joel-jeremy changed the title Port App to functional component Port App and FatalError components to functional components Aug 17, 2023
@joel-jeremy joel-jeremy changed the title Port App and FatalError components to functional components Port App and FatalError components to TS and functional components Aug 17, 2023
Copy link
Member

@MatissJanis MatissJanis left a comment

Choose a reason for hiding this comment

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

Small regression for mobile views - the footer is cut off:

Screenshot 2023-08-18 at 20 15 05

window.addEventListener('focus', checkScrollbars);
}

initAll().catch(e => console.error(e));
Copy link
Member

Choose a reason for hiding this comment

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

❓ question: ‏won't this cause issues?

Before: if initialisation fails (for whatever reason) the exception gets thrown and it bubbles up. Eventually breaking the entire app (and thus fatal error message is shown).

Now: if initialisation fails - the exception is shallowed. Do we show an error?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated to show error UI on init error

Comment on lines 58 to 59
setInitializing(false);
return;
Copy link
Member

Choose a reason for hiding this comment

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

💬 suggestion: ‏I think we should throw an exception here.

Before: fatalError gets set and we show error message

Now: fatalError is not set - do we show an error? Don't think we do.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated to show the error UI on init error

@trafico-bot trafico-bot bot added ⚠️ Changes requested Pull Request needs changes before it can be reviewed again and removed 🔍 Ready for Review labels Aug 18, 2023
@trafico-bot trafico-bot bot added 🔍 Ready for Review and removed ⚠️ Changes requested Pull Request needs changes before it can be reviewed again labels Aug 18, 2023
@joel-jeremy
Copy link
Contributor Author

The footer in mobile view should now be fixed.

Copy link
Member

@MatissJanis MatissJanis left a comment

Choose a reason for hiding this comment

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

Thanks!

@joel-jeremy joel-jeremy merged commit 79f4d02 into actualbudget:master Aug 19, 2023
15 checks passed
@trafico-bot trafico-bot bot added ✨ Merged Pull Request has been merged successfully and removed ✅ Approved labels Aug 19, 2023
FlorianLang06 pushed a commit to FlorianLang06/actual that referenced this pull request Mar 7, 2024
…ctualbudget#1535)

* Port app to functional component and tsx

* FatalError functional component + tsx

* Release notes

* Exports cleanup

* App cleanup

* Address PR comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ Merged Pull Request has been merged successfully
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants