Skip to content

Feat/incubator dialog support size and custom header #1846

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

Closed

Conversation

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

@M-i-k-e-l M-i-k-e-l commented Feb 14, 2022

Description

Incubator.Dialog - support width, height (including percentage) and customHeader.
Add FadedScrollView - auto scroll according to content + fader.
I've added height={'40%'} to the screen, you can change to a number \ to width etc.
As we've discussed, I am not very fond of the useSizeStyle solution, but did not find a better solution for the percentage part.

Changelog

Incubator.Dialog - support width, height (including percentage), customHeader and FadedScrollView (auto scroll according to content + fader).

const renderContent = () => {
if (enable) {
return (
<FadedScrollView {...otherScrollableProps} useGesture showEndFader endFaderProps={FADER_PROPS}>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why the dialog need to contain a scrollview and the fader logic?
The Dialog should be a simple container that can render anything..

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think we had this request at some point, and we have this functionality in private's ActionSheet, I thought it'll be better to implement here for all Dialogs. What's the drawback?

@@ -0,0 +1,65 @@
import {isUndefined} from 'lodash';
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this hook meant to convert string percentages to numbers?
Cause react-native already supports string percentages

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is what I've talked with you about; RN does have this functionality, but it does not work because of the different views in the Dialog, I did not find a way to not break other things and have this work 😞

Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's go over it together maybe we can find a solution

@M-i-k-e-l M-i-k-e-l requested a review from ethanshar February 22, 2022 10:17
@stale
Copy link

stale bot commented Apr 23, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Apr 23, 2022
@stale stale bot closed this May 1, 2022
@M-i-k-e-l M-i-k-e-l deleted the feat/incubator-dialog-support-size-and-custom-header branch May 26, 2022 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants