Skip to content

Use nextjs view transition#457

Merged
silte merged 2 commits intomainfrom
feature/view-transition
Apr 5, 2025
Merged

Use nextjs view transition#457
silte merged 2 commits intomainfrom
feature/view-transition

Conversation

@silte
Copy link
Collaborator

@silte silte commented Mar 15, 2025

Describe your changes

Issue ticket number and link

Checklist before requesting a review

  • I have performed a self-review of my code
  • If it is a core feature, I have added thorough tests.
  • Do we need to implement analytics?
  • Will this be part of a product update? If yes, please write one phrase about this update.

This pull request includes several changes to the backend and frontend codebases, focusing on updating service imports and modifying methods related to account and category management. The most important changes are listed below:

Backend Changes:

Frontend Changes:

@silte silte requested a review from Copilot March 15, 2025 17:45
@silte silte self-assigned this Mar 15, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request refactors multiple service imports across the backend and frontend codebases to use new native API functions for data retrieval and management while updating a backend method to exclude the current balance from user export.

  • Updated the backend createMany method in the accounts service to remove the current balance field
  • Replaced legacy service calls with native API functions (e.g., getAccountById, getIncomeById, getExpenseById, etc.) across various frontend routes and containers
  • Modified several service import paths to use the new api-service module instead of legacy ssr/api files

Reviewed Changes

Copilot reviewed 102 out of 102 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/backend/src/modules/accounts/accounts.service.ts Updated createMany method to remove current balance in user export
packages/frontend/app/(application)/transactions/incomes/[incomeId]/page.tsx Replaced IncomeService with getIncomeById
packages/frontend/app/(application)/transactions/expenses/[expenseId]/page.tsx Replaced ExpenseService with getExpenseById
packages/frontend/app/(application)/transactions/incomes/[incomeId]/edit/page.tsx Replaced IncomeService with getIncomeById
packages/frontend/app/(application)/transactions/expenses/[expenseId]/edit/page.tsx Replaced ExpenseService with getExpenseById
packages/frontend/app/(application)/categories/[categoryId]/edit/page.tsx Replaced CategoryService with getCategoryById
packages/frontend/app/(application)/accounts/[accountId]/page.tsx Replaced AccountService with getAccountById
packages/frontend/app/(application)/accounts/[accountId]/edit/page.tsx Replaced AccountService with getAccountById
packages/frontend/app/(application)/categories/[categoryId]/page.tsx Replaced CategoryService with getCategoryNameById
packages/frontend/app/(application)/transactions/transfers/[transferId]/edit/page.tsx Replaced TransferService with getTransferById
packages/frontend/app/(application)/transactions/transfers/[transferId]/page.tsx Replaced TransferService with getTransferById
packages/frontend/containers/accounts/AccountEditContainer.tsx Replaced AccountService with getAccountById
packages/frontend/app/(application)/templates/[templateId]/edit/page.tsx Replaced TransactionTemplateService with getTransactionTemplateById
packages/frontend/app/privacy-policy/page.tsx Replaced AuthenticationService with getAuthenticationStatus
packages/frontend/containers/DashboardContainer.tsx Replaced AccountService.getAll with getAllAccounts
packages/frontend/app/api/revalidate-cache/route.ts Updated revalidateFullAppCache import path
packages/frontend/app/issues-with-login/page.tsx Replaced AuthenticationService with getAuthenticationStatus
packages/frontend/app/layout.tsx Updated AuthenticationService and UserService calls with native API functions
packages/frontend/containers/accounts/AccountContainer.tsx Replaced multiple AccountService and UserPreferenceService calls with new API functions
packages/frontend/containers/accounts/AccountListingContainer.tsx Replaced AccountService.getAll with getAllAccounts
Comments suppressed due to low confidence (1)

packages/backend/src/modules/accounts/accounts.service.ts:50

  • Setting 'currentDateBalance' to undefined may not remove the property from the exported user data. Consider omitting the property entirely or filtering it out before export to avoid potential serialization issues.
currentDateBalance: undefined,

@silte silte force-pushed the feature/view-transition branch 3 times, most recently from 5766b9f to 3b7f7fe Compare April 5, 2025 07:46
@silte silte force-pushed the feature/view-transition branch from 3b7f7fe to 57ccad7 Compare April 5, 2025 13:42
@silte silte requested a review from Copilot April 5, 2025 13:43
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 24 out of 28 changed files in this pull request and generated no comments.

Files not reviewed (4)
  • .vscode/settings.json: Language not supported
  • package.json: Language not supported
  • packages/frontend/package.json: Language not supported
  • packages/frontend/src/assets/tailwind.css: Language not supported
Comments suppressed due to low confidence (2)

packages/frontend/src/components/elements/Link.tsx:88

  • Please add test coverage to verify that native view transitions operate as expected after removing the custom transition handling.
  // TODO we should test if VT works as with native link

packages/frontend/app/(application)/transactions/[id]/page.tsx:43

  • [nitpick] The function generateTransactionViewTransitionName returns an object and its 'description' property is used as the title view transition name. Consider renaming the property or the function's return field to 'titleVtName' for consistency and clarity.
titleVtName={generateTransactionViewTransitionName(transaction.id).description}

@silte silte force-pushed the feature/view-transition branch from 57ccad7 to 6a9b633 Compare April 5, 2025 13:47
@silte silte changed the title Use nextjs native view transition Use nextjs view transition Apr 5, 2025
@sonarqubecloud
Copy link

sonarqubecloud bot commented Apr 5, 2025

@sonarqubecloud
Copy link

sonarqubecloud bot commented Apr 5, 2025

@sonarqubecloud
Copy link

sonarqubecloud bot commented Apr 5, 2025

Quality Gate Failed Quality Gate failed for 'Frontend'

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@sonarqubecloud
Copy link

sonarqubecloud bot commented Apr 5, 2025

@silte silte merged commit 147ca3a into main Apr 5, 2025
32 of 33 checks passed
@silte silte deleted the feature/view-transition branch April 5, 2025 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants