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

Some typescript migration #1532

Merged
merged 11 commits into from
Aug 17, 2023
Merged

Some typescript migration #1532

merged 11 commits into from
Aug 17, 2023

Conversation

joel-jeremy
Copy link
Contributor

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

Some typescript migration for components in the root components directory. Also moved some sidebar components to the sidebar folder. There's no functional change in this PR.

This is to help with #1483.

@netlify
Copy link

netlify bot commented Aug 16, 2023

Deploy Preview for actualbudget ready!

Name Link
🔨 Latest commit 6746b1e
🔍 Latest deploy log https://app.netlify.com/sites/actualbudget/deploys/64de7311e585d90008f3c526
😎 Deploy Preview https://deploy-preview-1532.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 16, 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 (+128 B) +0.01%
Changeset
File Δ Size
src/components/Titlebar.tsx 🆕 +8 kB 0 B → 8 kB
src/components/sidebar/SidebarWithData.tsx 🆕 +3.76 kB 0 B → 3.76 kB
src/components/sidebar/Accounts.tsx 🆕 +2.91 kB 0 B → 2.91 kB
src/components/sidebar/Sidebar.tsx 🆕 +2.55 kB 0 B → 2.55 kB
src/components/sidebar/Account.tsx 🆕 +2.36 kB 0 B → 2.36 kB
src/components/sort.tsx 🆕 +2.35 kB 0 B → 2.35 kB
src/components/MobileWebMessage.tsx 🆕 +2.27 kB 0 B → 2.27 kB
src/components/LoggedInUser.tsx 🆕 +2.15 kB 0 B → 2.15 kB
src/components/UpdateNotification.tsx 🆕 +2.01 kB 0 B → 2.01 kB
src/components/sidebar/index.tsx 🆕 +2.01 kB 0 B → 2.01 kB
src/components/sidebar/Tools.tsx 🆕 +1.42 kB 0 B → 1.42 kB
src/components/sidebar/Item.tsx 🆕 +1.29 kB 0 B → 1.29 kB
src/components/BankSyncStatus.tsx 🆕 +1.24 kB 0 B → 1.24 kB
src/components/sidebar/SecondaryItem.tsx 🆕 +1.17 kB 0 B → 1.17 kB
src/components/sidebar/ToggleButton.tsx 🆕 +705 B 0 B → 705 B
src/components/GlobalKeys.tsx 🆕 +591 B 0 B → 591 B
src/components/sidebar/ItemContent.tsx 🆕 +571 B 0 B → 571 B
src/components/AnimatedRefresh.tsx 🆕 +509 B 0 B → 509 B
src/components/ManageRulesPage.tsx 🆕 +282 B 0 B → 282 B
src/components/SyncRefresh.tsx 🆕 +269 B 0 B → 269 B
src/components/FinancesApp.tsx 📉 -9 B (-0.12%) 7.05 kB → 7.05 kB
src/components/settings/Format.tsx 📉 -9 B (-0.26%) 3.42 kB → 3.41 kB
src/components/sidebar.js 🔥 -11.04 kB (-100%) 11.04 kB → 0 B
src/components/Titlebar.js 🔥 -8.01 kB (-100%) 8.01 kB → 0 B
src/components/SidebarWithData.js 🔥 -3.69 kB (-100%) 3.69 kB → 0 B
src/components/sort.js 🔥 -2.28 kB (-100%) 2.28 kB → 0 B
src/components/MobileWebMessage.js 🔥 -2.27 kB (-100%) 2.27 kB → 0 B
src/components/LoggedInUser.js 🔥 -2.15 kB (-100%) 2.15 kB → 0 B
src/components/UpdateNotification.js 🔥 -2.01 kB (-100%) 2.01 kB → 0 B
src/components/FloatableSidebar.js 🔥 -1.96 kB (-100%) 1.96 kB → 0 B
src/components/BankSyncStatus.js 🔥 -1.24 kB (-100%) 1.24 kB → 0 B
src/components/GlobalKeys.js 🔥 -591 B (-100%) 591 B → 0 B
src/components/AnimatedRefresh.js 🔥 -507 B (-100%) 507 B → 0 B
src/components/SyncRefresh.js 🔥 -269 B (-100%) 269 B → 0 B
src/components/ManageRulesPage.js 🔥 -256 B (-100%) 256 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.48 kB → 963.6 kB (+124 B) +0.01%
static/js/wide-components.chunk.js 136.97 kB → 136.97 kB (+2 B) +0.00%
static/js/narrow-components.chunk.js 24.85 kB → 24.85 kB (+2 B) +0.01%

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/383.chunk.js 117.35 kB 0%
static/js/reports.chunk.js 41.22 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 16, 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%

@@ -0,0 +1,181 @@
import React, { useEffect, useState } from 'react';
Copy link
Member

Choose a reason for hiding this comment

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

This file has quite a lot of functional changes (you're porting it from a class component to a hook). Any chance you could do this as a separate PR so we can carefully review the changes?

Copy link
Contributor Author

@joel-jeremy joel-jeremy Aug 17, 2023

Choose a reason for hiding this comment

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

Reverted the changes here and created a separate PR for the ported components: #1535

@@ -0,0 +1,194 @@
import React, { useState } from 'react';
Copy link
Member

Choose a reason for hiding this comment

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

Same comment about this component.

Copy link
Contributor Author

@joel-jeremy joel-jeremy Aug 17, 2023

Choose a reason for hiding this comment

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

Reverted the changes here and created a separate PR for the ported components: #1535

packages/desktop-client/src/components/sidebar/Item.tsx Outdated Show resolved Hide resolved
packages/desktop-client/src/components/sidebar/Sidebar.tsx Outdated Show resolved Hide resolved
@MatissJanis
Copy link
Member

Apart from that one comment everything else looks good. 👍

@joel-jeremy joel-jeremy merged commit 6fae795 into actualbudget:master Aug 17, 2023
@trafico-bot trafico-bot bot added ✨ Merged Pull Request has been merged successfully and removed ✅ Approved labels Aug 17, 2023
FlorianLang06 pushed a commit to FlorianLang06/actual that referenced this pull request Mar 7, 2024
* Typescript migration

* Release notes

* Update error boundary

* Breakup sidebar components

* Account and Sidebar props

* Remove button in Item component + exports cleanup

* Put accountNameStyle to Account

* Revert component ports (separated to another PR)

* Export cleanup

* Remove ErrorBoundary (separated to another PR)

* Sidebar budgetName as ReactNode
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