-
Notifications
You must be signed in to change notification settings - Fork 150
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
feat(Dialog): use MDC Foundation with Dialogs #177
Conversation
Thanks for this! I’ll take a look tonight. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead I using componentWillRecieveProps, checkout how I’ve been using syncWithProps on the Slider and IconToggle.
Just looking on my phone at the moment so I can’t validate but this is the general gist of it.
This creates a react component Class that is quite literally merged with the vanilla js class from mdc so any and all functionality that exists on it is inherited. The trick is to see what the vanilla js class is already doing and work with it or around it.
Changed it to Some other issues I am having:
|
@j-o-d-o Check out MDC 34 branch and #179. I just implemented the Select component with foundation. A few relevant things that I came across:
|
Alright, sounds and looks good. I will merge this branch into the mdc34. I am still not 100% sure how to add custom RMWC events that are not included in the MDC adapter, but I will fiddle around some tonight. |
@j-o-d-o sorry, not trying to steal your thunder but I thought being able to show you how close you were would help. See this commit 3a072b2. Granted, things are still a bit in flux, I added a tad bit of functionality to the MDCFoundation class for this, but you get the gist. Controlling updating props (in this case the open prop), and patching the foundation adapters that need to be changed. Here I just grabbed the two event methods, duplicated them and added the onClose handler in there. |
Also, thank you so much for answering peoples questions on issues! It's a massive help. |
Ah okay, no worries ;) Implementation looks good and makes sense. Always glad to help! |
To get used to new "foundation way" I tried to convert the Dialog component. I am not sure if a missed some (or a lot).
If I missed too much it's not a problem if we close the PR and you do the conversion which might be faster in that case! At worst it was a good exercise for me ; )