-
Notifications
You must be signed in to change notification settings - Fork 61
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(native-app): don't show progress bar for applications with type in progress #16158
Conversation
WalkthroughThe changes in the pull request modify the logic in the Changes
Possibly related PRs
Suggested labels
Suggested reviewers
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
Documentation and Community
|
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: 0
🧹 Outside diff range and nitpick comments (1)
apps/native/app/src/screens/applications/components/applications-preview.tsx (1)
71-78
: Approved: Progress bar logic fixed as per PR objectivesThe changes successfully address the bug mentioned in the PR objectives by ensuring that the progress bar is only shown for 'incomplete' applications. This implementation aligns with the NextJS and TypeScript best practices mentioned in the coding guidelines.
For improved readability, consider extracting the condition into a separate variable:
const isIncomplete = type === 'incomplete'; const progress = isIncomplete ? application.actionCard?.draftFinishedSteps ?? 0 : undefined; const progressTotalSteps = isIncomplete ? application.actionCard?.draftTotalSteps ?? 0 : undefined;This refactoring would make the logic more explicit and easier to maintain in the future.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (1)
- apps/native/app/src/screens/applications/components/applications-preview.tsx (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
apps/native/app/src/screens/applications/components/applications-preview.tsx (1)
Pattern
apps/**/*
: "Confirm that the code adheres to the following:
- NextJS best practices, including file structure, API routes, and static generation methods.
- Efficient state management and server-side rendering techniques.
- Optimal use of TypeScript for component and utility type safety."
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #16158 +/- ##
==========================================
- Coverage 36.70% 36.65% -0.05%
==========================================
Files 6776 6772 -4
Lines 139609 139428 -181
Branches 39694 39626 -68
==========================================
- Hits 51242 51111 -131
+ Misses 88367 88317 -50
Flags with carried forward coverage won't be shown. Click here to find out more. see 34 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
Datadog ReportAll test runs ✅ 10 Total Test Services: 0 Failed, 9 Passed Test ServicesThis report shows up to 10 services
|
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.
Nice :)
…n progress (#16158) Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Snær found a bug for one of this applications. Turns out I was sometimes showing the progress bar for applications that had
status: 'inprogress'
, it should only be showed for incomplete applications (i.e. withstatus: draft
).This fixes that bug and makes sure we only show the progress bar for incomplete applications.
Checklist:
Summary by CodeRabbit