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

Components/toast-notification #96

Closed
wants to merge 2 commits into from
Closed

Components/toast-notification #96

wants to merge 2 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Jun 24, 2019

related to #86

@ghost ghost changed the title feat(components): toast-notification Components/toast-notification Jun 24, 2019
@VictorAtPL
Copy link
Contributor

VictorAtPL commented Aug 7, 2019

Answer below.

Hi,

How to use this?

I've added such code into my component:

                <Toast isShow={errorShow} position={"bottom"}>
                    Cośtam jakośtam.
                </Toast>

After I set errorShow on other button click to true, app crashes (no log showed in React Native Debugger).

In adb logcat I've found:

08-07 18:50:30.630 10626 10664 E unknown:ViewManager: Error while updating prop position
08-07 18:50:30.630 10626 10664 E unknown:ViewManager: java.lang.reflect.InvocationTargetException
08-07 18:50:30.630 10626 10664 E unknown:ViewManager: 	at java.lang.reflect.Method.invoke(Native Method)
08-07 18:50:30.630 10626 10664 E unknown:ViewManager: 	at com.facebook.react.uimanager.ViewManagersPropertyCache$PropSetter.updateShadowNodeProp(ViewManagersPropertyCache.java:107)
08-07 18:50:30.630 10626 10664 E unknown:ViewManager: 	at com.facebook.react.uimanager.ViewManagerPropertyUpdater$FallbackShadowNodeSetter.setProperty(ViewManagerPropertyUpdater.java:156)
08-07 18:50:30.630 10626 10664 E unknown:ViewManager: 	at com.facebook.react.uimanager.ViewManagerPropertyUpdater.updateProps(ViewManagerPropertyUpdater.java:60)
08-07 18:50:30.630 10626 10664 E unknown:ViewManager: 	at com.facebook.react.uimanager.ReactShadowNodeImpl.updateProperties(ReactShadowNodeImpl.java:319)
08-07 18:50:30.630 10626 10664 E unknown:ViewManager: 	at com.facebook.react.uimanager.UIImplementation.createView(UIImplementation.java:265)
08-07 18:50:30.630 10626 10664 E unknown:ViewManager: 	at com.facebook.react.uimanager.UIManagerModule.createView(UIManagerModule.java:463)
08-07 18:50:30.630 10626 10664 E unknown:ViewManager: 	at java.lang.reflect.Method.invoke(Native Method)
08-07 18:50:30.630 10626 10664 E unknown:ViewManager: 	at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372)
08-07 18:50:30.630 10626 10664 E unknown:ViewManager: 	at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:158)
08-07 18:50:30.630 10626 10664 E unknown:ViewManager: 	at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
08-07 18:50:30.630 10626 10664 E unknown:ViewManager: 	at android.os.Handler.handleCallback(Handler.java:873)
08-07 18:50:30.630 10626 10664 E unknown:ViewManager: 	at android.os.Handler.dispatchMessage(Handler.java:99)
08-07 18:50:30.630 10626 10664 E unknown:ViewManager: 	at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29)
08-07 18:50:30.630 10626 10664 E unknown:ViewManager: 	at android.os.Looper.loop(Looper.java:193)
08-07 18:50:30.630 10626 10664 E unknown:ViewManager: 	at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:232)
08-07 18:50:30.630 10626 10664 E unknown:ViewManager: 	at java.lang.Thread.run(Thread.java:764)
08-07 18:50:30.630 10626 10664 E unknown:ViewManager: Caused by: com.facebook.react.bridge.JSApplicationIllegalArgumentException: invalid value for position: top
08-07 18:50:30.630 10626 10664 E unknown:ViewManager: 	at com.facebook.react.uimanager.LayoutShadowNode.setPosition(LayoutShadowNode.java:745)
08-07 18:50:30.630 10626 10664 E unknown:ViewManager: 	... 17 more
08-07 18:50:30.633 10626 10664 E unknown:ReactNative: Exception in native call
08-07 18:50:30.633 10626 10664 E unknown:ReactNative: com.facebook.react.bridge.JSApplicationIllegalArgumentException: Error while updating property 'position' in shadow node of type: RCTView
08-07 18:50:30.633 10626 10664 E unknown:ReactNative: 	at com.facebook.react.uimanager.ViewManagersPropertyCache$PropSetter.updateShadowNodeProp(ViewManagersPropertyCache.java:121)
08-07 18:50:30.633 10626 10664 E unknown:ReactNative: 	at com.facebook.react.uimanager.ViewManagerPropertyUpdater$FallbackShadowNodeSetter.setProperty(ViewManagerPropertyUpdater.java:156)
08-07 18:50:30.633 10626 10664 E unknown:ReactNative: 	at com.facebook.react.uimanager.ViewManagerPropertyUpdater.updateProps(ViewManagerPropertyUpdater.java:60)
08-07 18:50:30.633 10626 10664 E unknown:ReactNative: 	at com.facebook.react.uimanager.ReactShadowNodeImpl.updateProperties(ReactShadowNodeImpl.java:319)
08-07 18:50:30.633 10626 10664 E unknown:ReactNative: 	at com.facebook.react.uimanager.UIImplementation.createView(UIImplementation.java:265)
08-07 18:50:30.633 10626 10664 E unknown:ReactNative: 	at com.facebook.react.uimanager.UIManagerModule.createView(UIManagerModule.java:463)
08-07 18:50:30.633 10626 10664 E unknown:ReactNative: 	at java.lang.reflect.Method.invoke(Native Method)
08-07 18:50:30.633 10626 10664 E unknown:ReactNative: 	at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372)
08-07 18:50:30.633 10626 10664 E unknown:ReactNative: 	at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:158)
08-07 18:50:30.633 10626 10664 E unknown:ReactNative: 	at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
08-07 18:50:30.633 10626 10664 E unknown:ReactNative: 	at android.os.Handler.handleCallback(Handler.java:873)
08-07 18:50:30.633 10626 10664 E unknown:ReactNative: 	at android.os.Handler.dispatchMessage(Handler.java:99)
08-07 18:50:30.633 10626 10664 E unknown:ReactNative: 	at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29)
08-07 18:50:30.633 10626 10664 E unknown:ReactNative: 	at android.os.Looper.loop(Looper.java:193)
08-07 18:50:30.633 10626 10664 E unknown:ReactNative: 	at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:232)
08-07 18:50:30.633 10626 10664 E unknown:ReactNative: 	at java.lang.Thread.run(Thread.java:764)
08-07 18:50:30.633 10626 10664 E unknown:ReactNative: Caused by: java.lang.reflect.InvocationTargetException
08-07 18:50:30.633 10626 10664 E unknown:ReactNative: 	at java.lang.reflect.Method.invoke(Native Method)
08-07 18:50:30.633 10626 10664 E unknown:ReactNative: 	at com.facebook.react.uimanager.ViewManagersPropertyCache$PropSetter.updateShadowNodeProp(ViewManagersPropertyCache.java:107)
08-07 18:50:30.633 10626 10664 E unknown:ReactNative: 	... 15 more
08-07 18:50:30.633 10626 10664 E unknown:ReactNative: Caused by: com.facebook.react.bridge.JSApplicationIllegalArgumentException: invalid value for position: top
08-07 18:50:30.633 10626 10664 E unknown:ReactNative: 	at com.facebook.react.uimanager.LayoutShadowNode.setPosition(LayoutShadowNode.java:745)
08-07 18:50:30.633 10626 10664 E unknown:ReactNative: 	... 17 more

I had to change some code, unfortunately no diff (forgot to push your patch firstly, before introducing my changes) for now.

VictorAtPL added a commit to VictorAtPL/galio that referenced this pull request Aug 8, 2019
@palingheorghe
Copy link
Collaborator

Hi @VictorAtPL , I've seen you've pushed a commit to your fork of Galio. Have you managed to solve this issue?
@extenss could you help us with using this component?

Thanks everybody ❤️

@VictorAtPL
Copy link
Contributor

@palingheorghe
Yes, I am using the modified version of this Pull Request in my app, which is in alpha stage right now, although I haven't tested it inside out.

I can prepare a patch tomorrow.

@palingheorghe
Copy link
Collaborator

That'd be great @VictorAtPL ! I'm trying to push forward the development of this version, we need to get to v0.6 and help more people ❤️

Alin

VictorAtPL added a commit to VictorAtPL/galio that referenced this pull request Aug 14, 2019
VictorAtPL added a commit to VictorAtPL/galio that referenced this pull request Aug 14, 2019
@VictorAtPL
Copy link
Contributor

VictorAtPL commented Aug 14, 2019

@palingheorghe
Ok, I've pulled @extenss Pull Request and applied my fixes. You can see changes here: VictorAtPL@ea42b00

I could open new pull request, but I don't want to steal @extenss code. :)

Basically the position attribute must be changed and styles attribute must be added (styling was not working without it).

@palingheorghe
Copy link
Collaborator

@VictorAtPL
I don't think you're stealing anybody's code, I'm pretty sure he's getting credited for whatever he has written. Could you please open up a PR with your new code?

@VictorAtPL
Copy link
Contributor

@palingheorghe I opened #112.

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