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
SearchBox dom breaking change in 2.2.0 and later #1952
Comments
and any migration guide to v3 too 💃 |
Thanks for the detailed explanation we will try that, it was definitely not done on purpose. (And I will write a v3 migration guide too) |
Hi @shakefu, we're sorry for that unwanted breaking change. With this PR #1954 you will be able to get back the translation of Submit/Reset.
Will this work for you? |
@mthuret Yeap. I'll keep an eye on that PR for when it's merged and close this ticket when I get our code updated. |
Migration guide to V3: https://github.com/algolia/instantsearch.js/blob/v2/CHANGELOG.md#migration-guide |
@shakefu The current SearchBox state is that we are now using icons by default for search and reset buttons. So there's no more "translations", if you want to have a reset text button in latest version you can do this: https://jsfiddle.net/6p0ta8op/1/ We might want to revisit the SearchBox component if we have another good complete proposal allowing both text and icons in an easy way where styling is also easily. |
@vvo Thanks! We got ours working, will update to the 3.x line in a sprint or two. |
Do you want to request a feature or report a bug?
Bug.
Bug: What is the current behavior?
In
2.2.0
and later, the SearchBox widget ignores translation strings, shows large icons, and breaks previous rendering as shown below without a major version change, which means packages are automatically upgraded by NPM according to semantic versioning.This backwards-incompatible breaking change is undocumented.
Bug: What is the expected behavior?
In
2.1.0
the SearchBox widget rendered as below, respecting the translation strings as documented. Some of the CSS here (borders, font size) is our theme, but the base is the SearchBox widget's.Bug: What browsers are impacted? Which versions?
All.
What project are you opening an issue for?
What is the version you are using? Always use the latest one before opening a bug issue.
We are forced to pin our version to
<2.2.0
(meaning:2.1.0
) until we find some way to restore the old rendering behavior. An automatic upgrade according to semantic versioning of the default^2.1.0
version string put us on2.2.5
. We were able to narrow it down to the2.2.0
release as introducing this new breaking behavior, most likely PR #1795.Here is a snippet of our code that generated the previous rendering on
2.1.0
and the broken rendering on2.2.0
and later:The text was updated successfully, but these errors were encountered: