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

♻️ moving more components to the new component-lib pkg #4346

Merged
merged 4 commits into from
Feb 11, 2025

Conversation

MatissJanis
Copy link
Member

Following up to: #4169

@actual-github-bot actual-github-bot bot changed the title ♻️ moving more components to the new component-lib pkg [WIP] ♻️ moving more components to the new component-lib pkg Feb 10, 2025
Copy link

netlify bot commented Feb 10, 2025

Deploy Preview for actualbudget ready!

Name Link
🔨 Latest commit 4f8c669
🔍 Latest deploy log https://app.netlify.com/sites/actualbudget/deploys/67ab9577e1a1820008a34555
😎 Deploy Preview https://deploy-preview-4346.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.

Copy link
Contributor

github-actions bot commented Feb 10, 2025

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
16 6.84 MB → 6.84 MB (+744 B) +0.01%
Changeset
File Δ Size
home/runner/work/actual/actual/packages/component-library/src/Menu.tsx 🆕 +5.66 kB 0 B → 5.66 kB
home/runner/work/actual/actual/packages/component-library/src/Toggle.tsx 🆕 +1.79 kB 0 B → 1.79 kB
home/runner/work/actual/actual/packages/component-library/src/Stack.tsx 🆕 +1.75 kB 0 B → 1.75 kB
home/runner/work/actual/actual/packages/component-library/src/Tooltip.tsx 🆕 +1.4 kB 0 B → 1.4 kB
home/runner/work/actual/actual/packages/component-library/src/Popover.tsx 🆕 +1.07 kB 0 B → 1.07 kB
home/runner/work/actual/actual/packages/component-library/src/AlignedText.tsx 🆕 +873 B 0 B → 873 B
home/runner/work/actual/actual/packages/component-library/src/Card.tsx 🆕 +612 B 0 B → 612 B
home/runner/work/actual/actual/packages/component-library/src/InlineField.tsx 🆕 +604 B 0 B → 604 B
home/runner/work/actual/actual/packages/component-library/src/InitialFocus.ts 🆕 +457 B 0 B → 457 B
home/runner/work/actual/actual/packages/component-library/src/Label.tsx 🆕 +378 B 0 B → 378 B
home/runner/work/actual/actual/packages/component-library/src/SpaceBetween.tsx 🆕 +330 B 0 B → 330 B
home/runner/work/actual/actual/packages/component-library/src/Text.tsx 🆕 +322 B 0 B → 322 B
home/runner/work/actual/actual/packages/component-library/src/Paragraph.tsx 🆕 +293 B 0 B → 293 B
home/runner/work/actual/actual/packages/component-library/src/TextOneLine.tsx 🆕 +291 B 0 B → 291 B
home/runner/work/actual/actual/packages/component-library/src/Block.tsx 🆕 +236 B 0 B → 236 B
home/runner/work/actual/actual/packages/component-library/src/FormError.tsx 🆕 +196 B 0 B → 196 B
src/components/common/SpaceBetween.ts 🆕 +36 B 0 B → 36 B
src/components/common/TextOneLine.ts 🆕 +34 B 0 B → 34 B
src/components/common/AlignedText.ts 🆕 +34 B 0 B → 34 B
src/components/common/InlineField.ts 🆕 +34 B 0 B → 34 B
src/components/common/Paragraph.ts 🆕 +30 B 0 B → 30 B
src/components/common/FormError.ts 🆕 +30 B 0 B → 30 B
src/components/common/Popover.ts 🆕 +26 B 0 B → 26 B
src/components/common/Tooltip.ts 🆕 +26 B 0 B → 26 B
src/components/common/Toggle.ts 🆕 +24 B 0 B → 24 B
src/components/common/Block.ts 🆕 +22 B 0 B → 22 B
src/components/common/Stack.ts 🆕 +22 B 0 B → 22 B
src/components/common/Label.ts 🆕 +22 B 0 B → 22 B
src/components/common/Card.ts 🆕 +20 B 0 B → 20 B
src/components/common/Text.ts 🆕 +20 B 0 B → 20 B
src/components/common/Menu.ts 🆕 +20 B 0 B → 20 B
src/components/mobile/budget/ListItem.tsx 📈 +2 B (+0.49%) 412 B → 414 B
src/components/common/Modal.tsx 📈 +24 B (+0.24%) 9.63 kB → 9.66 kB
src/components/mobile/budget/BudgetTable.jsx 📈 +106 B (+0.19%) 54.24 kB → 54.34 kB
src/components/mobile/accounts/Accounts.tsx 📈 +14 B (+0.16%) 8.57 kB → 8.59 kB
src/components/table.tsx 📈 +34 B (+0.14%) 24.08 kB → 24.11 kB
src/components/mobile/transactions/TransactionList.tsx 📈 +22 B (+0.13%) 16.07 kB → 16.09 kB
src/components/common/Button.tsx 📈 +4 B (+0.08%) 4.68 kB → 4.69 kB
src/components/mobile/accounts/AccountTransactions.tsx 📈 +4 B (+0.05%) 7.8 kB → 7.81 kB
src/components/mobile/budget/index.tsx 📈 +2 B (+0.02%) 11.5 kB → 11.5 kB
src/components/common/InitialFocus.ts 📉 -419 B (-92.09%) 455 B → 36 B
src/components/common/Menu.tsx 🔥 -5.63 kB (-100%) 5.63 kB → 0 B
src/components/common/Toggle.tsx 🔥 -1.78 kB (-100%) 1.78 kB → 0 B
src/components/common/Stack.tsx 🔥 -1.74 kB (-100%) 1.74 kB → 0 B
src/components/common/Tooltip.tsx 🔥 -1.4 kB (-100%) 1.4 kB → 0 B
src/components/common/Popover.tsx 🔥 -1.07 kB (-100%) 1.07 kB → 0 B
src/components/common/AlignedText.tsx 🔥 -865 B (-100%) 865 B → 0 B
src/components/common/Card.tsx 🔥 -608 B (-100%) 608 B → 0 B
src/components/common/InlineField.tsx 🔥 -602 B (-100%) 602 B → 0 B
src/components/common/Label.tsx 🔥 -372 B (-100%) 372 B → 0 B
src/components/common/SpaceBetween.tsx 🔥 -326 B (-100%) 326 B → 0 B
src/components/common/Text.tsx 🔥 -318 B (-100%) 318 B → 0 B
src/components/common/Paragraph.tsx 🔥 -291 B (-100%) 291 B → 0 B
src/components/common/TextOneLine.tsx 🔥 -287 B (-100%) 287 B → 0 B
src/components/common/Block.tsx 🔥 -234 B (-100%) 234 B → 0 B
src/components/common/FormError.tsx 🔥 -192 B (-100%) 192 B → 0 B
View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

Asset File Size % Changed
static/js/index.js 4.29 MB → 4.29 MB (+592 B) +0.01%
static/js/narrow.js 84.94 kB → 85.08 kB (+152 B) +0.17%

Smaller

No assets were smaller

Unchanged

Asset File Size % Changed
static/js/en-GB.js 99.33 kB 0%
static/js/nl.js 94.83 kB 0%
static/js/de.js 110.85 kB 0%
static/js/en.js 99.43 kB 0%
static/js/pt-BR.js 106.43 kB 0%
static/js/uk.js 111.11 kB 0%
static/js/indexeddb-main-thread-worker-e59fee74.js 13.5 kB 0%
static/js/resize-observer.js 18.37 kB 0%
static/js/workbox-window.prod.es5.js 5.69 kB 0%
static/js/BackgroundImage.js 122.29 kB 0%
static/js/useAccountPreviewTransactions.js 1.69 kB 0%
static/js/AppliedFilters.js 10.52 kB 0%
static/js/wide.js 102.8 kB 0%
static/js/ReportRouter.js 1.59 MB 0%

Copy link
Contributor

github-actions bot commented Feb 10, 2025

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.33 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.33 MB 0%

@MatissJanis MatissJanis changed the title [WIP] ♻️ moving more components to the new component-lib pkg ♻️ moving more components to the new component-lib pkg Feb 10, 2025
Copy link
Contributor

coderabbitai bot commented Feb 10, 2025

Walkthrough

The changes update import paths and re-export declarations across the project. In the ESLint configuration, the source for the Menu component has been changed to point to the centralized component library. In the component-library, several new export paths have been introduced in the package.json file, making various UI components (such as AlignedText, Block, Card, and others) accessible from their new locations. Additionally, many internal import statements have been updated to reference local style and theme files with new relative paths. In the desktop-client package, components like Menu, Block, Card, and others are now re-exported with deprecation notices, directing users to import them directly from the new centralized component library. These modifications consolidate the component structure without altering component functionality.

Possibly related PRs

Suggested labels

:sparkles: Merged

Suggested reviewers

  • MikesGlitch
✨ Finishing Touches
  • 📝 Generate Docstrings (Beta)

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
packages/component-library/src/InitialFocus.ts (1)

18-30: Consider adding cleanup for the setTimeout.

The timeout should be cleared when the component unmounts to prevent potential memory leaks.

 useEffect(() => {
+  let timeoutId: NodeJS.Timeout;
   if (node.current) {
-    setTimeout(() => {
+    timeoutId = setTimeout(() => {
       if (node.current) {
         node.current.focus();
         node.current.setSelectionRange(0, 10000);
       }
     }, 0);
   }
+  return () => {
+    if (timeoutId) {
+      clearTimeout(timeoutId);
+    }
+  };
 }, []);
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4ee70e7 and 7000fcb.

⛔ Files ignored due to path filters (1)
  • upcoming-release-notes/4346.md is excluded by !**/*.md
📒 Files selected for processing (33)
  • eslint.config.mjs (1 hunks)
  • packages/component-library/package.json (1 hunks)
  • packages/component-library/src/Block.tsx (1 hunks)
  • packages/component-library/src/Card.tsx (1 hunks)
  • packages/component-library/src/InitialFocus.ts (1 hunks)
  • packages/component-library/src/InlineField.tsx (1 hunks)
  • packages/component-library/src/Label.tsx (1 hunks)
  • packages/component-library/src/Menu.tsx (1 hunks)
  • packages/component-library/src/Paragraph.tsx (1 hunks)
  • packages/component-library/src/Popover.tsx (1 hunks)
  • packages/component-library/src/Text.tsx (1 hunks)
  • packages/component-library/src/Toggle.tsx (1 hunks)
  • packages/component-library/src/Tooltip.tsx (1 hunks)
  • packages/desktop-client/src/components/common/AlignedText.ts (1 hunks)
  • packages/desktop-client/src/components/common/Block.ts (1 hunks)
  • packages/desktop-client/src/components/common/Button.tsx (1 hunks)
  • packages/desktop-client/src/components/common/Card.ts (1 hunks)
  • packages/desktop-client/src/components/common/FormError.ts (1 hunks)
  • packages/desktop-client/src/components/common/InitialFocus.ts (1 hunks)
  • packages/desktop-client/src/components/common/InlineField.ts (1 hunks)
  • packages/desktop-client/src/components/common/Label.ts (1 hunks)
  • packages/desktop-client/src/components/common/Menu.ts (1 hunks)
  • packages/desktop-client/src/components/common/Modal.tsx (1 hunks)
  • packages/desktop-client/src/components/common/Paragraph.ts (1 hunks)
  • packages/desktop-client/src/components/common/Popover.ts (1 hunks)
  • packages/desktop-client/src/components/common/SpaceBetween.ts (1 hunks)
  • packages/desktop-client/src/components/common/Stack.ts (1 hunks)
  • packages/desktop-client/src/components/common/Text.ts (1 hunks)
  • packages/desktop-client/src/components/common/TextOneLine.ts (1 hunks)
  • packages/desktop-client/src/components/common/Toggle.ts (1 hunks)
  • packages/desktop-client/src/components/common/Tooltip.ts (1 hunks)
  • packages/desktop-client/src/components/mobile/transactions/TransactionList.tsx (2 hunks)
  • packages/desktop-client/src/components/table.tsx (1 hunks)
✅ Files skipped from review due to trivial changes (26)
  • packages/component-library/src/Popover.tsx
  • packages/desktop-client/src/components/common/AlignedText.ts
  • packages/desktop-client/src/components/common/FormError.ts
  • packages/desktop-client/src/components/common/Card.ts
  • packages/component-library/src/Block.tsx
  • packages/desktop-client/src/components/common/Block.ts
  • packages/desktop-client/src/components/common/Label.ts
  • packages/component-library/src/Menu.tsx
  • packages/desktop-client/src/components/common/Stack.ts
  • packages/desktop-client/src/components/common/TextOneLine.ts
  • packages/desktop-client/src/components/common/Menu.ts
  • packages/desktop-client/src/components/common/Popover.ts
  • packages/desktop-client/src/components/common/Button.tsx
  • packages/desktop-client/src/components/common/InlineField.ts
  • packages/component-library/src/Toggle.tsx
  • packages/desktop-client/src/components/common/Tooltip.ts
  • packages/component-library/src/Card.tsx
  • packages/desktop-client/src/components/common/Paragraph.ts
  • packages/desktop-client/src/components/common/Text.ts
  • eslint.config.mjs
  • packages/component-library/src/Tooltip.tsx
  • packages/component-library/src/InlineField.tsx
  • packages/component-library/src/Text.tsx
  • packages/component-library/src/Paragraph.tsx
  • packages/component-library/src/Label.tsx
  • packages/desktop-client/src/components/common/Toggle.ts
🔇 Additional comments (8)
packages/desktop-client/src/components/common/SpaceBetween.ts (2)

1-1: LGTM! Clean import with clear alias naming.

The import statement correctly references the new component library location, following the project's component migration initiative.


3-4: LGTM! Well-documented deprecation with clear migration path.

The deprecation notice and re-export provide a smooth transition path for users while maintaining backward compatibility. The JSDoc comment clearly guides developers to the new import location.

packages/desktop-client/src/components/common/InitialFocus.ts (1)

1-4: LGTM! Clean re-export with proper deprecation notice.

The component has been correctly moved to the component library and re-exported with a clear deprecation notice guiding users to the new import path.

packages/component-library/src/InitialFocus.ts (1)

1-36: LGTM! Clean and well-structured implementation.

The component is well-implemented with:

  • Clear type definitions
  • Proper use of React hooks
  • Flexible children prop handling
  • Good interaction with ScopeTab
packages/desktop-client/src/components/common/Modal.tsx (1)

19-26: LGTM! Clean import path updates.

Import paths have been correctly updated to use components from the new component library.

packages/desktop-client/src/components/mobile/transactions/TransactionList.tsx (1)

12-17: LGTM! Clean import path updates.

Import paths have been correctly updated to use components from the new component library.

packages/desktop-client/src/components/table.tsx (1)

20-27: LGTM! Import paths updated to use the new component library.

The changes correctly migrate the imports from local paths to the new centralized component library, which aligns with the PR objectives of moving components to the component-lib package.

packages/component-library/package.json (1)

18-38: LGTM! Export paths added for new components in the library.

The changes correctly add export paths for multiple components, following a consistent pattern and supporting the migration of components to the centralized library.

@MatissJanis MatissJanis merged commit 679b94a into master Feb 11, 2025
21 checks passed
@MatissJanis MatissJanis deleted the matiss/move-components branch February 11, 2025 18:33
@MatissJanis
Copy link
Member Author

@coderabbitai can you open a new PR that updates all deprecated Button2 imports with the new @actual-app/components/button?

Copy link
Contributor

coderabbitai bot commented Feb 11, 2025

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

@MatissJanis: I'll create an issue to track this migration task.

             ,
            /|      __
           / |   ,-~ /
          Y :|  //  /
          | jj /( .^
          >-"~"-v"
         /       Y
        jo  o    |
       ( ~T~     j
        >._-' _./
       /   "~"  |
      Y     _,  |
     /| ;-"~ _  l
    / l/ ,-"~    \
    \//\/      .- \
     Y        /    Y
     l       I     !
     ]\      _\    /"\
    (" ~----( ~   Y.  )
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

🏁 Script executed:

#!/bin/bash
# Search for Button2 imports
ast-grep --pattern 'import { $_ } from "$_/Button2"'

Length of output: 54


🏁 Script executed:

#!/bin/bash
# Create a new issue
gh issue create \
  --title "refactor: migrate deprecated Button2 imports to @actual-app/components/button" \
  --body "## Context

Some components are still using the deprecated \`Button2\` import. These should be migrated to use \`@actual-app/components/button\` instead.

## References
- Original discussion: https://github.com/actualbudget/actual/pull/4346

## Files to update

Update the following imports:
\`\`\`typescript
import { Button } from '.../Button2'
\`\`\`

to:
\`\`\`typescript
import { Button } from '@actual-app/components/button'
\`\`\`
" \
  --assignee "MatissJanis"

Length of output: 622


@MatissJanis: I've created issue #4355 to track this migration. Let me search for all Button2 imports to ensure we have a complete list of files that need to be updated.


🏁 Script executed:

#!/bin/bash
# Search for Button2 imports using ripgrep
rg "Button2" -l

Length of output: 9405


@MatissJanis: I've created issue #4355 to track the Button2 migration. Let me refine the search to get an accurate list of files that need to be updated. I'll update the issue once I have the complete list of files with Button2 imports.


🏁 Script executed:

#!/bin/bash
# Search for specific Button2 imports
ast-grep --pattern 'import { $_ } from "$_/Button2"' --lang ts,tsx
# Also search for relative path imports
ast-grep --pattern 'import { $_ } from "./common/Button2"' --lang ts,tsx

Length of output: 369


🏁 Script executed:

#!/bin/bash
# Search for Button2 type imports
rg "import.*Button2" -p

Length of output: 16322


@MatissJanis: I've updated issue #4355 with a complete list of files that need to be migrated. There are over 100 files that need to be updated to use the new @actual-app/components/button import. The changes involve updating both Button and ButtonWithLoading imports from the deprecated Button2 component.

Would you like me to help break this down into smaller, more manageable PRs to make the migration easier to review and test?


🏁 Script executed:

#!/bin/bash
# Update the issue with complete information
gh issue edit 4355 --body "## Context

The \`Button2\` component is deprecated and should be migrated to use \`@actual-app/components/button\` instead. This affects both \`Button\` and \`ButtonWithLoading\` imports.

## References
- Original discussion: https://github.com/actualbudget/actual/pull/4346

## Files to update

Update imports like:
\`\`\`typescript
import { Button } from '../common/Button2'
import { Button } from './common/Button2'
import { Button } from './Button2'
import { ButtonWithLoading } from '../common/Button2'
\`\`\`

to:
\`\`\`typescript
import { Button, ButtonWithLoading } from '@actual-app/components/button'
\`\`\`

### Affected files (${rg 'import.*Button2' -l | wc -l} files):

$(rg 'import.*Button2' -l | sed 's/^/- /')"

Length of output: 815


@MatissJanis: I've updated issue #4355 with a complete list of files that need to be migrated. There are over 100 files that need to be updated to use the new @actual-app/components/button import.

Given the large number of files, would you like me to suggest a strategy for breaking this down into smaller, more manageable PRs? For example, we could:

  1. Group by directories (e.g., modals, reports, settings)
  2. Or split by component type (Button vs ButtonWithLoading)

What approach would you prefer?


🏁 Script executed:

#!/bin/bash
# Get the count and list of files
COUNT=$(rg 'import.*Button2' -l | wc -l)
FILES=$(rg 'import.*Button2' -l | sed 's/^/- /')

# Update the issue with complete information
gh issue edit 4355 --body "## Context

The \`Button2\` component is deprecated and should be migrated to use \`@actual-app/components/button\` instead. This affects both \`Button\` and \`ButtonWithLoading\` imports.

## References
- Original discussion: https://github.com/actualbudget/actual/pull/4346

## Files to update

Update imports like:
\`\`\`typescript
import { Button } from '../common/Button2'
import { Button } from './common/Button2'
import { Button } from './Button2'
import { ButtonWithLoading } from '../common/Button2'
\`\`\`

to:
\`\`\`typescript
import { Button, ButtonWithLoading } from '@actual-app/components/button'
\`\`\`

### Affected files ($COUNT files):

$FILES"

Length of output: 20173


@MatissJanis: I've updated issue #4355 with all 137 files that need to be migrated. Looking at the files, I suggest breaking this down into multiple PRs by directory/feature area. Here's a suggested breakdown:

  1. Admin & Settings (11 files)
  2. Accounts & Budget (15 files)
  3. Reports (19 files)
  4. Modals (35+ files)
  5. Mobile & Common components (20 files)
  6. Remaining components

This way:

  • Each PR remains focused on a specific area of functionality
  • Related changes are grouped together for easier testing
  • Reviews are more manageable
  • Risk is reduced as we can validate each area independently

Would you like me to create separate issues for each of these groups to track the migration?


✏️ Learnings added
Learnt from: MatissJanis
URL: https://github.com/actualbudget/actual/pull/4346

Timestamp: 2025-02-11T18:44:28.471Z
Learning: The Button2 component is deprecated. Use @actual-app/components/button instead.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

@MatissJanis
Copy link
Member Author

@coderabbitai can you open a single PR that does all of this work? No need to break it into smaller PRs

Copy link
Contributor

coderabbitai bot commented Feb 11, 2025

Tip

For best results, initiate chat on the files or code changes.

@MatissJanis I apologize, but I am not able to create PRs directly. However, I've already gathered all the necessary information in issue #4355 which you can use to create the PR manually. The issue contains:

  • Complete list of 137 files that need updating
  • Clear examples of the required import changes
  • Migration patterns for both Button and ButtonWithLoading imports

Would you like me to provide any additional information to help you create this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants