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

Set minimum width and height for views #25498

Closed
wants to merge 1 commit into from

Conversation

M-i-k-e-l
Copy link

Summary

This can help when creating custom ViewGroups (in native modules).
For example: images need to have size in order to be shown, and if the minimum size (width\height) is not set their size is 0.

Changelog

[Android] [Added] - add setMinWidth and setMinHeight to BaseViewManager.

[CATEGORY] [TYPE] - Message

Test Plan

This can help when creating custom ViewGroups
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 4, 2019
@react-native-bot react-native-bot added Platform: Android Android applications. Type: Enhancement A new feature or enhancement of an existing feature. labels Jul 4, 2019
@osdnk
Copy link
Contributor

osdnk commented Jul 5, 2019

@M-i-k-e-l Shouldn't we drop in from ViewManager then?

@M-i-k-e-l
Copy link
Author

@osdnk What do you mean by "drop in from ViewManager"? Do you mean to move the code to the ViewManager? Because I think the BaseViewManager is more suitable; the ViewManager looks more like an interface.

@makovkastar
Copy link
Contributor

Hello @M-i-k-e-l, thank you for the contribution. Could you please provide a test plan with an example when this might be useful? As far as I can see we already have minWidth and minHeight properties supported.

@osdnk
Copy link
Contributor

osdnk commented Jul 16, 2019

Frankly speaking, I don't understand this PR. Can you add some text / gifs / screenshots / snack?

Copy link
Contributor

@shergin shergin left a comment

Choose a reason for hiding this comment

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

(min|max)(Width/Height) (and all layout styles) must be consumed by Yoga only.

@shergin shergin closed this Jul 18, 2019
facebook-github-bot pushed a commit that referenced this pull request Oct 18, 2022
Summary:
This sync includes the following changes:
- **[54f297a60](facebook/react@54f297a60 )**: Enable useMemoCacheHook for ReactNative-fb build ([#25498](facebook/react#25498)) //<Jan Kassens>//

Changelog:
[General][Changed] - React Native sync for revisions 9fb581c...54f297a

jest_e2e[run_all_tests]

Reviewed By: poteto

Differential Revision: D40435957

fbshipit-source-id: f447f50d80298e2c3e8be09ff52b1bedcfe6d402
OlimpiaZurek pushed a commit to OlimpiaZurek/react-native that referenced this pull request May 22, 2023
Summary:
This sync includes the following changes:
- **[54f297a60](facebook/react@54f297a60 )**: Enable useMemoCacheHook for ReactNative-fb build ([facebook#25498](facebook/react#25498)) //<Jan Kassens>//

Changelog:
[General][Changed] - React Native sync for revisions 9fb581c...54f297a

jest_e2e[run_all_tests]

Reviewed By: poteto

Differential Revision: D40435957

fbshipit-source-id: f447f50d80298e2c3e8be09ff52b1bedcfe6d402
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Platform: Android Android applications. Type: Enhancement A new feature or enhancement of an existing feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants