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

Add grid extension to disable filters submit button when filters are empty #13241

Merged
merged 3 commits into from Apr 10, 2019

Conversation

zuk3975
Copy link
Contributor

@zuk3975 zuk3975 commented Apr 8, 2019

Questions Answers
Branch? develop
Description? Configured grid template to initialize filters search button as "disabled" if filters are empty. Added javascript grid extension to enable the button when inputs are being filled by user.
Type? improvement
Category? BO
BC breaks? no
Deprecations? no
Fixed ticket? #12439
How to test? In all migrated lists, when page is loaded with empty list filters, the filter search button should be disabled and the reset button should be hidden. Once the user starts typing (or selecting) filters, search button should be enabled and reset button is shown. On page load if there is already some filters, the search and reset buttons are also shown and enabled.

This change is Reviewable

@prestonBot prestonBot added develop Branch Improvement Type: Improvement labels Apr 8, 2019
@zuk3975 zuk3975 changed the title [WIP]Grid extension to disable filters submit button when filters are empty Grid extension to disable filters submit button when filters are empty Apr 8, 2019
@prestonBot prestonBot added the Waiting for wording Status: action required, waiting for wording label Apr 8, 2019
@matks matks added Waiting for QA Status: action required, waiting for test feedback and removed Waiting for wording Status: action required, waiting for wording labels Apr 8, 2019
@zuk3975
Copy link
Contributor Author

zuk3975 commented Apr 8, 2019

@matks, ready for judgement. There are still couple things:

  1. The styling slightly differs from products list - when both buttons are shown, in products list search button is lined up with filters, in other lists, buttons are vertically aligned in middle. Not sure which one is better option, but i guess its the second (as it came with new grid).
  2. Search is enabled once something is typed in inputs/selects, but its not disabled after everything is deleted (except when resetting). I am refering to products page, but this behavior doesn't seem right to me.

@marionf marionf self-assigned this Apr 8, 2019
@matks matks added the migration symfony migration project label Apr 8, 2019
@marionf marionf added QA ✔️ Status: check done, code approved and removed Waiting for QA Status: action required, waiting for test feedback labels Apr 9, 2019
@marionf marionf removed their assignment Apr 9, 2019
@prestonBot prestonBot added the Waiting for wording Status: action required, waiting for wording label Apr 9, 2019
@mickaelandrieu
Copy link
Contributor

Hello @zuk3975,

as it is for the next minor we may migrate the products list page at the same time, so don't worry about the difference of behavior between products and the other pages using the Grid component.

Ping @sarjon: is it possible to document and describe every js extension and how to create a new one?
This is something missing in the current docs :(

Mickaël

@mickaelandrieu mickaelandrieu added this to the 1.7.7.0 milestone Apr 10, 2019
@mickaelandrieu mickaelandrieu merged commit 328fddf into PrestaShop:develop Apr 10, 2019
@sarjon
Copy link
Contributor

sarjon commented Apr 10, 2019

is it possible to document and describe every js extension and how to create a new one?

Hey @mickaelandrieu, it is possible. Abracadabra and here we have a good start! PrestaShop/docs#240 🎉 😃

@matks matks removed the Waiting for wording Status: action required, waiting for wording label Apr 10, 2019
@eternoendless eternoendless changed the title Grid extension to disable filters submit button when filters are empty Add grid extension to disable filters submit button when filters are empty Feb 17, 2020
@prestonBot prestonBot added the Waiting for wording Status: action required, waiting for wording label Feb 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
develop Branch Improvement Type: Improvement migration symfony migration project QA ✔️ Status: check done, code approved Waiting for wording Status: action required, waiting for wording
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants