Skip to content

Refactor drawer to use dialog#469

Merged
silte merged 4 commits intomainfrom
feature/refactor-dialog
Jun 14, 2025
Merged

Refactor drawer to use dialog#469
silte merged 4 commits intomainfrom
feature/refactor-dialog

Conversation

@silte
Copy link
Collaborator

@silte silte commented Jun 12, 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 introduces several changes across the codebase, primarily focusing on upgrading dependencies, replacing Popover functionality with Drawer components, and improving button behavior with new attributes. The most significant updates include migrating from Node.js v22 to v24, replacing Popover-related identifiers with Drawer identifiers, and refactoring the Drawer component to enhance its usability and animation behavior.

Dependency Updates:

Migration from Popover to Drawer:

Refactoring of Drawer Component:

Button Behavior Enhancements:

Integration of invokers-polyfill:

@silte silte requested a review from Copilot June 12, 2025 19:46
@silte silte self-assigned this Jun 12, 2025

This comment was marked as outdated.

@silte silte force-pushed the feature/refactor-dialog branch from 673720c to 73322b5 Compare June 12, 2025 19:52
@silte silte requested a review from Copilot June 12, 2025 19:52

This comment was marked as outdated.

@silte silte force-pushed the feature/refactor-dialog branch from 73322b5 to ebf9c70 Compare June 12, 2025 19:57
@silte silte requested a review from Copilot June 12, 2025 19:57
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 components that previously used popover identifiers to now use drawer/dialog functionality, and upgrades the underlying Node.js environment and dependencies. Key changes include updating component props from popover to drawer, refactoring the Drawer component to use a dialog element with new animation logic, and enhancing button interactions with new command attributes.

Reviewed Changes

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

Show a summary per file
File Description
packages/frontend/src/features/transaction/TransactionTemplateSwitcher.tsx Replaced popover refs and actions with drawer refs and command attributes.
packages/frontend/src/features/transaction/TransactionDeleteDrawer.tsx Updated button actions to use drawer commands.
packages/frontend/src/features/template/TemplateDelete.tsx Renamed popover identifiers to drawer identifiers.
packages/frontend/src/features/category/CategoryDeleteDrawer.tsx Updated cancel button to use drawer command attributes.
packages/frontend/src/features/account/AccountUpdateMarketValueDrawer.tsx Changed prop names from popperId to drawerId and updated ref usage.
packages/frontend/src/features/account/AccountDeleteDrawer.tsx Updated button actions from popover to drawer commands.
packages/frontend/src/components/elements/PopperItem.tsx Updated component prop from popperId to drawerId and adjusted button command usage.
packages/frontend/src/components/elements/Button/Button.tsx Integrated new command and commandFor attributes for button behavior.
packages/frontend/src/components/blocks/Drawer.tsx Refactored to use a dialog element with updated animation/styling and removed forwardRef.
packages/frontend/src/assets/tailwind.css Updated CSS selectors and removed problematic styles related to popovers.
packages/frontend/package.json Added invokers-polyfill dependency.
packages/frontend/app/layout.tsx Integrated invokers-polyfill logic for HTML dialog support.
packages/frontend/app/(application)/transactions/[id]/page.tsx Updated PopperItem usage to use drawerId instead of popperId.
packages/frontend/app/(application)/categories/[categoryId]/page.tsx Updated PopperItem usage to use drawerId instead of popperId.
packages/frontend/app/(application)/accounts/[accountId]/page.tsx Updated multiple occurrences of popover/drawer identifiers.
Dockerfile Upgraded the base image from node:22-alpine to node:24-alpine.
.nvmrc Updated Node.js version from v22 to v24.
Comments suppressed due to low confidence (2)

packages/frontend/src/components/blocks/Drawer.tsx:16

  • The Drawer component was refactored from using forwardRef to an FC while still accepting a ref prop. This may prevent proper ref forwarding to the underlying dialog element; consider reverting to forwardRef or implementing ref forwarding to ensure parent components can correctly access the dialog DOM node.
ref?: React.RefObject<HTMLDialogElement | null>;

packages/frontend/src/components/elements/Button/Button.tsx:136

  • [nitpick] The custom attribute 'commandFor' is being rendered as 'commandfor' in the DOM. To maintain consistency and clarity, confirm that this lower-case convention is intentional or adjust the implementation to ensure attribute naming reflects the intended usage.
commandfor={commandFor}

@silte silte force-pushed the feature/refactor-dialog branch 5 times, most recently from e824e58 to b93f869 Compare June 12, 2025 21:09
@silte silte force-pushed the feature/refactor-dialog branch from b93f869 to f83c40e Compare June 12, 2025 21:28
@sonarqubecloud
Copy link

@sonarqubecloud
Copy link

@sonarqubecloud
Copy link

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

@silte silte merged commit 01fe683 into main Jun 14, 2025
32 of 33 checks passed
@silte silte deleted the feature/refactor-dialog branch June 14, 2025 20:18
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.

1 participant