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

added Glamour and remove Radium in Listbox #757

Closed
wants to merge 3 commits into from

Conversation

huyqdang
Copy link
Contributor

it seems like this is all I have to do, but is it ? Am I missing anything ?

@huyqdang huyqdang requested a review from paniclater July 11, 2018 20:37
@paniclater
Copy link
Collaborator

I believe that this is all you need to do in most components - however there may be some trickier issues around the media queries for breakpoints that may pop up. Most components should be similar to this though.

@paniclater
Copy link
Collaborator

@phantomxc @cerinman @sambev am I correct here?

@paniclater paniclater closed this Jul 11, 2018
@paniclater paniclater reopened this Jul 11, 2018
@paniclater
Copy link
Collaborator

sorry accidentally clicked close 😳

@sambev
Copy link
Contributor

sambev commented Jul 11, 2018

I think this is the general idea, but we do want to be taking a close look at differences, sometimes it isn't always a pure 1:1.

@sambev
Copy link
Contributor

sambev commented Jul 11, 2018

Actually I think you need to change it from style to className

@huyqdang
Copy link
Contributor Author

@sambev Oh my god, thanks Sam. I was stuck for 30 minutes wondering why the styles are jacked up. 🤦‍♂️

@cerinman
Copy link
Contributor

Yes, 1:1 for most cases but as an example, the Drawer component uses break points so we'll have to make sure that is covered.

I would also suggest looking for merged styles. In the case of radium, there where places where we used the radium syntax that will have to be updated to object spread.

Radium syntax

<div style={[styles.item, isSelected && styles.selectedItem]}>

Object spread

<div style={{ ...styles.item, ...isSelected ? styles.selectedItem : {} }}

@@ -106,10 +106,9 @@ class Listbox extends React.Component {
return (
<div
aria-label={this.props['aria-label']}
className='mx-listbox'
className={'mx-listbox' + css({ ...this.props.style })}
Copy link
Contributor

Choose a reason for hiding this comment

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

You shouldn't have to spread this.props.style in a new object here. You should be able to just do.

className={'mx-listbox' + css(this.props.style)}

Copy link
Contributor

Choose a reason for hiding this comment

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

You might even be able to use string interpolation as well

className={`mx-listbox ${css(this.props.style)}`}

@cerinman
Copy link
Contributor

Closing this in favor of pursuing a style sheet for components.

@cerinman cerinman closed this Aug 13, 2018
@cerinman cerinman deleted the hd/rad_to_glam_listbox branch November 8, 2018 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants