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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃枍 Bento: Move Selector to JSS #33018

Merged
merged 4 commits into from Mar 4, 2021
Merged

Conversation

caroqliu
Copy link
Contributor

@caroqliu caroqliu commented Mar 2, 2021

In addition to moving CSS to JSS for the Selector component, this PR also:

  • Allows combo selected and disabled state, thereby aligning closer to the AMP layer
  • Uses obj-str for className computation
  • Modifies tests accordingly

Related to #28282

const optionProps = {
...rest,
className: objstr({
[classes.option]: true,
[classes.selected]: isSelected && !selectorMultiple,
Copy link
Contributor

Choose a reason for hiding this comment

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

I kind of prefer this way, but just calling out that "selected" styles were only set when not disabled before. So just confirming this change is intended.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, thanks for calling this out explicitly. I'll add it to the PR description as well. Also preferred this way and intended to do this, hence why the relevant test cases were modified as well. This is more consistent with AMP layer this way.

@caroqliu caroqliu requested a review from dvoytenko March 3, 2021 14:27
Copy link
Contributor

@krdwan krdwan left a comment

Choose a reason for hiding this comment

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

LGTM

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

5 participants