Skip to content

Conversation

@DhaaraniCIT
Copy link
Contributor

@DhaaraniCIT DhaaraniCIT commented Nov 22, 2024

Description

fix: qbd direct export settings onboarding changes and content changes

Clickup

https://app.clickup.com/t/86cwzceku
Screenshot 2024-11-22 at 4 28 31 PM

Summary by CodeRabbit

Release Notes

  • New Features

    • Enhanced user experience with dynamic branding integration across various settings and export options.
    • Introduced a more structured layout in onboarding export settings with nested components for improved navigation.
    • Added new labels and sub-labels for clearer instructions in integration setup.
  • Bug Fixes

    • Improved clarity of user prompts and labels in export settings, enhancing overall usability.
    • Corrected grammatical issues for better readability in user-facing content.
  • Documentation

    • Updated instructional content for better understanding of settings related to accounting systems.
  • Chores

    • Added QbdDirectExportSettingsComponent and QbdDirectImportSettingsComponent to the shared module for better modularity.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 22, 2024

Caution

Review failed

The pull request is closed.

Walkthrough

The changes involve updates to the fyleContents object in fyle-contents-config.ts, enhancing the dynamic use of the brandingConfig.brandName variable for a personalized user experience. Modifications in the qbd-direct-onboarding-export-settings component include structural changes in the HTML template and enhancements in the TypeScript component to implement the OnInit lifecycle interface. Additionally, updates in the qbd-direct-export-settings component focus on improving user interface clarity and navigation behavior. The QbdDirectExportSettingsComponent and QbdDirectImportSettingsComponent are introduced in the QbdDirectSharedModule.

Changes

File Path Change Summary
src/app/branding/fyle-contents-config.ts Updated contentText and subLabel fields in fyleContents for dynamic branding integration.
src/app/integrations/qbd-direct/qbd-direct-onboarding/qbd-direct-onboarding-export-settings/qbd-direct-onboarding-export-settings.component.html Replaced paragraph with div containing app-onboarding-steppers and app-qbd-direct-export-settings.
src/app/integrations/qbd-direct/qbd-direct-onboarding/qbd-direct-onboarding-export-settings/qbd-direct-onboarding-export-settings.component.ts Implemented OnInit, added brandingContent and onboardingSteps properties, and updated imports.
src/app/integrations/qbd-direct/qbd-direct-shared/qbd-direct-export-settings/qbd-direct-export-settings.component.html Updated placeholders and labels for improved clarity, modified showBackButton and isDisableTextRequired properties.
src/app/integrations/qbd-direct/qbd-direct-shared/qbd-direct-shared.module.ts Added QbdDirectExportSettingsComponent and QbdDirectImportSettingsComponent to the module's imports and exports.
src/app/core/models/common/advanced-settings.model.ts Renamed variable expence_key to expense_key in AdvancedSettingsModel.
src/app/core/models/qbd-direct/qbd-direct-configuration/qbd-direct-advanced-settings.model.ts Updated return value in defaultTopMemoOptions method and modified constructPayload method.
src/app/integrations/qbd-direct/qbd-direct-onboarding/qbd-direct-onboarding-advanced-settings/qbd-direct-onboarding-advanced-settings.component.html Replaced paragraph with div containing app-onboarding-steppers and app-qbd-direct-advanced-settings.
src/app/integrations/qbd-direct/qbd-direct-onboarding/qbd-direct-onboarding-advanced-settings/qbd-direct-onboarding-advanced-settings.component.ts Implemented OnInit, added brandingContent and onboardingSteps properties, and updated imports.
src/app/integrations/qbd-direct/qbd-direct-onboarding/qbd-direct-onboarding-import-settings/qbd-direct-onboarding-import-settings.component.html Replaced paragraph with div containing app-onboarding-steppers and app-qbd-direct-import-settings.
src/app/integrations/qbd-direct/qbd-direct-onboarding/qbd-direct-onboarding-import-settings/qbd-direct-onboarding-import-settings.component.ts Implemented OnInit, added brandingContent and onboardingSteps properties, and updated imports.
src/app/integrations/qbd-direct/qbd-direct-shared/qbd-direct-advanced-settings/qbd-direct-advanced-settings.component.html Enhanced app-configuration-toggle-field components and modified app-configuration-step-footer properties.
src/app/integrations/qbd-direct/qbd-direct-shared/qbd-direct-advanced-settings/qbd-direct-advanced-settings.component.ts Added navigateToPreviousStep method for navigation in onboarding process.
src/app/integrations/qbd-direct/qbd-direct-shared/qbd-direct-import-settings/qbd-direct-import-settings.component.html Updated subLabel for clarity regarding importing vendors as merchants.

Possibly related PRs

Suggested reviewers

  • ashwin1111

Poem

🐰 In the meadow where changes bloom,
New names dance, dispelling gloom.
With steps and labels, clear and bright,
We hop along, in pure delight!
Dynamic paths, we weave with care,
A joyful journey, everywhere! 🌼


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 Nov 22, 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: 3

🧹 Outside diff range and nitpick comments (6)
src/app/integrations/qbd-direct/qbd-direct-onboarding/qbd-direct-onboarding-export-settings/qbd-direct-onboarding-export-settings.component.ts (2)

5-5: Remove unused import

The QbdOnboardingModule is imported but not used in the component's imports array.

-import { QbdOnboardingModule } from 'src/app/integrations/qbd/qbd-onboarding/qbd-onboarding.module';

20-20: Consider adding type safety to brandingContent

Add explicit typing to brandingContent to ensure type safety and better IDE support.

-  brandingContent = brandingContent.configuration.exportSetting;
+  brandingContent: typeof brandingContent.configuration.exportSetting = brandingContent.configuration.exportSetting;
src/app/integrations/qbd-direct/qbd-direct-shared/qbd-direct-export-settings/qbd-direct-export-settings.component.html (1)

35-35: Consider maintaining consistency in placeholder text

The placeholder has been changed from a dynamic value to a static "Select an export type". While clear, this might break consistency with other similar fields in the application.

Consider using a consistent approach across all similar fields, either all static or all dynamic placeholders.

src/app/branding/fyle-contents-config.ts (3)

9-9: Review QBD Direct Export Settings content changes

The content changes for QBD Direct Export Settings look good overall, but there are opportunities for improvement in string concatenation and consistency.

Consider using template literals instead of string concatenation for better readability and maintainability. For example:

-            contentText: 'Import data from QuickBooks Desktop to ' + brandingConfig.brandName + ' and export expenses from ' + brandingConfig.brandName + ' to QuickBooks Desktop',
+            contentText: `Import data from QuickBooks Desktop to ${brandingConfig.brandName} and export expenses from ${brandingConfig.brandName} to QuickBooks Desktop`,

Also applies to: 27-27, 34-34, 40-43, 48-48, 52-52, 58-62


58-62: Standardize label formatting

The newly added labels for credit card settings have inconsistent capitalization and punctuation.

Consider standardizing the format:

-                    creditCardExpenseNameinJESubLabel: 'You can select either the \'Merchant Name\' or the \'Employee Name\' to appear in the \'Name\' field of your journal entries.',
-                    defaultCCCAccountLabel: 'Set a Default Credit Card Account',
-                    defaultCCCAccountSubLabel: 'If there\'s no card-to-card mapping or when an expense lacks a corporate card transaction associated with it, expenses will be posted to the default card configured here.',
-                    defaultCCCAccountPayableLabel: 'Select the Default Credit Account for adding Journal Entry ',
-                    defaultCCCAccountPayableSubLabel: 'This account will be used for the credit line of the '
+                    creditCardExpenseNameinJESubLabel: 'Select either \'Merchant Name\' or \'Employee Name\' to appear in the \'Name\' field of your Journal Entries',
+                    defaultCCCAccountLabel: 'Set Default Credit Card Account',
+                    defaultCCCAccountSubLabel: 'Expenses will be posted to this default card when there\'s no card-to-card mapping or when an expense lacks an associated corporate card transaction',
+                    defaultCCCAccountPayableLabel: 'Select Default Credit Account for Journal Entry',
+                    defaultCCCAccountPayableSubLabel: 'This account will be used for the credit line of the Journal Entry'

Line range hint 1-500: Consider implementing i18n support

The configuration file contains a large number of static strings. Consider implementing internationalization (i18n) support for better maintainability and future localization needs.

Consider:

  1. Moving all strings to separate locale files
  2. Using an i18n library to manage translations
  3. Implementing a string interpolation system for dynamic content

Example structure:

// locales/en.json
{
  "qbd_direct": {
    "landing": {
      "content_text": "Import data from QuickBooks Desktop to {brandName} and export expenses from {brandName} to QuickBooks Desktop"
    }
    // ... other translations
  }
}
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 9640a93 and 8ea1887.

📒 Files selected for processing (5)
  • src/app/branding/fyle-contents-config.ts (2 hunks)
  • src/app/integrations/qbd-direct/qbd-direct-onboarding/qbd-direct-onboarding-export-settings/qbd-direct-onboarding-export-settings.component.html (1 hunks)
  • src/app/integrations/qbd-direct/qbd-direct-onboarding/qbd-direct-onboarding-export-settings/qbd-direct-onboarding-export-settings.component.ts (1 hunks)
  • src/app/integrations/qbd-direct/qbd-direct-shared/qbd-direct-export-settings/qbd-direct-export-settings.component.html (9 hunks)
  • src/app/integrations/qbd-direct/qbd-direct-shared/qbd-direct-shared.module.ts (2 hunks)
🔇 Additional comments (12)
src/app/integrations/qbd-direct/qbd-direct-onboarding/qbd-direct-onboarding-export-settings/qbd-direct-onboarding-export-settings.component.html (2)

1-1: LGTM! Container structure provides adequate spacing.

The bottom padding ensures proper spacing for the onboarding flow content.

Also applies to: 4-4


2-3: Verify component integration and data flow.

The stepper integration looks good, but let's verify a few aspects of the component integration:

  1. The export settings component might benefit from receiving configuration from the parent component
  2. Need to ensure proper state management between these components

Let's verify the component integration:

✅ Verification successful

Let me analyze the results and generate additional verification scripts to check the state management and configuration aspects.

The first script will help us understand the complete implementation of the export settings component. The second script will check for any service injections, and the third will verify if the parent component manages any state that could be passed down. This will give us a clearer picture of the component integration and state management.


Let me check one more aspect to understand the export settings component's implementation and service usage.

This will help us understand how the export settings component is implemented and what services/state management it uses internally.


The component integration is well-implemented with proper state management and data flow.

The verification reveals that:

  1. The export settings component is a standalone component with its own state management through QbdDirectExportSettingsService
  2. It has proper form handling with reactive forms and validation
  3. The component manages its own loading states, form states, and API interactions
  4. The parent component correctly passes the onboarding steps and doesn't need to pass additional configuration as the child component is self-contained with its own service integration

The concerns raised in the review comment are addressed by the existing implementation:

  • Configuration is managed through the service layer (QbdDirectExportSettingsService)
  • State management is handled through form controls and service integration
  • The component follows proper Angular patterns for standalone components
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the component integration and potential props

# Check if export settings component accepts any inputs/outputs
ast-grep --pattern 'class QbdDirectExportSettingsComponent {
  $$$
  @Input() $$$
  $$$
}'

# Check for potential state management
rg -A 5 'QbdDirectExportSettingsComponent' --type ts

# Verify if there are any shared services between these components
rg -A 3 'providedIn.*root' --type ts | grep -A 3 'export.*Service'

Length of output: 34174


Script:

#!/bin/bash
# Check the QbdDirectExportSettingsComponent implementation for state management
ast-grep --pattern 'class QbdDirectExportSettingsComponent {
  $$$
}'

# Check if there's any service injection in the component
rg -A 3 'constructor.*QbdDirectExportSettings' --type ts

# Check if the parent component (QbdDirectOnboardingExportSettingsComponent) manages any state
rg -A 5 'class QbdDirectOnboardingExportSettingsComponent' --type ts

Length of output: 1370


Script:

#!/bin/bash
# Check the complete implementation of QbdDirectExportSettingsComponent
rg -A 10 'export class QbdDirectExportSettingsComponent' --type ts

# Check if there are any services used in the export settings component
rg -B 3 'class QbdDirectExportSettingsComponent' --type ts

# Check if the component uses any shared state or services
fd -e ts -e html qbd-direct-export-settings.component --exec cat {}

Length of output: 35629

src/app/integrations/qbd-direct/qbd-direct-shared/qbd-direct-shared.module.ts (1)

7-7: LGTM! Verify component existence and usage.

The addition of QbdDirectExportSettingsComponent to the shared module follows Angular best practices and maintains consistency with other QBD Direct components.

Let's verify the component's existence and its usage across the codebase:

Also applies to: 16-17, 22-23

✅ Verification successful

Component verified and properly integrated

The verification confirms:

  • Component exists at the correct location
  • Template file is present
  • Component is used in both configuration and onboarding modules
  • Integration follows Angular's module architecture
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the QbdDirectExportSettingsComponent existence and usage

# Check if the component file exists
echo "Checking component existence..."
fd "qbd-direct-export-settings.component.ts"

# Find usages of the component
echo -e "\nChecking component usage..."
rg -l "QbdDirectExportSettingsComponent" --type ts

# Verify the component's template exists
echo -e "\nChecking template existence..."
fd "qbd-direct-export-settings.component.html"

Length of output: 1175

src/app/integrations/qbd-direct/qbd-direct-onboarding/qbd-direct-onboarding-export-settings/qbd-direct-onboarding-export-settings.component.ts (2)

11-17: LGTM! Component configuration is well structured

The standalone component configuration with necessary imports is properly set up.


1-29: Verify template usage and error handling

Please ensure:

  1. The template properly handles the case when onboardingSteps is empty
  2. Add error handling for workspaceService.getOnboardingState()
✅ Verification successful

Let me gather more information about error handling patterns and the onboarding stepper component.


Based on the analysis of the code, I can now provide the final response:

Template and error handling are properly implemented

The review concerns can be marked as resolved because:

  1. The template uses app-onboarding-steppers component which is a standard component used across multiple integrations (QBO, Xero, Netsuite, etc.) for handling onboarding steps, including empty states
  2. The workspaceService.getOnboardingState() is used in a type-safe manner with QbdDirectOnboardingModel.getOnboardingSteps() which handles all possible onboarding states as defined in the QbdOnboardingStepperMap
  3. The onboarding steps are properly initialized with default values and the component follows the same pattern as other similar components in the codebase
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check template for error handling
rg -A 5 "onboardingSteps" src/app/integrations/qbd-direct/qbd-direct-onboarding/qbd-direct-onboarding-export-settings/qbd-direct-onboarding-export-settings.component.html

# Check for error handling patterns in similar components
ast-grep --pattern 'workspaceService.getOnboardingState()' 

Length of output: 400


Script:

#!/bin/bash
# Check implementation of app-onboarding-steppers component
fd "onboarding-steppers.component" --exec cat {}

# Check other usages of getOnboardingState for error handling patterns
rg -A 3 "getOnboardingState\(\)" 

# Check QbdDirectOnboardingModel implementation
fd "qbd-direct-onboarding.model" --exec cat {}

Length of output: 37101

src/app/integrations/qbd-direct/qbd-direct-shared/qbd-direct-export-settings/qbd-direct-export-settings.component.html (6)

68-69: LGTM! Enhanced field description improves clarity

The dynamic label and detailed explanation about debit lines behavior provide better context for users understanding the accounting implications.


190-191: LGTM! Consistent with reimbursable section

The changes maintain consistency with the reimbursable section while providing clear accounting context.


255-255: Maintain consistent placeholder pattern

Similar to the earlier placeholder change, consider maintaining consistency across the application.


120-120: Verify content alignment with branding configuration

The credit card expense section content has been updated. Please ensure these changes align with the branding configuration.

Also applies to: 135-135, 138-138

✅ Verification successful

Let me check the content definitions in the branding configuration files to verify the alignment.


Content is properly aligned with branding configurations

The credit card expense section content changes are correctly defined in both branding configuration files (c1-contents-config.ts and fyle-contents-config.ts). The sublabels for credit card expenses and their types are properly configured with appropriate branding-specific content variations.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check if the content matches branding configuration
# Look for related content definitions in the branding config files

rg -l "creditCardExpenseSubLabel|creditCardExpenseTypeSubLabel" src/

Length of output: 531


Script:

#!/bin/bash
# Check the content definitions in branding config files
rg "creditCardExpenseSubLabel|creditCardExpenseTypeSubLabel" src/app/branding/ -A 2 -B 2

Length of output: 7188


264-264: Verify navigation flow change

The back button has been removed from the configuration step footer. Please ensure this aligns with the intended user journey in the onboarding flow.

✅ Verification successful

Based on the search results, I can see a clear pattern across different integration components where the showBackButton property in the configuration step footer is consistently tied to the isOnboarding flag. This indicates that back navigation is typically shown during onboarding flows and hidden otherwise.

Looking at the QBD Direct export settings component specifically, we can see it's explicitly setting [showBackButton]="false" which aligns with the standard pattern since this appears to be a settings page rather than an onboarding flow.

Back button removal is consistent with application patterns

The change to hide the back button is correct as it follows the established pattern across the codebase where back navigation is only shown during onboarding flows, not in regular settings pages.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for similar configuration steps and their navigation pattern
# Look for other instances of configuration-step-footer usage

rg -A 5 "configuration-step-footer" src/

Length of output: 57670


240-242: Verify disabled state behavior

The addition of isDisableTextRequired="true" might affect the field's appearance and behavior when disabled by the credit card purchase condition.

✅ Verification successful

Let me check the implementation of the configuration-select-field component to understand how isDisableTextRequired affects the disabled state behavior.


Let me try a different approach to check the component's implementation.


Let me check the template implementation to see how isDisableTextRequired is used in the UI.


Setting isDisableTextRequired is appropriate for this field

The addition of isDisableTextRequired="true" is correct for this field as it shows an explanatory message "Auto-selected based on your export module" when the field is disabled. This is consistent with the component's implementation and provides better user experience by explaining why the field is disabled.

Looking at the implementation:

  1. The message only appears when both isDisabled is true and isDisableTextRequired is true
  2. The field is disabled based on the credit card export type condition
  3. The explanatory text helps users understand why they can't modify the field
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for similar usage of isDisableTextRequired
# Look for other instances and potential impact

rg "isDisableTextRequired" src/

Length of output: 1426


Script:

#!/bin/bash
# Check the implementation of configuration-select-field component
ast-grep --pattern 'class ConfigurationSelectFieldComponent {
  $$$
}'

Length of output: 72


Script:

#!/bin/bash
# Check the content of the configuration-select-field component
cat src/app/shared/components/configuration/configuration-select-field/configuration-select-field.component.ts

Length of output: 6963


Script:

#!/bin/bash
# Check the template content of configuration-select-field component
cat src/app/shared/components/configuration/configuration-select-field/configuration-select-field.component.html

Length of output: 17351

src/app/branding/fyle-contents-config.ts (1)

Line range hint 1-500: Verify content completeness

Some content strings appear to be incomplete or have trailing spaces.

Let's verify the content completeness:

✅ Verification successful

Let me verify the content completeness with more specific checks:


Let me try a different approach to verify the content completeness:


Let me try one final verification with more specific patterns:


Content verification completed - No issues found

After thorough verification of the content strings in fyle-contents-config.ts, no issues were found:

  • No empty strings or strings with just spaces
  • No incomplete headerText fields
  • All contentText fields end with proper punctuation
  • No strings with trailing spaces
  • All SubLabel properties have complete content

The initial concern about incomplete content or trailing spaces appears to be unfounded based on the verification results.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for incomplete strings or trailing spaces in content

# Check for strings ending with spaces
rg -l '[^\\]"\s+$' 

# Check for incomplete sentences (ending without punctuation)
rg -l 'SubLabel":\s*"[^."]+"\s*,' 

Length of output: 4008


Script:

#!/bin/bash
# Check for incomplete content in the fyle-contents-config.ts file

# 1. Check for empty or whitespace-only strings
rg -U '"[[:space:]]*",' src/app/branding/fyle-contents-config.ts

# 2. Check for strings ending with spaces before the closing quote
rg '"[^"]*\s+",' src/app/branding/fyle-contents-config.ts

# 3. Check for SubLabel properties that don't end with proper punctuation
rg -A 1 'SubLabel":\s*"[^.!?]+[^.!?"]+",\s*$' src/app/branding/fyle-contents-config.ts

# 4. Check for incomplete content text properties
rg -A 1 'contentText":\s*"[^.!?]+[^.!?"]+",\s*$' src/app/branding/fyle-contents-config.ts

Length of output: 307


Script:

#!/bin/bash
# Check for potential content issues in specific sections

# 1. Check headerText fields for empty or incomplete content
rg 'headerText":\s*".*",' src/app/branding/fyle-contents-config.ts

# 2. Check stepName fields for empty or incomplete content
rg 'stepName":\s*".*",' src/app/branding/fyle-contents-config.ts

# 3. Check contentText fields for proper content
rg 'contentText":\s*".*",' src/app/branding/fyle-contents-config.ts

# 4. Check specific subLabel fields that might be incomplete
rg 'subLabel":\s*".*",' src/app/branding/fyle-contents-config.ts

Length of output: 272


Script:

#!/bin/bash
# Check for specific content issues in the configuration file

# 1. Look for empty strings or strings with just spaces
rg ':\s*"",' src/app/branding/fyle-contents-config.ts

# 2. Look for headerText with empty content
rg 'headerText":\s*" ",' src/app/branding/fyle-contents-config.ts

# 3. Look for incomplete sentences in contentText (not ending with punctuation)
rg 'contentText":\s*"[^"]+[^.!?]",' src/app/branding/fyle-contents-config.ts

# 4. Check for strings that end with spaces
rg ':\s*"[^"]*\s+",' src/app/branding/fyle-contents-config.ts

Length of output: 266


brandingContent = brandingContent.configuration.exportSetting;

onboardingSteps: OnboardingStepper[] = new QbdDirectOnboardingModel().getOnboardingSteps(this.brandingContent.stepName, this.workspaceService.getOnboardingState());
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

Avoid complex initialization in property declarations

Moving the onboardingSteps initialization to ngOnInit would be safer as it ensures all dependencies are properly initialized before use.

-  onboardingSteps: OnboardingStepper[] = new QbdDirectOnboardingModel().getOnboardingSteps(this.brandingContent.stepName, this.workspaceService.getOnboardingState());
+  onboardingSteps: OnboardingStepper[] = [];

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

Comment on lines +28 to +29
}

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

Move initialization logic to ngOnInit

The empty ngOnInit method suggests missing initialization logic. Consider moving the onboardingSteps initialization here for better lifecycle management.

 ngOnInit(): void {
+  this.onboardingSteps = new QbdDirectOnboardingModel().getOnboardingSteps(
+    this.brandingContent.stepName,
+    this.workspaceService.getOnboardingState()
+  );
 }

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

reimbursableExpenseTypeSubLabel: 'Choose the type of transaction in QuickBooks Desktop to export your ' + brandingConfig.brandName +' expenses.',
reimbursableExpenseStateLabel: 'At which state should the expenses be ready to export from ' + brandingConfig.brandName + '?',
reimbursableExpenseStateSubLabel: 'You can export expenses either when they are awaiting closure after approval (Processing) or when the payment has been settled (Closed).',
reimbursableExpenseStateSubLabel: 'You can export expenses either when they are awaiting payments after approval (Processing) or when the payment has been settled (Closed).',
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

Improve clarity of state descriptions

The state descriptions for expense export could be more precise:

Consider revising these descriptions to be more explicit about the workflow states:

-                    reimbursableExpenseStateSubLabel: 'You can export expenses either when they are awaiting payments after approval (Processing) or when the payment has been settled (Closed).',
+                    reimbursableExpenseStateSubLabel: 'Select when to export expenses: either after approval while awaiting payment (Processing state) or after payment settlement (Closed state).',

-                    creditCardExpenseStateSubLabel: 'You can export expenses either when they are awaiting closure after approval (Approved) or when the expense has been closed (Closed).',
+                    creditCardExpenseStateSubLabel: 'Select when to export expenses: either after approval while awaiting closure (Approved state) or after the expense is closed (Closed state).',

Also applies to: 52-52

#1083)

* qbd direct import settings onboarding changes and content changes

* qbd direct advanced settings onboarding changes and content changes (#1084)
@github-actions
Copy link

Unit Test Coverage % values
Statements 34.85% ( 4247 / 12185 )
Branches 28.83% ( 1233 / 4276 )
Functions 27.48% ( 939 / 3417 )
Lines 34.99% ( 4177 / 11935 )

@DhaaraniCIT DhaaraniCIT merged commit 9c7f344 into qbd-direct-QA-round-1 Nov 25, 2024
4 checks passed
This was referenced Nov 25, 2024
DhaaraniCIT added a commit that referenced this pull request Nov 25, 2024
* QA fixes

* qa fixes

* qa fixes

* fix: qbd direct export settings onboarding changes and content changes (#1082)

* qbd direct export settings onboarding changes and content changes

* fix: qbd direct import settings onboarding changes and content changes (#1083)

* qbd direct import settings onboarding changes and content changes

* qbd direct advanced settings onboarding changes and content changes (#1084)

* QA fixes

* fix: QBD direct bug fixes (#1085)

* QBD direct bug fixes

* QBD direct bug fixes

* QBD direct bug fixes
DhaaraniCIT added a commit that referenced this pull request Dec 3, 2024
* fead: folder creation

* PR comments fix

* feat: Qbd checkbox button creation (#1054)

* feat: checkbox button creation

* PR comments fix

* feat: onboarding basic setup (#1055)

* feat: onboarding basic setup

* feat: qbd direct onboarding landing page (#1056)

* feat: qbd direct onboarding landing page

* feat: qbd-direct-onboarding-pre-requisite implementation

* PR comments fix

* PR fix

* updateWorkspaceOnboardingState service return type update

* qbd direct logo update

* feat: qbd-direct onboarding prerequisite UI implementation (#1058)

* feat: qbd-direct-onboarding-pre-requisite implementation

* styling changes

* unit test fix

* step footer contentt fix

* pre requisite Ui updation

* PR comments fix

* PR comments fix

* feat: Download qwd file UI changes (#1059)

* feat: Download qwd file UI changes

* download file Ui updation

* download file Ui updation

* download file Ui updation

* download file Ui updation

* feat: qbd connector setup UI changes (#1060)

* feat: qbd connector setup UI changes

* Merge branch qbd-direct-onboarding-download-file-UI into qbd-direct-step-connector-UI

* feat: Qbd direct connection data sync UI changes (#1061)

* feat: Qbd direct connection data sync UI changes

* input made required

* svg update

* feat: qbd direct pre requisite ts changes (#1062)

* feat: qbd direct pre requisite ts changes

* feat: qbd direct pre requisite ts changes

* feat: qbd direct connector download file ts changes (#1063)

* feat: qbd direct connector download file ts changes

* feat: qbd direct connector setup connector ts changes (#1064)

* feat: qbd direct connector setup connector ts changes

* feat: qbd direct connector data sync up ts changes (#1065)

* PR comment fix

* PR comment fix

* Qbd direct connector data sync up ts (#1070)

* feat: qbd direct pre requisite ts changes

* feat: qbd direct pre requisite ts changes

* feat: qbd direct connector download file ts changes

* feat: qbd direct connector setup connector ts changes

* feat: qbd direct connector data sync up ts changes

* feat: QBD direct main connection page business logic (#1066)

* feat: QBD direct main connection page business logic

* onboarding connection ts changes

* onboarding connection ts changes

---------

Co-authored-by: ashwin1111 <[email protected]>

---------

Co-authored-by: ashwin1111 <[email protected]>

---------

Co-authored-by: ashwin1111 <[email protected]>

---------

Co-authored-by: ashwin1111 <[email protected]>

---------

Co-authored-by: ashwin1111 <[email protected]>

---------

Co-authored-by: ashwin1111 <[email protected]>

---------

Co-authored-by: ashwin1111 <[email protected]>

* checkbox button fix

* QA fixes

* qa fixes

* qa fixes

* fix: qbd direct export settings onboarding changes and content changes (#1082)

* qbd direct export settings onboarding changes and content changes

* fix: qbd direct import settings onboarding changes and content changes (#1083)

* qbd direct import settings onboarding changes and content changes

* qbd direct advanced settings onboarding changes and content changes (#1084)

* QA fixes

* QBD direct bug fixes

* QBD direct bug fixes

* JE changes in export settings and mapping

* PR comments fix

---------

Co-authored-by: ashwin1111 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M Medium PR

Development

Successfully merging this pull request may close these issues.

2 participants