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

ExpandableSection - add minHeight #3040

Merged
merged 6 commits into from May 1, 2024

Conversation

M-i-k-e-l
Copy link
Contributor

Description

ExpandableSection - add minHeight

Changelog

ExpandableSection - add minHeight

Additional info

Ticket 4116

/**
* Set a minimum height for the expandableSection
* If the children height is less than the minHeight, the expandableSection will collapse to that height
* If the children height is greater than the minHeight, the expandableSection will result with only the children rendered
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not clear "will result with only the children rendered". Do you mean "no height limit will apply"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added (sectionHeader will not be rendered)

return (
<ScrollView>
<View row center margin-20>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Missing our usual title "ExpandableSection"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Some screens do not have that and we have it in the RNN title

Copy link
Collaborator

Choose a reason for hiding this comment

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

I know, but it's strange the the title is "Minimum Height"...

const toValue = expanded ? height : collapsedHeight;
animatedHeight.value = shouldAnimate ? withTiming(toValue) : toValue;
},
[animatedHeight, expanded, height, minHeight]);
Copy link
Collaborator

Choose a reason for hiding this comment

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

no need to break the line here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is how prettify is indenting for me

Copy link
Collaborator

Choose a reason for hiding this comment

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

Weired

@M-i-k-e-l M-i-k-e-l merged commit 6c84140 into master May 1, 2024
1 check passed
@M-i-k-e-l M-i-k-e-l deleted the feat/expandable-section-add-min-height branch May 1, 2024 12:22
M-i-k-e-l added a commit that referenced this pull request May 1, 2024
* ExpandableSection - add minHeight

* Polish screen

* Fix docs

* Whatever
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.

None yet

2 participants