-
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(application-system): empty title for formStepper #15185
Conversation
WalkthroughThe changes in Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant FormStepper
participant UI
User->>FormStepper: Load FormStepper
FormStepper->>UI: Map child elements and sections
alt Text content is valid
UI->>User: Render child elements and sections
else Text content is null
UI->>User: Skip rendering for null text elements
end
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 as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
Datadog ReportAll test runs ✅ 5 Total Test Services: 0 Failed, 5 Passed Test Services
🔻 Code Coverage Decreases vs Default Branch (1)
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #15185 +/- ##
==========================================
- Coverage 36.98% 36.98% -0.01%
==========================================
Files 6419 6419
Lines 130969 130974 +5
Branches 37497 37498 +1
==========================================
Hits 48439 48439
- Misses 82530 82535 +5
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 1 file with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
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: 3
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (1)
- libs/application/ui-shell/src/components/FormStepper.tsx (2 hunks)
Additional context used
Path-based instructions (1)
libs/application/ui-shell/src/components/FormStepper.tsx (1)
Pattern
libs/**/*
: "Confirm that the code adheres to the following:
- Reusability of components and hooks across different NextJS apps.
- TypeScript usage for defining props and exporting types.
- Effective tree-shaking and bundling practices."
Biome
libs/application/ui-shell/src/components/FormStepper.tsx
[error] 68-68: Avoid using the index of an array as key property in an element. (lint/suspicious/noArrayIndexKey)
This is the source of the key value.
The order of the items may change, and this also affects performances and component state.
Check the React documentation.
[error] 104-104: Avoid using the index of an array as key property in an element. (lint/suspicious/noArrayIndexKey)
This is the source of the key value.
The order of the items may change, and this also affects performances and component state.
Check the React documentation.
Additional comments not posted (1)
libs/application/ui-shell/src/components/FormStepper.tsx (1)
100-119
: Ensure conditional rendering logic is robust and maintainable.The implementation of conditional rendering based on the presence of
sectionTitle
is clear and aligns with the PR objectives to handle null text content effectively.Tools
Biome
[error] 104-104: Avoid using the index of an array as key property in an element. (lint/suspicious/noArrayIndexKey)
This is the source of the key value.
The order of the items may change, and this also affects performances and component state.
Check the React documentation.
* fix: empty title for formStepper * fix: use the constant I defined --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
* fix: empty title for formStepper * fix: use the constant I defined --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
What
Don't render out steps in the formStepper if the title is empty
Why
To have the same behaviour as the discontinued core formStepper
Screenshots / Gifs
Previously:
![Screenshot 2024-06-11 at 12 50 04](https://private-user-images.githubusercontent.com/25332655/338599146-aa4da081-e1ed-4811-8af2-aaae323012fd.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyNTkwMDcsIm5iZiI6MTczOTI1ODcwNywicGF0aCI6Ii8yNTMzMjY1NS8zMzg1OTkxNDYtYWE0ZGEwODEtZTFlZC00ODExLThhZjItYWFhZTMyMzAxMmZkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjExVDA3MjUwN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTU3MTJmYmFkYWU0OTU1ZjRiNTViMWU4NDA0YjhjNTIyZDZiMzBkNzUzZDk2MWNkNzY3N2IwYzFhZjViZTVjZmEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.yZ9UQ95kCMXadABbexTPus15_aKNj5Pfm4HvM7gs5Iw)
Now:
![image](https://private-user-images.githubusercontent.com/25332655/338599258-9728ffaa-123f-4f2c-9866-4a743e88d096.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyNTkwMDcsIm5iZiI6MTczOTI1ODcwNywicGF0aCI6Ii8yNTMzMjY1NS8zMzg1OTkyNTgtOTcyOGZmYWEtMTIzZi00ZjJjLTk4NjYtNGE3NDNlODhkMDk2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjExVDA3MjUwN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWU4MzkzY2YzZTJmNjExNTY4ZjRmMTc0ZDZmYmUyMTA3YzMyNzM4YzBlMTUxM2U3NjExYjU0OTE5OWMwYmJjYmEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.K-Twmi8SsTPkf6xOoi6bPl2vbVDV-o0H0FZs7sp39Yo)
Checklist:
Summary by CodeRabbit
FormStepper
component to handle cases where text elements are null, ensuring proper conditional rendering based on the presence of valid text content.