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

Added Divider component #88

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Added Divider component #88

wants to merge 4 commits into from

Conversation

forman
Copy link
Member

@forman forman commented Dec 18, 2024

Addresses #41

@forman forman requested a review from b-yogesh December 18, 2024 17:24
@forman forman marked this pull request as ready for review December 18, 2024 17:24
Copy link

codecov bot commented Dec 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.91%. Comparing base (46eeb85) to head (9678716).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #88      +/-   ##
==========================================
+ Coverage   87.76%   87.91%   +0.15%     
==========================================
  Files          76       78       +2     
  Lines        1267     1283      +16     
  Branches      197      197              
==========================================
+ Hits         1112     1128      +16     
  Misses        126      126              
  Partials       29       29              
Flag Coverage Δ
backend 100.00% <100.00%> (ø)
frontend 75.39% <100.00%> (+0.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@b-yogesh b-yogesh left a comment

Choose a reason for hiding this comment

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

Looks good. Requested one change about the conditional rendering of children.

flexItem={flexItem}
textAlign={textAlign}
>
<Children nodes={nodes} onChange={onChange} />
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since the nodes are never undefined, because we send an empty array instead, a gap appears in the divider which is not an expected behaviour. The children code can be modified as below

Suggested change
<Children nodes={nodes} onChange={onChange} />
{nodes && nodes.length && <Children nodes={nodes} onChange={onChange} />}

@b-yogesh b-yogesh assigned b-yogesh and unassigned b-yogesh Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants