PrestaShop / PrestaShop

PrestaShop is the universal open-source software platform to build your e-commerce solution.
https://www.prestashop-project.org/
Other
8.11k stars 4.79k forks source link

Finish Migrating Catalog > Attributes & Features > Attribute Group > Add / edit attribute value #33126

Closed MatShir closed 7 months ago

MatShir commented 1 year ago

Part of Symfony migration project

Status

In order to finish the migration of this back-office page, we need to:

Todo List:

Unblocking https://github.com/PrestaShop/PrestaShop/pull/32475

While working on PR https://github.com/PrestaShop/PrestaShop/pull/32475, it was found that a bug in blockwishlist module creates a problem. According to this comment, an exception is thrown when the BO user attempts to delete a Attribute value.

So we cannot migrate the page without fixing this bug in blockwishlist module!

A PR to fix blockwishlist module was submitted here https://github.com/PrestaShop/blockwishlist/pull/226 BUT it could not be tested by QA. This is because when QA team attempts to verify the PR, their tests are hindered by the bug https://github.com/PrestaShop/PrestaShop/issues/32844 . The bug https://github.com/PrestaShop/PrestaShop/issues/32844 prevents the PR to be validated.

So to sum up, in order to unblock PR #32745

About PR https://github.com/PrestaShop/PrestaShop/pull/32475

The PR https://github.com/PrestaShop/PrestaShop/pull/32475 aimed to create a new Symfony backoffice page to replace the legacy page "Catalog > Attributes & Features > Add new / edit attribute Group". The new Symfony page should follow the coding standards we have for all Symfony pages while providing the same behavior that the legacy page. It aims to create an equivalent page, but powered by Symfony and Twig :) .

Just like other Symfony pages, the application layer is Symfony + Twig, but it uses Commands and Queries to fetch and modify data. Command and Query Handlers are adapters that do rely on legacy.

What you must do for PR https://github.com/PrestaShop/PrestaShop/pull/32475 is to fetch it

About the last PR

First Todo List items will be done by multiple PRs merged into develop. So the work of "create a new Symfony page that provides the same behavior/features as the legacy page" will be carried out BUT it is done on a Symfony page not accessible yet in the backoffice. You can browse it if you know the URL. It's like it's hidden.

In order to "finish" the job, a last PR is needed: this is the PR which removes legacy files and enables the LegacyLinks that will redirect old URLs to the new page. So the new Symfony page replaces the legacy page in the back-office. When this is done, the migration is complete.

It is possible QA will find problems when testing the last PR: behaviors that used to work with the legacy page and are not working / implemented in the Symfony page. Then you must fix them.

Please ask @MatShir if you have questions about the behavior or @matks if you have questions about the code

matks commented 1 year ago

Note: if I am not wrong when the 3 issues https://github.com/PrestaShop/PrestaShop/issues/10510 https://github.com/PrestaShop/PrestaShop/issues/10508 https://github.com/PrestaShop/PrestaShop/issues/33126 will be completed, the whole Tab "Catalog > Attributes & Features > Attribute Group" will have been migrated 👍

matks commented 1 year ago

Check-List (copied from https://github.com/PrestaShop/PrestaShop/issues/13989) to help verify new Symfony page is ready

Controller / template

Core

Polishing

Testing

*Eligible = easy to isolate and unit tests provide values (for example testing getters/setters is useless)

matks commented 1 year ago

Thanks to @lartist the situation with module blockwishlist has been fixed. It does not block anymore the PR since version 3.0.1 .

Now we can continue PR https://github.com/PrestaShop/PrestaShop/pull/32475 : Verify it is correct (if not fix wrong items found), have it reviewed (and approved) by committers.

WahbiPS commented 10 months ago

Not the priority for the moment