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

Fix StyleSheet 'textAlign' for AndroidTextInput. Closes #2702 #4481

Closed
wants to merge 6 commits into from
Closed

Fix StyleSheet 'textAlign' for AndroidTextInput. Closes #2702 #4481

wants to merge 6 commits into from

Conversation

hyugit
Copy link

@hyugit hyugit commented Dec 1, 2015

change setTextAlign and setTextAlignVertical to receive argument of type String (the same as in StyleSheet), so that native props and stylesheet props are calling the same @ReactMethod

  • add demo (may not be necessary)

change `setTextAlign` and `setTextAlignVertical` to receive argument of type `String`, so that native props and stylesheet props are calling the same @ReactMethod

- add demo (may not be necessary)
@facebook-github-bot
Copy link
Contributor

By analyzing the blame information on this pull request, we identified @mkonicek, @foghina and @kmagiera to be potential reviewers.

@facebook-github-bot facebook-github-bot added GH Review: review-needed CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. labels Dec 1, 2015
@@ -59,6 +61,24 @@
private static final String KEYBOARD_TYPE_NUMERIC = "numeric";
private static final InputFilter[] EMPTY_FILTERS = new InputFilter[0];

private static final Map<String, Map<String, Integer>> TEXT_ALIGN_CONSTANTS;
static {
Copy link
Contributor

Choose a reason for hiding this comment

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

you don't need a static block for this, you can just continue with this assignment on the line above

@mkonicek
Copy link
Contributor

mkonicek commented Dec 2, 2015

Thanks for the review @kmagiera!

remove textAlign and textAlignVertical from Android native props
add textAlignVertical as Text Style Prop (Android only)
add TEXT_ALIGN_VERTICAL as a view prop constant
@facebook-github-bot
Copy link
Contributor

@trave7er updated the pull request.

@hyugit
Copy link
Author

hyugit commented Dec 7, 2015

@kmagiera , I updated the diff based on your comments.

Some highlights of updates:

  • removed the use of HashMap
  • removed Android native props for textAlign & textAlignVertical
  • added textAlignVertical to TextStyleProps
  • added TEXT_ALIGN_VERTICAL constant to ViewProps

Let me know what you think. Thanks,

@kmagiera
Copy link
Contributor

kmagiera commented Dec 8, 2015

This looks very good. Thanks @trave7er !

I believe this should be marked as a breaking change and someone should update callsites in Fb internal apps. What needs to be done is just to move textAlign and textVerticalAlign out of view props and to the styles object cc @mkonicek

@mkonicek
Copy link
Contributor

mkonicek commented Dec 9, 2015

Adding to my TODO-list of PRs.

@hyugit
Copy link
Author

hyugit commented Dec 11, 2015

was going to also update the docs, and found it's already updated. Thanks!

Let me know if you need me to update anything,

@hyugit
Copy link
Author

hyugit commented Dec 17, 2015

@mkonicek @kmagiera a quick note, I named the prop "textAlignVertical" instead of "textVerticalAlign", do you want me to change it?

@satya164 satya164 changed the title Fix StyleSheet 'textAlign' for AndroidTextInput Fix StyleSheet 'textAlign' for AndroidTextInput. Closes #2702 Dec 24, 2015
@satya164
Copy link
Contributor

@trave7er I think textAlignVertical is better.

@GantMan
Copy link
Contributor

GantMan commented Jan 6, 2016

👍 on this one. I was able to put off the "Android Version" of an app to 2016, but I'd love :shipit: soon.

@christopherdro
Copy link
Contributor

@trave7er Can you resolve the merge conflicts so we can try and get this merged in?

Added Hyper-V Android Emulator Setup Instructions. Closes #3234
Huang Yu added 3 commits January 10, 2016 14:49
change `setTextAlign` and `setTextAlignVertical` to receive argument of type `String`, so that native props and stylesheet props are calling the same @ReactMethod

- add demo (may not be necessary)
remove textAlign and textAlignVertical from Android native props
add textAlignVertical as Text Style Prop (Android only)
add TEXT_ALIGN_VERTICAL as a view prop constant
@facebook-github-bot
Copy link
Contributor

@trave7er updated the pull request.

@hyugit
Copy link
Author

hyugit commented Jan 10, 2016

@christopherdro updated

@gr4yscale
Copy link

just ran into this issue myself - hoping this gets merged today!

@jsierles
Copy link
Contributor

@trave7er Could you also squash commits?

@mkonicek
Copy link
Contributor

Actually I think shipit squashes the commits, let's try it:

@facebook-github-bot shipit

@facebook-github-bot
Copy link
Contributor

Thanks for importing. If you are an FB employee go to https://our.intern.facebook.com/intern/opensource/github/pull_request/1662384200706003/int_phab to review.

@mkonicek
Copy link
Contributor

Yup, looks squashed, landing now :)

@gr4yscale
Copy link

Any news on this?

@mkonicek
Copy link
Contributor

I need to fix an internal failing test, will cherry-pick this to 0.19.

@mkonicek
Copy link
Contributor

Merging again now. Please don't update the PR :)

@ghost ghost closed this in f453e14 Jan 21, 2016
@mkonicek
Copy link
Contributor

🚀

mkonicek pushed a commit that referenced this pull request Jan 29, 2016
Summary:
change `setTextAlign` and `setTextAlignVertical` to receive argument of type `String` (the same as in `StyleSheet`), so that native props and stylesheet props are calling the same ReactMethod

- add demo (may not be necessary)
Closes #4481

Reviewed By: svcscm

Differential Revision: D2823456

Pulled By: mkonicek

fb-gh-sync-id: 349d17549f419b5bdc001d70b583423ade06bfe8
This pull request was closed.
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants