Skip to content

v2.0.0

Choose a tag to compare

@Amadeco Amadeco released this 07 Feb 14:20
4a4257b

refactor(quickview)!: modernize codebase to PHP 8.3, remove Helper, optimize JS

Breaking Changes:

  • Removed Amadeco\QuickView\Helper\Data. Any themes or third-party modules relying on this class must be updated to use Amadeco\QuickView\Model\Config.

PHP 8.3 & Architecture:

  • Implement Constructor Property Promotion and readonly properties across all Blocks, Controllers, and Models.
  • Migrate all configuration logic from Helper\Data to a new Model\Config service class to adhere to SOLID principles.
  • Refactor Controller\Cart\Add and Controller\Index\View to extend Action instead of inheriting from complex Catalog/Checkout controllers, reducing coupling.
  • Add strict return typing (e.g., ?ProductInterface) in Block\QuickView.

Frontend & JavaScript:

  • Rewrite amadeco-quickview.js widget to implement IntersectionObserver for lazy loading of QuickView buttons (performance improvement).
  • Improve Modal handling: added _disposeModalContent to properly clean up KnockoutJS bindings and prevent memory leaks.
  • Update container.phtml and layout XMLs to support Bootstrap grid classes (e.g., g-4).
  • Refactor init.phtml to use ViewModel-style configuration passing (getSerializedConfig) instead of inline Helper calls.

Dependencies & Configuration:

  • Update composer.json and module.xml to explicitly declare required dependencies (Magento_Checkout, Magento_Swatches, etc.).
  • Update di.xml to inject Model\Config into Plugins instead of the removed Helper.

Full Changelog: v1.1.0...v2.0.0