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

feat: initial template for onboarding home page #3383

Merged

Conversation

bistaastha
Copy link
Contributor

@bistaastha bistaastha commented Dec 20, 2024

workerB

Preview:
Screenshot 2024-12-20 at 11 15 06 AM

Summary by CodeRabbit

  • New Features

    • Introduced a new onboarding page for spenders, enhancing user navigation and experience.
    • Added a personalized greeting and step tracker to guide users through the onboarding process.
  • Bug Fixes

    • Improved loading state management for a smoother user experience.
  • Documentation

    • Updated styles and layout for the new onboarding page to ensure a cohesive design.

Copy link

coderabbitai bot commented Dec 20, 2024

Walkthrough

Superstar, listen up! 🌟 We've just unleashed a powerful new spender onboarding feature that's going to revolutionize user experience! The changes introduce a complete routing and page setup for the spender onboarding process, with a sleek routing module, a stylish page component, and a killer design that'll make users go "Wow!" The implementation includes lazy loading, user-specific greetings, and a smooth loading mechanism that's as smooth as my signature style!

Changes

File Change Summary
src/app/fyle/.../fyle-routing.module.ts Added new route 'spender_onboarding' for lazy loading SpenderOnboardingPageModule
src/app/fyle/.../spender-onboarding-routing.module.ts Created new routing module with empty path route to SpenderOnboardingPage
src/app/fyle/.../spender-onboarding.module.ts Introduced new module importing necessary dependencies for SpenderOnboardingPage
src/app/fyle/.../spender-onboarding.page.html Designed new onboarding page template with user greeting, progress tracker
src/app/fyle/.../spender-onboarding.page.scss Added comprehensive styling for onboarding page components
src/app/fyle/.../spender-onboarding.page.ts Implemented component logic for user data loading and display

Possibly related PRs

Suggested Labels

size/L

Suggested Reviewers

  • Chethan-Fyle
  • arjunaj5

Poem

Onboarding magic, swift and bright, 🚀
Spender's journey takes its flight! 💥
Routes that dance, styles that gleam,
Rajini's code - a developer's dream! 💡
Welcome aboard, let the adventure begin! 🌈

Tip

CodeRabbit's docstrings feature is now available as part of our Early Access Program! Simply use the command @coderabbitai generate docstrings to have CodeRabbit automatically generate docstrings for your pull request. We would love to hear your feedback on Discord.


🪧 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 generate docstrings to generate docstrings for this PR. (Beta)
  • @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 20, 2024
Copy link

@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: 10

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d4fd372 and 7d9c2ed.

⛔ Files ignored due to path filters (1)
  • src/assets/svg/progress-bar.svg is excluded by !**/*.svg
📒 Files selected for processing (6)
  • src/app/fyle/fyle-routing.module.ts (1 hunks)
  • src/app/fyle/spender-onboarding/spender-onboarding-routing.module.ts (1 hunks)
  • src/app/fyle/spender-onboarding/spender-onboarding.module.ts (1 hunks)
  • src/app/fyle/spender-onboarding/spender-onboarding.page.html (1 hunks)
  • src/app/fyle/spender-onboarding/spender-onboarding.page.scss (1 hunks)
  • src/app/fyle/spender-onboarding/spender-onboarding.page.ts (1 hunks)
🔇 Additional comments (1)
src/app/fyle/fyle-routing.module.ts (1)

49-52: Route naming style mismatch, kabali!

Other routes use underscore, but Angular best practices suggest using hyphens. Let's be consistent with the existing pattern though!

Let's verify the route naming convention:

Comment on lines +13 to +15
isLoading = true;

userFullName: string;
Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Make these properties as strong as my style!

Define proper types for your properties, partner! TypeScript is your friend like my fans are to me!

- isLoading = true;
+ isLoading: boolean = true;

- userFullName: string;
+ userFullName: string = '';
📝 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
isLoading = true;
userFullName: string;
isLoading: boolean = true;
userFullName: string = '';

slot="icon-only"
></ion-icon>
</div>
<div class="spender-onboarding__skip-cta" (click)="skipConnectCardOnboardingStep()">Skip</div>
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Mind it! Skip action needs confirmation, machan!

Skipping onboarding is a crucial decision. Let's add a confirmation dialog to prevent accidental skips.

-<div class="spender-onboarding__skip-cta" (click)="skipConnectCardOnboardingStep()">Skip</div>
+<div class="spender-onboarding__skip-cta" (click)="confirmSkip()">Skip</div>

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

@@ -0,0 +1,29 @@
<div class="spender-onboarding" *ngIf="!isLoading">
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Mind blowing! But where's the loading indicator, partner?

When isLoading is true, the user sees nothing! Let's show them some style with a loading spinner, shall we?

-<div class="spender-onboarding" *ngIf="!isLoading">
+<ion-content>
+  <ion-spinner *ngIf="isLoading" class="spender-onboarding__spinner"></ion-spinner>
+  <div class="spender-onboarding" *ngIf="!isLoading">

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

Comment on lines +37 to +46
&__user-greeting {
display: flex;
gap: 12px;
align-items: flex-start;
color: $dark-grey;
line-height: 1.4;
padding: 0 24px;
margin: 12px 0 32px 0;
height: 42px;
}
Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Make it responsive, superstar!

Add media queries for better tablet and desktop experience.

  &__user-greeting {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    color: $dark-grey;
    line-height: 1.4;
    padding: 0 24px;
    margin: 12px 0 32px 0;
    height: 42px;
+    @media (min-width: 768px) {
+      padding: 0 48px;
+      margin: 24px 0 48px 0;
+    }
  }
📝 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
&__user-greeting {
display: flex;
gap: 12px;
align-items: flex-start;
color: $dark-grey;
line-height: 1.4;
padding: 0 24px;
margin: 12px 0 32px 0;
height: 42px;
}
&__user-greeting {
display: flex;
gap: 12px;
align-items: flex-start;
color: $dark-grey;
line-height: 1.4;
padding: 0 24px;
margin: 12px 0 32px 0;
height: 42px;
@media (min-width: 768px) {
padding: 0 48px;
margin: 24px 0 48px 0;
}
}


&__option {
font-weight: normal;
color: #0077ee;
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Hardcoded color alert! Use variables, thalaiva!

Replace hardcoded color with theme variable.

-    color: #0077ee;
+    color: $primary-color;
📝 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
color: #0077ee;
color: $primary-color;

Comment on lines +2 to +5
$item-border-color: #e0e0e0;
$background-color: #fff;
$menu-botton-color: #000;
$toolbar-border: #ababab6b;
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Colors should be in theme file, style-u!

Move these color variables to the theme file for better maintainability and consistency.

These color variables should be moved to src/theme/colors.scss:

-$item-border-color: #e0e0e0;
-$background-color: #fff;
-$menu-botton-color: #000;
-$toolbar-border: #ababab6b;

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

Copy link

Unit Test Coverage % values
Statements 95.99% ( 19302 / 20108 )
Branches 91.12% ( 10664 / 11703 )
Functions 94.25% ( 5740 / 6090 )
Lines 96.03% ( 18432 / 19194 )

@bistaastha bistaastha merged commit b003ae1 into FYLE-86cx2t82k-base-feature-branch Dec 22, 2024
10 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.

2 participants