-
Notifications
You must be signed in to change notification settings - Fork 168
MAGE-986 Configurable no-code redirects #1740
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
MAGE-986 Configurable no-code redirects #1740
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job here 👏
Unit tests are passing (with a little bit of tweaking as explained in the comments) !
Also tested manually and it's also working overall.
Splitting the ConfigHelper makes definitely a lot of sense, very good initiative !
f81a47b
to
5fbac83
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All good for me ! 🚀
Just an optional HTML change for the checkboxes if you want to, but this is good to merge as it is !
$checked ? 'checked' : '' | ||
); | ||
$html .= '<div class="form-content">'; | ||
$html .= sprintf('<label>%s</label>',$label ?? $name); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not mandatory, but maybe we would want the label
to be clickable to check the related checkbox with a for
property related to an id
property on the input
? Feel free to ignore if you want to move on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a great idea and I neglected to do it. Thanks for raising it! Will amend.
Summary
This PR provides configurability for the redirect features added for both Autocomplete and InstantSearch.
onSubmit
handler was identified with the Autocomplete plugin so state was added to the Autocomplete UI component to track when redirects are retrieved on the product sourcenavigator
object has been added toautocomplete.js
UI component to facilitate customization / overriding of URL navigation behaviors.ConfigHelper
problem by splitting out domain specific config helpers for both Autocomplete and InstantSearchSerializer
service for composability and to prevent circular dependencies between helpersResult
Autocomplete configuration

Redirect only on submit


Redirect with selectable menu item


Redirect with selectable menu item and matching hits


InstantSearch configuration

Redirect with selectable item

Unit tests
