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

fix: QA fixes after design team testing #1092

Merged
merged 2 commits into from
Dec 3, 2024
Merged

Conversation

DhaaraniCIT
Copy link
Contributor

@DhaaraniCIT DhaaraniCIT commented Dec 3, 2024

Description

fix: QA fixes after design team testing

Clickup

https://app.clickup.com/t/86cx6efcg

Summary by CodeRabbit

Release Notes

  • New Features

    • Enhanced styling for various components with new classes to improve visual presentation.
    • Added interactivity with new event bindings in onboarding components.
    • Updated onboarding guidance text and added redirect functionality.
  • Bug Fixes

    • Improved layout and responsiveness of components to ensure better user experience.
  • Documentation

    • Updated styles to enhance theming capabilities and visual consistency across the application.

Copy link
Contributor

coderabbitai bot commented Dec 3, 2024

Walkthrough

The pull request introduces modifications primarily to the HTML templates of various components within the QBD integration. Key changes include the addition of the tw-bg-no-repeat class to several <div> elements based on the isGradientAllowed property, affecting the background styling. Additionally, new event bindings and input properties are introduced in specific components to enhance interactivity. The overall structure and functionality of the components remain largely unchanged, ensuring that existing logic and data flows are preserved.

Changes

File Change Summary
src/app/integrations/qbd-direct/qbd-direct-main/qbd-direct-configuration/qbd-direct-configuration.component.html Added tw-bg-no-repeat class to first <div> based on isGradientAllowed.
src/app/integrations/qbd-direct/qbd-direct-main/qbd-direct-dashboard/qbd-direct-dashboard.component.html Added tw-bg-no-repeat class to first <div> based on isGradientAllowed.
src/app/integrations/qbd-direct/qbd-direct-main/qbd-direct-export-log/qbd-direct-export-log.component.html Added tw-bg-no-repeat class to first <div> based on isGradientAllowed.
src/app/integrations/qbd-direct/qbd-direct-main/qbd-direct-mapping/qbd-direct-mapping.component.html Added tw-bg-no-repeat class to first <div> based on isGradientAllowed.
src/app/integrations/qbd-direct/qbd-direct-onboarding/qbd-direct-onboarding-connector/qbd-direct-onboarding-connector.component.html Added (manualDownload) output event binding to <app-qbd-direct-setup-connection>.
src/app/integrations/qbd-direct/qbd-direct-onboarding/qbd-direct-onboarding-landing/qbd-direct-onboarding-landing.component.html Updated headerText and added [redirectLink] input property to app-landing-page-body.
src/app/integrations/qbd-direct/qbd-direct-onboarding/qbd-direct-onboarding-pre-requisite/qbd-direct-onboarding-pre-requisite.component.html Changed interpolation to [innerHTML] for caption rendering in *ngFor loop.
src/app/integrations/qbd-direct/qbd-direct-onboarding/qbd-direct-onboarding-pre-requisite/qbd-direct-onboarding-pre-requisite.component.ts Updated caption property with HTML anchor tag for QuickBooks documentation link.
src/app/integrations/qbd-direct/qbd-direct-shared/qbd-direct-data-sync/qbd-direct-data-sync.component.html Updated class bindings and conditional rendering logic for visual presentation.
src/app/integrations/qbd-direct/qbd-direct-shared/qbd-direct-download-file/qbd-direct-download-file.component.html Modified class names for styling and adjusted iframe layout for responsive design.
src/app/integrations/qbd-direct/qbd-direct-shared/qbd-direct-download-file/qbd-direct-download-file.component.ts Removed QbdDirectSharedComponent from imports.
src/app/integrations/qbd-direct/qbd-direct-shared/qbd-direct-setup-connection/qbd-direct-setup-connection.component.html Updated class names and added anchor tag for onManualDownload() method.
src/app/integrations/qbd-direct/qbd-direct-shared/qbd-direct-setup-connection/qbd-direct-setup-connection.component.ts Added manualDownload output event and onManualDownload() method.
src/app/shared/components/configuration/configuration-confirmation-dialog/configuration-confirmation-dialog.component.html Adjusted conditional rendering and class logic for improved layout and readability.
src/app/shared/components/helper/app-landing-page-body/app-landing-page-body.component.html Updated class attributes for certain elements.
src/app/shared/components/helper/app-landing-page-header/app-landing-page-header.component.html Added tw-bg-no-repeat class to first <div> based on isGradientAllowed.
src/app/shared/components/helper/onboarding-done/onboarding-done.component.html Added tw-bg-no-repeat class to first <div> based on isGradientAllowed.
src/app/shared/components/helper/onboarding-stepper/onboarding-stepper.component.html Added tw-bg-no-repeat class to first <div> based on isGradientAllowed.
src/styles.scss Added new styles and updated existing ones for improved theming and visual consistency.

Possibly related PRs

Suggested labels

size/M

Suggested reviewers

  • ashwin1111

🐰 In the meadow, where changes bloom,
The tw-bg-no-repeat clears the room.
With buttons and links, all set to play,
Enhancements abound in a bright array.
So hop along, let the coding flow,
With each little change, our project will grow! 🌼✨


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 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/M Medium PR label Dec 3, 2024
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: 1

🧹 Outside diff range and nitpick comments (11)
src/app/shared/components/configuration/configuration-confirmation-dialog/configuration-confirmation-dialog.component.html (2)

14-14: Consider simplifying the close icon class logic

The current ngClass implementation combines multiple conditions in the template. Consider moving this logic to the component class for better maintainability.

Example refactor:

- <i [ngClass]="{'pi pi-times fyle' : brandingConfig.brandId === 'fyle' && appName!==AppName.QBD_DIRECT, 'pi pi-times fyle qbd' : brandingConfig.brandId === 'fyle' && appName===AppName.QBD_DIRECT, 'pi pi-times co' : brandingConfig.brandId !== 'fyle'}" class="tw-cursor-pointer" style="font-size: 12px" (click)="acceptWarning(false)"></i>
+ <i [ngClass]="getCloseIconClasses()" class="tw-cursor-pointer" style="font-size: 12px" (click)="acceptWarning(false)"></i>

Add to component class:

getCloseIconClasses(): string {
  const baseClasses = 'pi pi-times';
  if (this.brandingConfig.brandId !== 'fyle') {
    return `${baseClasses} co`;
  }
  return `${baseClasses} fyle${this.appName === this.AppName.QBD_DIRECT ? ' qbd' : ''}`;
}

30-32: Consider adding a tooltip for truncated URLs

While truncating long URLs helps maintain the layout, it might hide important information from users. Consider adding a tooltip to show the full URL on hover.

- <p class="tw-text-size-10 tw-text-text-disable tw-font-400 tw-max-w-[400px] tw-truncate">
+ <p class="tw-text-size-10 tw-text-text-disable tw-font-400 tw-max-w-[400px] tw-truncate" [pTooltip]="brandingKbArticles.onboardingArticles.QBD_DIRECT.HELPER_ARTICLE">
src/app/integrations/qbd-direct/qbd-direct-onboarding/qbd-direct-onboarding-landing/qbd-direct-onboarding-landing.component.html (1)

6-6: LGTM! Consider extracting the header text to a constant.

The text change from "QuickBooks Online" to "Fyle-QuickBooks Desktop" improves clarity. However, consider moving this string to a constant in the component or a shared configuration file to maintain consistency and ease future updates.

src/app/integrations/qbd-direct/qbd-direct-shared/qbd-direct-download-file/qbd-direct-download-file.component.ts (1)

Line range hint 17-31: Consider improving type safety for EventEmitter outputs.

The event emitters could benefit from explicit type parameters to improve type safety.

- @Output() nextStep = new EventEmitter();
+ @Output() nextStep = new EventEmitter<void>();

- @Output() retryClick = new EventEmitter();
+ @Output() retryClick = new EventEmitter<void>();

- @Output() manualDownload = new EventEmitter();
+ @Output() manualDownload = new EventEmitter<void>();
src/app/integrations/qbd-direct/qbd-direct-shared/qbd-direct-setup-connection/qbd-direct-setup-connection.component.ts (1)

35-36: LGTM! Consider adding type safety to the EventEmitter

The addition of the manual download event emitter follows Angular best practices.

Consider adding void type to the EventEmitter for better type safety:

-@Output() manualDownload = new EventEmitter();
+@Output() manualDownload = new EventEmitter<void>();
src/styles.scss (1)

194-194: Consider extracting dialog styles into a themed component.

The dialog content styles are using Tailwind utilities with !important. This approach might make it difficult to maintain consistent dialog styling across the application.

Consider:

  1. Creating a themed dialog component with consistent styles
  2. Using CSS custom properties for configurable values
-.p-dialog .p-dialog-content {
-    @apply tw-p-0 tw-rounded-border-radius-2xs #{!important};
-}
+:root {
+    --dialog-padding: 0;
+    --dialog-border-radius: var(--border-radius-2xs);
+}
+
+.p-dialog .p-dialog-content {
+    padding: var(--dialog-padding);
+    border-radius: var(--dialog-border-radius);
+}
src/app/integrations/qbd-direct/qbd-direct-shared/qbd-direct-data-sync/qbd-direct-data-sync.component.html (5)

1-1: Consider adding ARIA attributes for better accessibility

While the styling changes look good, consider enhancing accessibility by adding appropriate ARIA attributes to the step indicator and header.

-<div class="tw-border tw-rounded-border-radius-2xs tw-border-border-tertiary" [ngClass]="{'tw-opacity-50': !showSection}">
+<div class="tw-border tw-rounded-border-radius-2xs tw-border-border-tertiary" [ngClass]="{'tw-opacity-50': !showSection}" role="region" aria-label="Data Sync Configuration">
     <div class="tw-p-24-px">
         <div class="tw-flex tw-items-center tw-justify-between">
             <div class="tw-flex tw-items-center tw-justify-start">
-                <div class="tw-w-20-px tw-h-20-px tw-rounded-border-radius-2xs tw-bg-bg-secondary tw-text-white tw-text-14-px tw-font-500 tw-text-center tw-mr-12-px">
+                <div class="tw-w-20-px tw-h-20-px tw-rounded-border-radius-2xs tw-bg-bg-secondary tw-text-white tw-text-14-px tw-font-500 tw-text-center tw-mr-12-px" role="heading" aria-level="2">
                     3
                 </div>

Also applies to: 5-10


Line range hint 13-29: Add trackBy function to optimize ngFor performance

The ngFor directive would benefit from a trackBy function to improve rendering performance when the qbdFields array changes.

-<div *ngFor="let field of qbdFields; let i = index"
+<div *ngFor="let field of qbdFields; let i = index; trackBy: trackByField"

Add to your component:

trackByField(index: number, field: any): string {
  return field.attribute_type;
}

Line range hint 30-32: Consider clarifying the auto-refresh message

The current message about automatic refresh in 5 minutes might benefit from being more specific about when this countdown starts.

-[infoText]="'The values displayed here are synced from QuickBooks Desktop to Fyle. If you notice discrepancies in the synced values, you can continue onboarding; the sync will refresh automatically in 5 minutes to capture any missed values.'"
+[infoText]="'The values displayed here are synced from QuickBooks Desktop to Fyle. If you notice discrepancies in the synced values, you can continue onboarding; the sync will automatically refresh within 5 minutes from now to capture any missed values.'"

Line range hint 33-36: Improve loading state UX

The loading state could be enhanced to:

  1. Use min-height instead of fixed height to prevent layout shifts
  2. Provide more descriptive loading text
-<div *ngIf="isLoading && showSection" class="tw-flex tw-flex-col tw-justify-center tw-items-center tw-h-[400px]">
+<div *ngIf="isLoading && showSection" class="tw-flex tw-flex-col tw-justify-center tw-items-center tw-min-h-[400px]">
     <app-loader styleClass="spinner-30 tw-top-2-px"></app-loader>
-    <span class="tw-text-14-px tw-font-400 tw-text-text-primary">Loading</span>
+    <span class="tw-text-14-px tw-font-400 tw-text-text-primary">Syncing QuickBooks Desktop data...</span>

Property naming is inconsistent with its usage

The verification confirms that isCTAEnabled is used incorrectly in the template. In the QbdDirectDataSyncComponent:

  • The property is named isCTAEnabled suggesting it enables the button
  • But in the template, it's bound to [isButtonDisabled]="isCTAEnabled" which does the opposite

This creates confusion as:

  • In QbdDirectSetupConnectionComponent, it's used correctly as [isButtonDisabled]="!isCTAEnabled"
  • But in QbdDirectDataSyncComponent, it's used incorrectly as [isButtonDisabled]="isCTAEnabled"

To fix this:

  • Either rename the property to isCTADisabled to match its usage
  • Or fix the template binding to [isButtonDisabled]="!isCTAEnabled" to maintain consistency
🔗 Analysis chain

Line range hint 37-39: Verify the isCTAEnabled property usage

The property name isCTAEnabled seems counterintuitive when used with isButtonDisabled. Consider renaming for clarity.


Let me gather more information about the component class to understand the complete context.


Let me search for the data sync component implementation to complete the analysis.


Let me try a different approach to find the data sync component implementation.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for the isCTAEnabled property definition and usage
ast-grep --pattern 'class $_ {
  $$$
  isCTAEnabled
  $$$
}'

# Search for related template usage
rg "isCTAEnabled" --type html

Length of output: 1110


Script:

#!/bin/bash
# Search for the component class implementation
ast-grep --pattern 'class QbdDirectDataSyncComponent {
  $$$
}'

# Also search for related component classes to understand the pattern
ast-grep --pattern 'class QbdDirectSetupConnectionComponent {
  $$$
}'

Length of output: 9685


Script:

#!/bin/bash
# Search for the data sync component implementation with a more flexible pattern
ast-grep --pattern 'class $_ {
  $$$
  isCTAEnabled
  $$$
}' src/app/integrations/qbd-direct/qbd-direct-shared/qbd-direct-data-sync/qbd-direct-data-sync.component.ts

Length of output: 167


Script:

#!/bin/bash
# Search for the file content directly
rg -A 20 "export class QbdDirectDataSyncComponent" src/app/integrations/qbd-direct/qbd-direct-shared/qbd-direct-data-sync/qbd-direct-data-sync.component.ts

Length of output: 618

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between f33a4a0 and 98306be.

📒 Files selected for processing (19)
  • src/app/integrations/qbd-direct/qbd-direct-main/qbd-direct-configuration/qbd-direct-configuration.component.html (1 hunks)
  • src/app/integrations/qbd-direct/qbd-direct-main/qbd-direct-dashboard/qbd-direct-dashboard.component.html (1 hunks)
  • src/app/integrations/qbd-direct/qbd-direct-main/qbd-direct-export-log/qbd-direct-export-log.component.html (1 hunks)
  • src/app/integrations/qbd-direct/qbd-direct-main/qbd-direct-mapping/qbd-direct-mapping.component.html (1 hunks)
  • src/app/integrations/qbd-direct/qbd-direct-onboarding/qbd-direct-onboarding-connector/qbd-direct-onboarding-connector.component.html (1 hunks)
  • src/app/integrations/qbd-direct/qbd-direct-onboarding/qbd-direct-onboarding-landing/qbd-direct-onboarding-landing.component.html (1 hunks)
  • src/app/integrations/qbd-direct/qbd-direct-onboarding/qbd-direct-onboarding-pre-requisite/qbd-direct-onboarding-pre-requisite.component.html (1 hunks)
  • src/app/integrations/qbd-direct/qbd-direct-onboarding/qbd-direct-onboarding-pre-requisite/qbd-direct-onboarding-pre-requisite.component.ts (1 hunks)
  • src/app/integrations/qbd-direct/qbd-direct-shared/qbd-direct-data-sync/qbd-direct-data-sync.component.html (1 hunks)
  • src/app/integrations/qbd-direct/qbd-direct-shared/qbd-direct-download-file/qbd-direct-download-file.component.html (2 hunks)
  • src/app/integrations/qbd-direct/qbd-direct-shared/qbd-direct-download-file/qbd-direct-download-file.component.ts (1 hunks)
  • src/app/integrations/qbd-direct/qbd-direct-shared/qbd-direct-setup-connection/qbd-direct-setup-connection.component.html (4 hunks)
  • src/app/integrations/qbd-direct/qbd-direct-shared/qbd-direct-setup-connection/qbd-direct-setup-connection.component.ts (2 hunks)
  • src/app/shared/components/configuration/configuration-confirmation-dialog/configuration-confirmation-dialog.component.html (2 hunks)
  • src/app/shared/components/helper/app-landing-page-body/app-landing-page-body.component.html (1 hunks)
  • src/app/shared/components/helper/app-landing-page-header/app-landing-page-header.component.html (2 hunks)
  • src/app/shared/components/helper/onboarding-done/onboarding-done.component.html (1 hunks)
  • src/app/shared/components/helper/onboarding-stepper/onboarding-stepper.component.html (1 hunks)
  • src/styles.scss (2 hunks)
✅ Files skipped from review due to trivial changes (7)
  • src/app/integrations/qbd-direct/qbd-direct-main/qbd-direct-dashboard/qbd-direct-dashboard.component.html
  • src/app/integrations/qbd-direct/qbd-direct-main/qbd-direct-configuration/qbd-direct-configuration.component.html
  • src/app/shared/components/helper/onboarding-stepper/onboarding-stepper.component.html
  • src/app/integrations/qbd-direct/qbd-direct-main/qbd-direct-export-log/qbd-direct-export-log.component.html
  • src/app/integrations/qbd-direct/qbd-direct-main/qbd-direct-mapping/qbd-direct-mapping.component.html
  • src/app/shared/components/helper/onboarding-done/onboarding-done.component.html
  • src/app/integrations/qbd-direct/qbd-direct-shared/qbd-direct-download-file/qbd-direct-download-file.component.html
🔇 Additional comments (13)
src/app/shared/components/configuration/configuration-confirmation-dialog/configuration-confirmation-dialog.component.html (1)

9-12: LGTM! Enhanced visual distinction for QBD_DIRECT warnings

The styling changes appropriately differentiate QBD_DIRECT warnings with rounded corners and danger-themed colors, improving the user experience through better visual hierarchy.

src/app/shared/components/helper/app-landing-page-body/app-landing-page-body.component.html (1)

4-10: Verify design system color and font-weight changes.

The changes include:

  1. Text color change from tw-text-text-secondary to tw-text-text-muted
  2. Addition of tw-font-500 to the link

Please ensure these changes align with the design system's color palette and typography guidelines.

✅ Verification successful

Based on the search results, I can generate the final response as we have sufficient evidence to verify the design system changes:

Color and font-weight changes align with design system

The changes are consistent with the design system's usage across the application:

  • tw-text-text-muted is widely used for secondary/hint text across multiple components
  • tw-font-500 is consistently used for links and interactive elements to improve visibility
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for consistent usage of these color and font-weight classes
echo "Checking color class usage:"
rg "tw-text-text-muted" --type html
echo "Checking font weight usage:"
rg "tw-font-500" --type html

Length of output: 51148

src/app/integrations/qbd-direct/qbd-direct-shared/qbd-direct-download-file/qbd-direct-download-file.component.ts (1)

12-12: Verify removal of QbdDirectSharedComponent.

The QbdDirectSharedComponent has been removed from imports. Please confirm this doesn't affect any shared functionality or styling.

src/app/integrations/qbd-direct/qbd-direct-shared/qbd-direct-setup-connection/qbd-direct-setup-connection.component.ts (1)

78-81: LGTM! Method implementation is clean and focused

The onManualDownload method implementation is straightforward and follows the single responsibility principle.

src/app/integrations/qbd-direct/qbd-direct-onboarding/qbd-direct-onboarding-pre-requisite/qbd-direct-onboarding-pre-requisite.component.html (1)

24-24: ⚠️ Potential issue

Verify HTML sanitization for innerHTML binding

While using innerHTML allows for rich text formatting in captions, it could potentially expose the application to XSS attacks if the content isn't properly sanitized.

Let's check if proper sanitization is implemented:

If sanitization is not implemented, consider either:

  1. Using Angular's built-in DomSanitizer:
constructor(private sanitizer: DomSanitizer) {
  this.step.caption = this.sanitizer.bypassSecurityTrustHtml(caption);
}
  1. Or using a safe HTML rendering library like ngx-markdown if the captions contain markdown content.
✅ Verification successful

HTML content is statically defined and safe to use with innerHTML

The captions are hardcoded strings in the component with only trusted HTML content (a simple anchor tag with target="_blank"). The content is not dynamically generated or received from external sources, making it safe to use with innerHTML binding in this specific case.

  • The caption content is statically defined in the component:
    caption: `<a href='https://developer.intuit.com/app/developer/qbdesktop/docs/get-started/get-started-with-quickbooks-web-connector' target="_blank" class=" tw-underline !tw-underline-offset-1" >Download</a> and install...`
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if DomSanitizer is used in the component
rg -l "DomSanitizer" src/app/integrations/qbd-direct/qbd-direct-onboarding/qbd-direct-onboarding-pre-requisite/

# Check caption content initialization
ast-grep --pattern 'preRequisitesteps = $_'

Length of output: 157


Script:

#!/bin/bash
# Let's check the component file for sanitization and caption initialization
rg -A 5 "caption" src/app/integrations/qbd-direct/qbd-direct-onboarding/qbd-direct-onboarding-pre-requisite/qbd-direct-onboarding-pre-requisite.component.ts

# Check if DomSanitizer is imported and used (with more context)
rg -A 5 "import.*DomSanitizer|sanitizer" src/app/integrations/qbd-direct/qbd-direct-onboarding/qbd-direct-onboarding-pre-requisite/qbd-direct-onboarding-pre-requisite.component.ts

# Check where the steps data is defined/initialized
rg -A 10 "steps.*=|preRequisiteSteps.*=" src/app/integrations/qbd-direct/qbd-direct-onboarding/qbd-direct-onboarding-pre-requisite/

Length of output: 5678

src/app/integrations/qbd-direct/qbd-direct-onboarding/qbd-direct-onboarding-connector/qbd-direct-onboarding-connector.component.html (1)

36-37: Verify triggerManualDownload implementation

The manual download event binding has been properly added, but let's ensure the handler method is properly implemented.

Let's check the implementation of triggerManualDownload:

✅ Verification successful

triggerManualDownload method is properly implemented

The method is correctly implemented in the component with proper XML file handling and download functionality using Blob and URL creation.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for triggerManualDownload method implementation
ast-grep --pattern 'triggerManualDownload() {
  $$$
}'

Length of output: 56


Script:

#!/bin/bash
# Let's try a different pattern to search for the method, considering potential TypeScript syntax
rg "triggerManualDownload\(" --type ts -A 5

Length of output: 2024

src/app/shared/components/helper/app-landing-page-header/app-landing-page-header.component.html (2)

1-1: LGTM: Background styling fix

The addition of tw-bg-no-repeat class prevents unwanted background image tiling, improving visual consistency.


17-17: LGTM: Text color adjustment

The change from tw-text-text-secondary to tw-text-text-tertiary aligns with the design system's color hierarchy.

src/app/integrations/qbd-direct/qbd-direct-shared/qbd-direct-setup-connection/qbd-direct-setup-connection.component.html (3)

1-1: LGTM: Border styling update

The border color change to tw-border-border-tertiary maintains visual consistency with the design system.


25-26: LGTM: Text wrapping improvements

The addition of tw-max-w-[300px] and tw-break-words classes improves text readability and prevents overflow.


76-78: LGTM: Responsive iframe sizing

The width adjustments using percentage-based values (tw-w-[40%] and tw-w-[100%]) improve responsive behavior.

src/styles.scss (1)

31-33: Verify the SVG icon path and consider using a more specific selector.

The new class uses a hardcoded path to the SVG icon. Additionally, the use of !important suggests potential specificity issues in the CSS cascade.

Consider:

  1. Using a more specific selector to avoid !important
  2. Using CSS custom properties for icon paths to make them configurable
-.pi-times.fyle.qbd{
-    content: url('./assets/icons/cross.svg') !important;
-}
+:root {
+    --icon-cross: url('./assets/icons/cross.svg');
+}
+
+.pi-times.fyle.qbd {
+    content: var(--icon-cross);
+}
✅ Verification successful

The SVG path is correct and the file exists in the codebase

The file cross.svg exists at src/assets/icons/cross.svg, which matches the relative path ./assets/icons/cross.svg used in the CSS. The path resolution will work correctly since styles.scss is in the src directory.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify that the SVG icon file exists and is accessible
# Test: Check if the cross.svg file exists in the assets/icons directory

fd -t f "cross.svg" "assets/icons"

Length of output: 132


Script:

#!/bin/bash
# Let's first find all SVG files to understand the assets structure
fd -e svg

# Also search for any references to cross.svg in the codebase
rg -i "cross\.svg"

Length of output: 7234

src/app/integrations/qbd-direct/qbd-direct-shared/qbd-direct-data-sync/qbd-direct-data-sync.component.html (1)

Line range hint 1-39: Overall changes look good

The modifications improve visual consistency and maintain proper component structure. The suggested improvements are minor and can be addressed in follow-up updates.

@@ -44,7 +44,7 @@ export class QbdDirectOnboardingPreRequisiteComponent {
{
id: 1,
label: 'Install QuickBooks Web Connector',
caption: 'Download and install the QuickBooks Web Connector on the system where QuickBooks Desktop is installed.',
caption: `<a href='https://developer.intuit.com/app/developer/qbdesktop/docs/get-started/get-started-with-quickbooks-web-connector' target="_blank" class=" tw-underline !tw-underline-offset-1" >Download</a> and install the QuickBooks Web Connector on the system where QuickBooks Desktop is installed.`,
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Add security attributes to external link

While the addition of the documentation link improves user experience, external links opened in new tabs should include security attributes to prevent potential security vulnerabilities.

-      caption: `<a href='https://developer.intuit.com/app/developer/qbdesktop/docs/get-started/get-started-with-quickbooks-web-connector' target="_blank" class=" tw-underline !tw-underline-offset-1" >Download</a> and install the QuickBooks Web Connector on the system where QuickBooks Desktop is installed.`,
+      caption: `<a href='https://developer.intuit.com/app/developer/qbdesktop/docs/get-started/get-started-with-quickbooks-web-connector' target="_blank" rel="noopener noreferrer" class="tw-underline !tw-underline-offset-1">Download</a> and install the QuickBooks Web Connector on the system where QuickBooks Desktop is installed.`,
📝 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
caption: `<a href='https://developer.intuit.com/app/developer/qbdesktop/docs/get-started/get-started-with-quickbooks-web-connector' target="_blank" class=" tw-underline !tw-underline-offset-1" >Download</a> and install the QuickBooks Web Connector on the system where QuickBooks Desktop is installed.`,
caption: `<a href='https://developer.intuit.com/app/developer/qbdesktop/docs/get-started/get-started-with-quickbooks-web-connector' target="_blank" rel="noopener noreferrer" class="tw-underline !tw-underline-offset-1">Download</a> and install the QuickBooks Web Connector on the system where QuickBooks Desktop is installed.`,

Copy link

github-actions bot commented Dec 3, 2024

Unit Test Coverage % values
Statements 34.81% ( 4247 / 12198 )
Branches 28.69% ( 1228 / 4279 )
Functions 27.46% ( 939 / 3419 )
Lines 34.95% ( 4177 / 11948 )

@DhaaraniCIT DhaaraniCIT merged commit b30ccf6 into master Dec 3, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/M Medium PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants