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

fix(selector): root classname is applied twice #2423

Merged
merged 10 commits into from
Oct 3, 2017
Merged

Conversation

bobylito
Copy link
Contributor

@bobylito bobylito commented Oct 2, 2017

The implementation of the React component Selector was applying the root css
classes that were already applied by the headerfooter. In order to
prevent regressions and let user customize the , this patch adds a new key to customize cssClasses in Selector bases widgets (select), and this new key has the root value to avoid breaking the current implementations. Fix #2396 #2397

Alex S and others added 2 commits October 2, 2017 19:11
The implementation of the React `selector` was applying the root css
classname that is already applied by the headerfooter. In order to
prevent regressions and let user customize the <select>, this patch adds
a new key to customize cssClasses in Selector bases widgets, and this
new key has the root value to avoid breaking the current implementations.

Fix #2396 #2397
@algobot
Copy link
Contributor

algobot commented Oct 2, 2017

Deploy preview ready!

Built with commit 8b5d8fa

https://deploy-preview-2423--algolia-instantsearch.netlify.com

@algobot
Copy link
Contributor

algobot commented Oct 2, 2017

Deploy preview ready!

Built with commit 4274d9b

https://deploy-preview-2423--algolia-instantsearch.netlify.com

Haroenv
Haroenv previously requested changes Oct 3, 2017
Copy link
Contributor

@Haroenv Haroenv left a comment

Choose a reason for hiding this comment

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

you need to update the snapshots I think

@bobylito
Copy link
Contributor Author

bobylito commented Oct 3, 2017

I need push them 🤣

@bobylito
Copy link
Contributor Author

bobylito commented Oct 3, 2017

Good thing that we have argos :D

Alex S and others added 3 commits October 3, 2017 11:49
The new cssClasses key so that we check that all 3 can have custom css
classes. Interestingly the key was used but not implemented already :/
@bobylito
Copy link
Contributor Author

bobylito commented Oct 3, 2017

The select was used but not implemented. The change is expected on argos.

@@ -2,7 +2,7 @@

exports[`Selector should render <Selector/> with numbers 1`] = `
<select
className="custom-root"
className={undefined}
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we update this test to not have undefined inside it? And check if select css class is actually read?

[autoHideContainer=false]
})`;

/**
* @typedef {Object} SortByWidgetCssClasses
* @property {string|string[]} [root] CSS classes added to the parent `<select>`.
* @property {string|string[]} [root] CSS classes added to the outer `<div>`.
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

Copy link
Contributor

@vvo vvo left a comment

Choose a reason for hiding this comment

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

LGTM

@bobylito bobylito merged commit 44dca11 into develop Oct 3, 2017
@bobylito bobylito deleted the fix/select-css-class branch October 3, 2017 12:29
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.

4 participants