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

Port to Material UI V1 Beta36 #35

Closed
wants to merge 3 commits into from
Closed

Port to Material UI V1 Beta36 #35

wants to merge 3 commits into from

Conversation

Sunderous
Copy link
Contributor

Greetings. This is my first time submitting a PR, so if I botched anything just let me know and I'll clean it up.

I was thinking of using this with a project, and wanted to use the new material UI, so I took a stab at updating it.

Browser still throws some warning from the material-ui-dots package, but looks like it functions properly in desktop, mobile, and mobile-landscape modes.

Copy link
Member

@leMaik leMaik left a comment

Choose a reason for hiding this comment

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

Very good start! 👍 Inline styles should be changed to using withStyles and JSX. Would you like to do that?

@@ -33,19 +33,22 @@
"babel-cli": "^6.14.0",
"babel-core": "^6.8.0",
"babel-eslint": "^7.2.3",
"babel-plugin-direct-import": "^0.5.0",
"babel-plugin-material-ui": "^0.3.0",
Copy link
Member

Choose a reason for hiding this comment

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

babel-plugin-material-ui is not used anymore and can be removed

@Sunderous
Copy link
Contributor Author

Took a quick look at this yesterday/today. I'm not sure I'll have time in the near future to do this properly (and styling is definitely my weakest area in front-end haha).

It looks like consolidating the inline styles into a stylesheet/classname list that gets passed through withStyles() might be a little tough, especially the computed styles. Could probably make a bunch of separate style names (desktop-root, mobile-root, etc.), and select based on desktop/mobile/landscape.

Might be worth waiting a little bit, after reading: mui/material-ui#8726

It sounds like they're looking into updating how withStyles() works to handle react-jss styles that are dynamic based on their props. Which would greatly simplify handling tweaking the styles based on desktop/mobile/landscape.

If I'm overthinking this, and you had a different approach in mind, or can give me an example of how you'd want to port something non-trivial like:

style={{
          pointerEvents: this.props.open ? null : 'none',
          opacity: this.props.open ? '1' : '0',
          ...this.props.style
        }}

to a withStyles() approach, hit me with it and I can take another look. If I do have some time this week, I might try and do it with the existing withStyles just to see what I come up with.

@Sunderous Sunderous closed this Mar 24, 2018
@Sunderous Sunderous reopened this Mar 24, 2018
@leMaik
Copy link
Member

leMaik commented Mar 25, 2018

@Sunderous The issue you linked is half a year old and closed. 🤔 Don't worry though, I will update the styles if you don't have the time. Your PR is a great start, I'll merge it and start building upon it. 👍

leMaik added a commit that referenced this pull request Mar 25, 2018
@leMaik
Copy link
Member

leMaik commented Mar 25, 2018

GitHub doesn't show it, but I merged this PR manually into the next branch. You'll appear as a contributor there, too. 🎉

@leMaik leMaik closed this Mar 25, 2018
@jaulz
Copy link

jaulz commented Apr 6, 2018

Any chance to push it to NPM? :)

@leMaik
Copy link
Member

leMaik commented Apr 6, 2018

@jaulz The port is not finished, yet. 😕 I'll continue as soon as I have time.

@Asher978
Copy link

any updates? would love to use this.

@leMaik
Copy link
Member

leMaik commented Apr 28, 2018

@Asher978 Not yet done, but it's about 80% there. 👍 See #25

@leMaik
Copy link
Member

leMaik commented Apr 28, 2018

@jaulz @Asher978 Done! 🎉 npm i --save material-auto-rotating-carousel@next. Docs are here on the next branch, let me know what you think. 👍

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.

None yet

4 participants