Skip to content

support passing screen width for the hint container #510

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

Merged
merged 2 commits into from
Aug 27, 2019

Conversation

ethanshar
Copy link
Collaborator

this is for the tablet support

/**
* The Screen width for the hint container
*/
screenWidth: PropTypes.number,
Copy link
Collaborator

@Inbal-Tish Inbal-Tish Aug 25, 2019

Choose a reason for hiding this comment

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

I don't understand why you need screenWidth prop? You don't want to listen to orientation change in the component?

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 for the tablet support with the custom margins
because we define a custom screen width (in private, the margin make the screen shorter), I need a way to declare this width cause the hint container is based on that.

Copy link
Collaborator

Choose a reason for hiding this comment

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

We read the screen width from the Constants. Why not make the treatment there? That changes the way other components layout for landscape.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

because in the private code the screen width in tablets is different because of the custom margins we have. I need a way to pass this value from the private repo

Copy link
Collaborator

Choose a reason for hiding this comment

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

Why not get it in onLayout? It should be called in orientation change as well.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

renamed screenWidth to containerWidth

@ethanshar ethanshar requested a review from Inbal-Tish August 26, 2019 06:35
@Inbal-Tish Inbal-Tish merged commit dd12b94 into master Aug 27, 2019
@ethanshar ethanshar deleted the feat/hint_screenWidth branch December 11, 2019 18:59
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