Closed reactoholic closed 4 hours ago
The pull request introduces several changes across multiple components to enhance the rendering logic for displaying counts and activities. The EllipsableWithCount
component now strictly accepts a numeric count
prop, with rendering adjustments to prevent displaying invalid values. The InnovationFlowCollaborationToolsBlock
component updates its props interface and modifies how the activity
prop is displayed. Similarly, the SortDialog
and PostCard
components refine their rendering logic to ensure counts are only displayed when valid and greater than zero. These modifications improve the robustness and clarity of the user interface.
File | Change Summary |
---|---|
src/core/ui/typography/EllipsableWithCount.tsx |
Changed count prop type from ReactNode to number . Updated rendering logic to display count only if it is greater than zero. |
src/domain/collaboration/InnovationFlow/InnovationFlowDialogs/InnovationFlowCollaborationToolsBlock.tsx |
Updated props interface to include innovationFlowStates and currentState . Modified rendering logic to conditionally display activity if greater than zero. |
src/domain/collaboration/callout/calloutBlock/sort/SortDialog.tsx |
Adjusted rendering logic for commentsCount to display only if it is a number and greater than zero. |
src/domain/collaboration/callout/post/PostCard.tsx |
Imported isNumber from lodash . Modified rendering logic for MessageCounter to check if commentsCount is a number and greater than zero before rendering. |
InnovationFlowCollaborationToolsBlock
component involve conditional rendering based on numeric values, similar to the updates made to the count
prop in the EllipsableWithCount
component.UpdateCalloutTemplate
mutation include checks for numeric values, paralleling the numeric validation introduced in the EllipsableWithCount
component's count
prop.FormikCommentInputField
component involve simplifying conditional rendering logic, akin to the robustness improvements made in the EllipsableWithCount
component regarding the count
prop.CalloutView
component's updates include handling different types of callouts, which may involve similar conditional logic as seen in the EllipsableWithCount
component's rendering based on the count
prop.EllipsableWithCount
component's rendering logic.HomePageLayout
component to include the user
object as a dependency for rendering aligns with the focus on ensuring accurate and relevant data display, similar to the changes made in the EllipsableWithCount
component.client
, translations
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?
Updated the type of the count
prop in "src/core/ui/typography/EllipsableWithCount.tsx"
from ReactNode
to number
. This change aligns with its actual usage, as all instances of this component receive a number
type for the count
prop.
Show comments/contributors count only when there are any
Summary by CodeRabbit
New Features
InnovationFlowCollaborationToolsBlock
for improved data flow and functionality.Bug Fixes
Documentation