-
Notifications
You must be signed in to change notification settings - Fork 15
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: Add web app flow for partially enrolled cards #3439
base: FYLE-86cx2t82k-add-remaining-fixes
Are you sure you want to change the base?
fix: Add web app flow for partially enrolled cards #3439
Conversation
WalkthroughListen up, superstar! This pull request is a grand makeover of the spender onboarding flow, with precise adjustments across various components. We’ve fine-tuned the connect card step, revamped popup alerts, and modified the onboarding page's behavior. Each change is like a well-placed punch in an action scene, enhancing the user experience with clarity and style! Changes
Possibly related PRs
Suggested Labels
Suggested Reviewers
Poem
✨ Finishing Touches
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? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this 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 comments (1)
src/app/fyle/my-profile/my-profile.page.ts (1)
Line range hint
48-48
: Aiyyo, remove the unusedOnboardingState
import to fix lint error.Thalaiva, pipeline is complaining about
OnboardingState
at line 48. Either use it or kick it out, da!- import { OnboardingState } from 'src/app/core/models/onboarding-state.enum';
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (3)
src/app/fyle/my-profile/my-profile.page.html
(1 hunks)src/app/fyle/my-profile/my-profile.page.ts
(2 hunks)src/app/shared/components/sidemenu/sidemenu.component.ts
(1 hunks)
🧰 Additional context used
🪛 GitHub Actions: Lint
src/app/fyle/my-profile/my-profile.page.ts
[error] 48-48: 'OnboardingState' is defined but never used
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: gitStream.cm
- GitHub Check: build (12.x)
🔇 Additional comments (3)
src/app/shared/components/sidemenu/sidemenu.component.ts (1)
398-401
: 🧹 Nitpick (assertive)Aiyyo, verify the meaning of
redirectionAllowed
.My friend, passing
redirectionAllowed
to a parameter namedisOnboardingPending
can confuse future readers, da. Iftrue
means the user needs onboarding, rename accordingly for crystal-clear intent.- ...this.getPrimarySidemenuOptions(isConnected, redirectionAllowed), - ...this.getSecondarySidemenuOptions(orgs, isDelegatee, isConnected, redirectionAllowed), + ...this.getPrimarySidemenuOptions(isConnected, isOnboardingPending), + ...this.getSecondarySidemenuOptions(orgs, isDelegatee, isConnected, isOnboardingPending),✅ Verification successful
Mind it! The review is spot on, machan! Let me break it down for you.
Looking at how this
redirectionAllowed
is used across the codebase, it's crystal clear that when it'strue
, it means the user must complete onboarding. The current name is like serving sambhar without rice - it just doesn't make sense! Other files are already using better names likeshouldRedirectToOnboarding
andshouldProceedToOnboarding
.The suggested name
isOnboardingPending
is perfect because:
- It matches how the value is actually used in the guards and pages
- It clearly tells other developers that onboarding is pending
- It follows the proper boolean naming style, no confusion!
🏁 Scripts executed
The following scripts were executed for the analysis:
Error: No shell scripts found
Script:
#!/bin/bash # Find implementation of checkForRedirectionToOnboarding echo "=== Searching for checkForRedirectionToOnboarding implementation ===" ast-grep --pattern 'checkForRedirectionToOnboarding() { $$$ }' # Find implementations of menu option methods echo -e "\n=== Searching for getPrimarySidemenuOptions implementation ===" ast-grep --pattern 'getPrimarySidemenuOptions($$$) { $$$ }' echo -e "\n=== Searching for getSecondarySidemenuOptions implementation ===" ast-grep --pattern 'getSecondarySidemenuOptions($$$) { $$$ }' # Search for related patterns echo -e "\n=== Searching for related redirection patterns ===" rg "redirectionAllowed|checkForRedirectionToOnboarding" -A 3Length of output: 3463
src/app/fyle/my-profile/my-profile.page.ts (1)
193-195
: Check logical consistency withredirectionAllowed
.Superstar, confirm this pipe logic matches your new onboarding flow. If
hide_other_options: redirectionAllowed
is actually the same concept, all is well. Otherwise, rename for readability, da!src/app/fyle/my-profile/my-profile.page.html (1)
16-16
: Confirm conditional usage.Thalaiva,
*ngIf="onboardingPending.hide_other_options"
suggests you're hiding sections iftrue
. Double-check that logic matches your user stories, da!
@@ -103,7 +103,7 @@ | |||
|
|||
isUserFromINCluster$: Observable<boolean>; | |||
|
|||
onboardingPending$: Observable<{ is_pending: boolean }>; | |||
onboardingPending$: Observable<{ hide_other_options: boolean }>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick (assertive)
Aha, rename for clarity.
hide_other_options
can be misunderstood, da. Consider shouldHideOtherOptions
or something more descriptive to reveal the intent.
- onboardingPending$: Observable<{ hide_other_options: boolean }>;
+ onboardingPending$: Observable<{ shouldHideOtherOptions: boolean }>;
📝 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.
onboardingPending$: Observable<{ hide_other_options: boolean }>; | |
onboardingPending$: Observable<{ shouldHideOtherOptions: boolean }>; |
Preview - on clicking
Continue
, the user will configure the step:Summary by CodeRabbit
Style Updates
User Experience Improvements
Onboarding Process