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

[WIP] Simplify product preferences #22471

Conversation

JevgenijVisockij
Copy link
Contributor

Questions Answers
Branch? develop
Description? Simplifies product preferences form
Type? refacto
Category? BO
BC breaks? yes
Deprecations? no
Fixed ticket? Part of #16482
How to test? Simplifying Configuration -> Shop Parameters -> Product Preferences. Everything must look the same aside for help now appearing under inputs instead as blue box, also some fields now will appear as required because they always were.

📓 BC Break
Backwards compatibility break introduced due to extension of TranslationAwareType by PageType and PaginationType. This means if any module extends those types they will get an exception upon upgrading to PS version containing changes in this PR.


This change is Reviewable

@JevgenijVisockij JevgenijVisockij requested a review from a team as a code owner December 17, 2020 14:22
@prestonBot prestonBot added develop Branch Refactoring Type: Refactoring labels Dec 17, 2020
@prestonBot
Copy link
Collaborator

prestonBot commented Dec 17, 2020

@prestonBot prestonBot added the Waiting for wording Status: action required, waiting for wording label Dec 17, 2020
@JevgenijVisockij JevgenijVisockij changed the title Simplify product preferences [WIP] Simplify product preferences Dec 17, 2020
@JevgenijVisockij JevgenijVisockij force-pushed the feature/simplify-product-preferences branch from fa78468 to 9ef1afd Compare December 17, 2020 14:29
@JevgenijVisockij JevgenijVisockij changed the title [WIP] Simplify product preferences Simplify product preferences Dec 17, 2020
@JevgenijVisockij
Copy link
Contributor Author

* button when a product has attributes

I fixed those but does it make sense to Display the "%add_to_cart_label%" button when a product has attributes to be in Admin.Shopparameters.Help when it's a label?

As of "Leave empty to disable." I changed it from "Leave empty to disable" and moved to Admin.Shopparameters.Help as it's part of help now. Is it okay?

Copy link
Contributor

@Julievrz Julievrz left a comment

Choose a reason for hiding this comment

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

* button when a product has attributes

I fixed those but does it make sense to Display the "%add_to_cart_label%" button when a product has attributes to be in Admin.Shopparameters.Help when it's a label?

As of "Leave empty to disable." I changed it from "Leave empty to disable" and moved to Admin.Shopparameters.Help as it's part of help now. Is it okay?

You are right, it is a label so it should be located as a feature. I am currently thinking of adapting the wording here because the label and the tooltip are not complementary. + the feature should be disabled by default and right now it is not. Also, this feature is not available for the classic theme and we're supposed to see a help text "Note that this setting does not work with the default theme anymore." in Admin.Shopparameters.Help (see the specs: https://github.com/PrestaShop/prestashop-specs/blob/master/back-office/shop-parameters/product-settings/product-settings-page.md)

@LouiseBonnard what do you think of the following wording?

Label: "Display the "Add to cart" button when a product has attributes" in Admin.Shopparameters.Feature
Tooltip: "By default, the "Add to cart" button is hidden when a product has attributes. You can choose to have it displayed in all cases." in Admin.Shopparameters.Help
Help text : "Note that this setting does not work with the default theme anymore." in Admin.Shopparameters.Help

matks
matks previously approved these changes Dec 18, 2020
Copy link
Contributor

@matks matks left a comment

Choose a reason for hiding this comment

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

Code is good 👍 waiting for wording decision

@Julievrz
Copy link
Contributor

* button when a product has attributes

I fixed those but does it make sense to Display the "%add_to_cart_label%" button when a product has attributes to be in Admin.Shopparameters.Help when it's a label?
As of "Leave empty to disable." I changed it from "Leave empty to disable" and moved to Admin.Shopparameters.Help as it's part of help now. Is it okay?

You are right, it is a label so it should be located as a feature. I am currently thinking of adapting the wording here because the label and the tooltip are not complementary. + the feature should be disabled by default and right now it is not. Also, this feature is not available for the classic theme and we're supposed to see a help text "Note that this setting does not work with the default theme anymore." in Admin.Shopparameters.Help (see the specs: https://github.com/PrestaShop/prestashop-specs/blob/master/back-office/shop-parameters/product-settings/product-settings-page.md)

@LouiseBonnard what do you think of the following wording?

Label: "Display the "Add to cart" button when a product has attributes" in Admin.Shopparameters.Feature
Tooltip: "By default, the "Add to cart" button is hidden when a product has attributes. You can choose to have it displayed in all cases." in Admin.Shopparameters.Help
Help text : "Note that this setting does not work with the default theme anymore." in Admin.Shopparameters.Help

So I talked about it with @LouiseBonnard and I think we should just keep the help text:

"Note that this setting does not work with the default theme anymore." in Admin.Shopparameters.Help"

and get rid of the tooltip (the feature can be specified in the user documentation if needed)

By default, the feature should be disabled.

@JevgenijVisockij
Copy link
Contributor Author

JevgenijVisockij commented Dec 22, 2020

* button when a product has attributes

I fixed those but does it make sense to Display the "%add_to_cart_label%" button when a product has attributes to be in Admin.Shopparameters.Help when it's a label?
As of "Leave empty to disable." I changed it from "Leave empty to disable" and moved to Admin.Shopparameters.Help as it's part of help now. Is it okay?

You are right, it is a label so it should be located as a feature. I am currently thinking of adapting the wording here because the label and the tooltip are not complementary. + the feature should be disabled by default and right now it is not. Also, this feature is not available for the classic theme and we're supposed to see a help text "Note that this setting does not work with the default theme anymore." in Admin.Shopparameters.Help (see the specs: https://github.com/PrestaShop/prestashop-specs/blob/master/back-office/shop-parameters/product-settings/product-settings-page.md)
@LouiseBonnard what do you think of the following wording?
Label: "Display the "Add to cart" button when a product has attributes" in Admin.Shopparameters.Feature
Tooltip: "By default, the "Add to cart" button is hidden when a product has attributes. You can choose to have it displayed in all cases." in Admin.Shopparameters.Help
Help text : "Note that this setting does not work with the default theme anymore." in Admin.Shopparameters.Help

So I talked about it with @LouiseBonnard and I think we should just keep the help text:

"Note that this setting does not work with the default theme anymore." in Admin.Shopparameters.Help"

and get rid of the tooltip (the feature can be specified in the user documentation if needed)

By default, the feature should be disabled.

Added those changes just to confirm this is what you exepected this setting to look like?

image

@Julievrz
Copy link
Contributor

* button when a product has attributes

I fixed those but does it make sense to Display the "%add_to_cart_label%" button when a product has attributes to be in Admin.Shopparameters.Help when it's a label?
As of "Leave empty to disable." I changed it from "Leave empty to disable" and moved to Admin.Shopparameters.Help as it's part of help now. Is it okay?

You are right, it is a label so it should be located as a feature. I am currently thinking of adapting the wording here because the label and the tooltip are not complementary. + the feature should be disabled by default and right now it is not. Also, this feature is not available for the classic theme and we're supposed to see a help text "Note that this setting does not work with the default theme anymore." in Admin.Shopparameters.Help (see the specs: https://github.com/PrestaShop/prestashop-specs/blob/master/back-office/shop-parameters/product-settings/product-settings-page.md)
@LouiseBonnard what do you think of the following wording?
Label: "Display the "Add to cart" button when a product has attributes" in Admin.Shopparameters.Feature
Tooltip: "By default, the "Add to cart" button is hidden when a product has attributes. You can choose to have it displayed in all cases." in Admin.Shopparameters.Help
Help text : "Note that this setting does not work with the default theme anymore." in Admin.Shopparameters.Help

So I talked about it with @LouiseBonnard and I think we should just keep the help text:
"Note that this setting does not work with the default theme anymore." in Admin.Shopparameters.Help"
and get rid of the tooltip (the feature can be specified in the user documentation if needed)
By default, the feature should be disabled.

Added those changes just to confirm this is what you exepected this setting to look like?

image

Yes, thank you !

Copy link
Contributor

@Julievrz Julievrz left a comment

Choose a reason for hiding this comment

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

The last modification before approving the wording for this PR. Thank you!

@Julievrz Julievrz added the Waiting for author Status: action required, waiting for author feedback label Dec 23, 2020
@JevgenijVisockij
Copy link
Contributor Author

The last modification before approving the wording for this PR. Thank you!

Added those modifications, thanks!

atomiix
atomiix previously approved these changes Jan 4, 2021
@Julievrz Julievrz added Wording ✔️ Status: check done, wording approved and removed Waiting for wording Status: action required, waiting for wording labels Jan 5, 2021
Copy link
Contributor

@Progi1984 Progi1984 left a comment

Choose a reason for hiding this comment

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

A simple question about the configuration change

JevgenijVisockij and others added 10 commits March 13, 2021 11:16
…ctPreferences/GeneralType.php


Removed number from error message

Co-authored-by: Julie Varisellaz <70583503+Julievrz@users.noreply.github.com>
…ctPreferences/GeneralType.php


Removed number from error message

Co-authored-by: Julie Varisellaz <70583503+Julievrz@users.noreply.github.com>
…ctPreferences/GeneralType.php


Removed number from error message

Co-authored-by: Julie Varisellaz <70583503+Julievrz@users.noreply.github.com>
…ctPreferences/GeneralType.php


Removed number from error message

Co-authored-by: Julie Varisellaz <70583503+Julievrz@users.noreply.github.com>
…ctPreferences/PageType.php


Removed number from error message

Co-authored-by: Julie Varisellaz <70583503+Julievrz@users.noreply.github.com>
…ctPreferences/PageType.php


Removed number from error message

Co-authored-by: Julie Varisellaz <70583503+Julievrz@users.noreply.github.com>
…ctPreferences/PaginationType.php


Removed number from error message

Co-authored-by: Julie Varisellaz <70583503+Julievrz@users.noreply.github.com>
…ctPreferences/PaginationType.php


Removed number from error message

Co-authored-by: Julie Varisellaz <70583503+Julievrz@users.noreply.github.com>
@JevgenijVisockij JevgenijVisockij dismissed stale reviews from matks, atomiix, and Progi1984 via 5cfa3d1 March 13, 2021 09:16
@JevgenijVisockij JevgenijVisockij force-pushed the feature/simplify-product-preferences branch from 5ed3a5d to 5cfa3d1 Compare March 13, 2021 09:16
@prestonBot prestonBot added Waiting for wording Status: action required, waiting for wording and removed Wording ✔️ Status: check done, wording approved labels Mar 13, 2021
…/ProductPreferencesController.php


Add then to a translation

Co-authored-by: Julie Varisellaz <70583503+Julievrz@users.noreply.github.com>
@Julievrz Julievrz added Wording ✔️ Status: check done, wording approved and removed Waiting for wording Status: action required, waiting for wording labels Mar 31, 2021
@@ -37,6 +41,10 @@
*/
class GeneralFormDataProvider implements FormDataProviderInterface
{
/** @todo change error to string once invoices PR merged */
Copy link
Contributor

Choose a reason for hiding this comment

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

Which PR is involved ?

@Progi1984
Copy link
Contributor

@JevgenijVisockij Please fix PHPCSFixer

@PierreRambaud
Copy link
Contributor

Hey @JevgenijVisockij
Are you still working on it? Should we close this one?
If no one is working on it, maybe someone from the community is able to finish the job in a new PR?

Kind regards

@PierreRambaud
Copy link
Contributor

Hi @JevgenijVisockij ,

Since we had no news from you for more than 30 days, I'll close this pull request. Feel free to reopen or open another one if you think it's still relevant.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
develop Branch migration symfony migration project Refactoring Type: Refactoring Waiting for author Status: action required, waiting for author feedback Wording ✔️ Status: check done, wording approved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants