Skip to content

Conversation

@vignesh05904
Copy link
Contributor

@vignesh05904 vignesh05904 commented Jul 29, 2025

Description

Please add PR description here, add screenshots if needed

Clickup

Please add link here

Summary by CodeRabbit

  • New Features

    • Upgraded UI components to use new PrimeNG Select and ToggleSwitch elements, replacing previous Dropdown and InputSwitch components across the application.
    • Enhanced multi-value input fields by replacing chip components with autocomplete fields for improved usability.
  • Bug Fixes

    • Updated styles and selectors to ensure consistent appearance and behavior with the new UI components.
  • Chores

    • Upgraded PrimeNG dependencies to the latest version and adjusted related configuration files.
    • Updated Storybook stories to reflect new component usage and imports.

@vignesh05904 vignesh05904 requested a review from ashwin1111 as a code owner July 29, 2025 09:02
@vignesh05904 vignesh05904 removed the request for review from ashwin1111 July 29, 2025 09:02
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 29, 2025

Walkthrough

This update migrates the application from PrimeNG's legacy Dropdown and InputSwitch components to the new Select and ToggleSwitch components across all templates, modules, and styles. It also updates PrimeNG dependencies to version 18, adjusts configuration and provider setup for the new theming API, and refactors all related CSS selectors and component references accordingly.

Changes

Cohort / File(s) Change Summary
PrimeNG Dependency & Theming
package.json, angular.json, src/app/app.module.ts, src/app/app.component.ts
Upgraded primeng to v18, added @primeng/themes, removed old CSS imports, updated theming to use new providePrimeNG API, and refactored ripple config.
PrimeNG Module Migration (Dropdown/InputSwitch → Select/ToggleSwitch)
src/app/integrations/bamboo-hr/bamboo-hr.module.ts, src/app/integrations/intacct/intacct.module.ts, src/app/integrations/qbo/qbo-onboarding/qbo-onboarding.module.ts, src/app/integrations/qbd/qbd-main/qbd-main.module.ts, src/app/integrations/qbd/qbd.module.ts, src/app/shared/shared.module.ts, src/stories/CloneSettingField.stories.ts, src/stories/ConfigurationToggleField.stories.ts, src/stories/Dropdown.stories.ts, src/stories/ExportLogFilter.stories.ts, src/stories/MappingFilter.stories.ts, src/stories/Paginator.stories.ts, src/stories/Toggle.stories.ts
Replaced all DropdownModule with SelectModule, and InputSwitchModule with ToggleSwitchModule in modules and Storybook stories.
Template Migration: Dropdown → Select
src/app/integrations/intacct/intacct-shared/intacct-advanced-settings/intacct-advanced-settings.component.html, src/app/integrations/intacct/intacct-shared/intacct-import-settings/intacct-import-settings.component.html, src/app/integrations/netsuite/netsuite-shared/netsuite-import-settings/netsuite-custom-segment-dialog/netsuite-custom-segment-dialog.component.html, src/app/shared/components/configuration/configuration-connector/configuration-connector.component.html, src/app/shared/components/configuration/configuration-import-field/configuration-import-field.component.html, src/app/shared/components/configuration/configuration-mapping-fields/configuration-mapping-fields.component.html, src/app/shared/components/configuration/configuration-schedule-export/configuration-schedule-export.component.html, src/app/shared/components/configuration/configuration-select-field/configuration-select-field.component.html, src/app/shared/components/configuration/configuration-skip-export/configuration-skip-export.component.html, src/app/shared/components/helper/mapping/generic-mapping-table/generic-mapping-table.component.html, src/app/shared/components/helper/mapping/mapping-filter/mapping-filter.component.html, src/app/shared/components/helper/paginator/paginator.component.html, src/app/shared/components/input/dropdown/dropdown.component.html, src/app/shared/components/menu/main-menu/main-menu.component.html, src/app/shared/components/onboarding/clone-setting/clone-setting-field/clone-setting-field.component.html, src/app/shared/components/si/core/intacct-location-entity/intacct-location-entity.component.html, src/app/shared/components/si/helper/dashboard-mapping-resolve/dashboard-mapping-resolve.component.html, src/app/shared/components/si/helper/skip-export/skip-export.component.html
Replaced all <p-dropdown> with <p-select> in templates, preserving bindings and templates.
Template Migration: Chips → AutoComplete
src/app/shared/components/configuration/configuration-skip-export/configuration-skip-export.component.html, src/app/shared/components/si/helper/skip-export/skip-export.component.html
Replaced <p-chips> with <p-autocomplete> for multi-value input fields, updating event bindings.
Component & Method Refactoring
src/app/app.component.ts, src/app/shared/components/configuration/configuration-skip-export/configuration-skip-export.component.ts, src/app/shared/components/si/helper/skip-export/skip-export.component.ts
Updated component logic for new PrimeNG APIs, added methods for manual chip management in autocomplete, and updated type imports for filter options.
CSS Selector Migration (Dropdown/InputSwitch → Select/ToggleSwitch)
src/styles.scss, src/app/integrations/intacct/intacct-shared/intacct-advanced-settings/intacct-advanced-settings.component.scss, src/app/integrations/intacct/intacct-shared/intacct-import-settings/intacct-import-settings.component.scss, src/app/integrations/netsuite/netsuite-shared/netsuite-import-settings/netsuite-custom-segment-dialog/netsuite-custom-segment-dialog.component.scss, src/app/integrations/qbd/qbd-main/qbd-dashboard/qbd-dashboard.component.scss, src/app/integrations/qbd/qbd-main/qbd-generic-mapping/qbd-generic-mapping.component.scss, src/app/shared/components/configuration/configuration-connector/configuration-connector.component.scss, src/app/shared/components/configuration/configuration-import-field/configuration-import-field.component.scss, src/app/shared/components/configuration/configuration-mapping-fields/configuration-mapping-fields.component.scss, src/app/shared/components/configuration/configuration-schedule-export/configuration-schedule-export.component.scss, src/app/shared/components/configuration/configuration-select-field/configuration-select-field.component.scss, src/app/shared/components/configuration/configuration-skip-export/configuration-skip-export.component.scss, src/app/shared/components/export-log/export-log-filter/export-log-filter.component.scss, src/app/shared/components/helper/mapping/generic-mapping-table/generic-mapping-table.component.scss, src/app/shared/components/helper/mapping/generic-mapping-v2/generic-mapping-v2.component.scss, src/app/shared/components/helper/mapping/mapping-filter/mapping-filter.component.scss, src/app/shared/components/helper/paginator/paginator.component.scss, src/app/shared/components/input/dropdown/dropdown.component.scss, src/app/shared/components/menu/main-menu/main-menu.component.scss, src/app/shared/components/si/helper/skip-export/skip-export.component.scss, src/app/integrations/xero/xero-onboarding/xero-clone-settings/xero-clone-settings.component.scss
Updated all CSS selectors and class names from .p-dropdown/.p-inputswitch to .p-select/.p-toggleswitch and related sub-elements.
Type & API Refactoring for Filter Options
src/app/integrations/bamboo-hr/configuration/configuration.component.ts, src/app/shared/components/configuration/email-multi-select-field/email-multi-select-field.component.ts, src/app/shared/components/helper/mapping/generic-mapping-table/generic-mapping-table.component.ts
Updated imports and type annotations from DropdownFilterOptions to SelectFilterOptions for filter option handling.
Miscellaneous Minor Updates
src/app/integrations/qbd-direct/qbd-direct-shared/qbd-direct-download-file/qbd-direct-download-file.component.ts, src/app/shared/components/input/dropdown/dropdown.component.ts, src/app/shared/components/menu/main-menu/main-menu.component.ts, src/app/shared/components/helper/mapping/generic-mapping-table/generic-mapping-table.component.ts, src/app/shared/components/si/helper/dashboard-mapping-resolve/dashboard-mapping-resolve.component.ts
Updated component selectors, imports, and DOM queries to align with new PrimeNG Select API and class names.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant AngularApp
    participant PrimeNG
    participant ThemeProvider

    User->>AngularApp: Interacts with Select/ToggleSwitch UI
    AngularApp->>PrimeNG: Uses Select/ToggleSwitch components
    AngularApp->>ThemeProvider: Applies new theme via providePrimeNG
    PrimeNG-->>AngularApp: Emits events (onChange, onBlur, etc.)
    AngularApp-->>User: Updates UI and forms accordingly
Loading
sequenceDiagram
    participant User
    participant AngularApp
    participant AutoComplete
    participant FormControl

    User->>AutoComplete: Types value or presses Enter/Comma
    AutoComplete->>AngularApp: Triggers onKeyDown/onBlur event
    AngularApp->>FormControl: Adds chip value to array
    AngularApp-->>AutoComplete: Clears input field
    AutoComplete-->>User: Displays updated chip list
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Poem

🐇

A hop, a leap, a PrimeNG sweep—
Old Dropdowns gone, new Selects we keep!
Switches now toggle, chips autocomplete,
Styles renamed, the migration’s complete.
With every click and every scroll,
This bunny’s code review takes its toll—
But oh, what a modernized, shiny new role!

✨🥕

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch upgrade_angular_primeng-to_18

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ 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.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @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.

@github-actions github-actions bot added the size/L Large PR label Jul 29, 2025
@github-actions
Copy link

PR description must contain a link to a ClickUp (case-insensitive)

@github-actions
Copy link

🔁 Code Duplication Report - Angular

Format Files analyzed Total lines Total tokens Clones found Duplicated lines Duplicated tokens
typescript 723 50619 462315 311 5130 (10.13%) +0.03% ❗ 48571 (10.51%) +0.04% ❗
scss 64 4181 21661 7 144 (3.44%) 738 (3.41%)
markup 295 12771 134682 158 1631 (12.77%) -0.05% 🚀 14493 (10.76%) -0.01% 🚀
python 4 727 5680 3 32 (4.40%) 368 (6.48%)
yaml 3 155 905 0 0 (0.00%) 0 (0.00%)
javascript 4 193 2175 0 0 (0.00%) 0 (0.00%)
markdown 2 96 366 0 0 (0.00%) 0 (0.00%)
bash 2 66 762 0 0 (0.00%) 0 (0.00%)
Total: 1097 68808 628546 479 6937 (10.08%) +0.02% ❗ 64170 (10.21%) +0.03% ❗

⚠️ This PR introduces 0.03% more duplicated code.

@github-actions
Copy link

PR description must contain a link to a ClickUp (case-insensitive)

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: 4

🔭 Outside diff range comments (1)
src/app/shared/components/menu/main-menu/main-menu.component.ts (1)

1-1: Incorrect import – use ViewChild, not viewChild

Angular exports the decorator as ViewChild (capital V). Importing the lower-case variant compiles but yields undefined, breaking DI.

Apply:

-import { Component, EventEmitter, Input, OnInit, Output, viewChild } from '@angular/core';
+import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core';
🧹 Nitpick comments (2)
src/app/shared/components/input/dropdown/dropdown.component.ts (1)

5-5: Component naming drift ‑ consider renaming for clarity

The selector has moved from app-dropdown to app-select, but
• the file path is still .../dropdown/
• the class remains DropdownComponent
This mismatch will confuse future readers and make usages hard to grep.

Suggestion:

- export class DropdownComponent {
+ export class SelectComponent {

and move the file to select/select.component.{ts,html,scss} (Angular schematic rename keeps NgModule metadata in sync).
No runtime impact, purely maintainability.

src/app/shared/components/export-log/export-log-filter/export-log-filter.component.scss (1)

13-15: Double-space in selector may break rule resolution

There are two consecutive spaces between .selectedItem and .p-select-trigger (.selectedItem .p-select-trigger). Most browsers treat it the same as a single space, but it is easy to miss in maintenance and may hint at a copy-paste error. Tighten it to a single space for consistency.

-:host ::ng-deep .selectedItem  .p-select-trigger {
+:host ::ng-deep .selectedItem .p-select-trigger {

Comment on lines +45 to +54
provideAnimationsAsync(),
providePrimeNG({
theme: {
preset: Lara,
options: {
darkModeSelector: false,
cssLayer: false,
},
},
}),
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix trailing comma formatting issues.

The PrimeNG configuration is correct, but there are ESLint comma-dangle violations that need to be fixed.

Apply this diff to fix the trailing comma issues:

     providePrimeNG({
         theme: {
             preset: Lara,
             options: {
-                darkModeSelector: false,
-                cssLayer: false,
+                darkModeSelector: false,
+                cssLayer: false
             },
-        },
+        }
     }),

Committable suggestion skipped: line range outside the PR's diff.

🧰 Tools
🪛 GitHub Check: lint

[failure] 53-53:
Unexpected trailing comma


[failure] 52-52:
Unexpected trailing comma


[failure] 51-51:
Unexpected trailing comma

🪛 GitHub Actions: TypeScript Lint Check

[error] 51-51: ESLint: Unexpected trailing comma (comma-dangle)

🤖 Prompt for AI Agents
In src/app/app.module.ts between lines 45 and 54, the PrimeNG configuration
object has trailing comma formatting issues causing ESLint comma-dangle
violations. Remove the trailing commas after the last properties in the nested
objects, specifically after the options object and the theme object, to comply
with ESLint rules.

import { ToastModule } from 'primeng/toast';
import { InputTextModule } from 'primeng/inputtext';
import { DropdownModule } from 'primeng/dropdown';
import { ToggleSwitchModule } from 'primeng/toggleswitch';
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Verify module import consolidation.

The import shows only ToggleSwitchModule being added, but the AI summary mentions that multiple modules (InputSwitchModule, RadioButtonModule, ToastModule, InputTextModule, and DropdownModule) were replaced. Please confirm that all necessary UI components are still available to the Intacct shared components.


🏁 Script executed:

#!/bin/bash
# Description: Check which PrimeNG components are used in Intacct shared components
# Expected: Verify that all required UI components have appropriate modules imported

echo "Checking PrimeNG component usage in Intacct shared components..."

# Find all component files in the intacct-shared directory
fd -e html -e ts . src/app/integrations/intacct/intacct-shared/

echo -e "\n=== Checking for PrimeNG component usage ==="

# Check for various PrimeNG components in templates
echo "RadioButton usage:"
rg "p-radioButton|RadioButton" src/app/integrations/intacct/intacct-shared/ -A 2

echo -e "\nToast usage:"
rg "p-toast|MessageService" src/app/integrations/intacct/intacct-shared/ -A 2

echo -e "\nInputText usage:"
rg "p-inputText|pInputText" src/app/integrations/intacct/intacct-shared/ -A 2

echo -e "\nToggleSwitch/InputSwitch usage:"
rg "p-toggleSwitch|p-inputSwitch" src/app/integrations/intacct/intacct-shared/ -A 2

echo -e "\nSelect/Dropdown usage:"
rg "p-select|p-dropdown" src/app/integrations/intacct/intacct-shared/ -A 2

Length of output: 24453


🏁 Script executed:

#!/bin/bash
# Display the imports and NgModule metadata of intacct-shared.module.ts for review
sed -n '1,200p' src/app/integrations/intacct/intacct-shared/intacct-shared.module.ts

Length of output: 1535


Import required PrimeNG modules in IntacctSharedModule

The Intacct shared components use pInputText, p-inputSwitch and p-select but the module only imports MultiSelectModule, TooltipModule, DialogModule and ToggleSwitchModule. Add the following to src/app/integrations/intacct/intacct-shared/intacct-shared.module.ts:

• Imports at top of file:

+ import { InputTextModule } from 'primeng/inputtext';
+ import { InputSwitchModule } from 'primeng/inputswitch';
+ import { DropdownModule }   from 'primeng/dropdown';

• NgModule imports array:

 imports: [
   CommonModule,
   SharedModule,
   FormsModule,
   ReactiveFormsModule,
   MultiSelectModule,
   TooltipModule,
   DialogModule,
-    ToggleSwitchModule
+    InputTextModule,
+    InputSwitchModule,
+    DropdownModule,
+    ToggleSwitchModule
 ],

No RadioButtonModule or ToastModule is needed (no p-radioButton or p-toast usage).

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
import { ToggleSwitchModule } from 'primeng/toggleswitch';
// src/app/integrations/intacct/intacct-shared/intacct-shared.module.ts
// … other imports …
import { ToggleSwitchModule } from 'primeng/toggleswitch';
+ import { InputTextModule } from 'primeng/inputtext';
+ import { InputSwitchModule } from 'primeng/inputswitch';
+ import { DropdownModule } from 'primeng/dropdown';
@NgModule({
imports: [
CommonModule,
SharedModule,
FormsModule,
ReactiveFormsModule,
MultiSelectModule,
TooltipModule,
DialogModule,
+ InputTextModule,
+ InputSwitchModule,
+ DropdownModule,
ToggleSwitchModule
],
// … declarations, exports, etc. …
})
export class IntacctSharedModule {}
🤖 Prompt for AI Agents
In src/app/integrations/intacct/intacct-shared/intacct-shared.module.ts at line
11, the module imports are missing PrimeNG modules required for pInputText,
p-inputSwitch, and p-select components. Add the imports for InputTextModule,
InputSwitchModule, and DropdownModule at the top of the file and include these
modules in the NgModule imports array to ensure the components function
correctly.

imports: [SharedModule, CardModule, CommonModule, ProgressSpinnerModule, TranslocoModule],
imports: [SharedModule, CardModule, CommonModule, ProgressSpinnerModule, TranslocoModule, ButtonModule],
templateUrl: './qbd-direct-download-file.component.html',
styleUrl: './qbd-direct-download-file.component.scss'
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Wrong decorator property – use styleUrls, not styleUrl

Angular’s @Component decorator expects styleUrls: string[]; using styleUrl will cause a compile-time error.

-  styleUrl: './qbd-direct-download-file.component.scss'
+  styleUrls: ['./qbd-direct-download-file.component.scss']

Please update to prevent the template compiler from failing.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
styleUrl: './qbd-direct-download-file.component.scss'
@Component({
selector: 'app-qbd-direct-download-file',
templateUrl: './qbd-direct-download-file.component.html',
- styleUrl: './qbd-direct-download-file.component.scss'
+ styleUrls: ['./qbd-direct-download-file.component.scss']
})
🤖 Prompt for AI Agents
In
src/app/integrations/qbd-direct/qbd-direct-shared/qbd-direct-download-file/qbd-direct-download-file.component.ts
at line 16, the Angular component decorator uses the incorrect property name
'styleUrl'. Change this to 'styleUrls' and ensure the value is an array of
strings, even if it contains only one stylesheet path, to comply with Angular's
expected syntax and avoid compile-time errors.

Comment on lines +45 to 48
private pDropdown = viewChild(Select);

isMenuDisabled: boolean = false;

Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

@ViewChild usage is invalid – will throw at runtime

viewChild(Select) is not a decorator; the correct pattern is:

- private pDropdown = viewChild(Select);
+ @ViewChild(Select) pDropdown!: Select;

Without this fix this.pDropdown()?.clear() will always be undefined, so the dropdown never resets.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
private pDropdown = viewChild(Select);
isMenuDisabled: boolean = false;
@ViewChild(Select) pDropdown!: Select;
isMenuDisabled: boolean = false;
🤖 Prompt for AI Agents
In src/app/shared/components/menu/main-menu/main-menu.component.ts around lines
45 to 48, the usage of viewChild(Select) is incorrect because viewChild is not a
decorator. Replace it with the proper Angular @ViewChild decorator syntax by
importing and using @ViewChild(Select) with the correct property declaration.
This will ensure that this.pDropdown is properly initialized and
this.pDropdown()?.clear() works as expected to reset the dropdown.

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

Labels

size/L Large PR

Development

Successfully merging this pull request may close these issues.

1 participant