Skip to content

Refactor: Use DesignInterface for Hyvä Theme Detection in ProductGalleryHelper#135

Open
itaymesh wants to merge 638 commits intocloudinary:masterfrom
studioraz:master
Open

Refactor: Use DesignInterface for Hyvä Theme Detection in ProductGalleryHelper#135
itaymesh wants to merge 638 commits intocloudinary:masterfrom
studioraz:master

Conversation

@itaymesh
Copy link
Copy Markdown

Description:

Overview

This PR updates the ProductGalleryHelper::isHyvaThemeEnabled() method to use DesignInterface instead of ThemeProvider, ensuring accurate detection of Hyvä-based themes, including child themes.

Changes:

  • Replaced ThemeProvider with DesignInterface to align with \Hyva\Theme\Service\CurrentTheme::isHyva().
  • Updated isHyvaThemeEnabled() to check parent themes recursively for better Hyvä theme detection.
  • Injected DesignInterface via constructor to follow Magento's best practices.

Why This Change?

  • Ensures compatibility with Hyvä child themes.
  • Matches Hyvä’s official approach to theme detection.
  • Reduces direct reliance on ThemeProvider and ScopeConfigInterface for theme resolution.

Notes:

  • This change does not affect existing functionality beyond improving Hyvä theme detection.

  • No other parts of the class were refactored to maintain scope.

Pniel (Pini) Cohen added 30 commits March 1, 2021 17:27
…rder to improve support for spaces and other special chars
v1.14.9: Fixed an issue on BulkUpload
arielien and others added 25 commits September 3, 2024 19:51
…reselect first thumb and pushing the new swatches to the start of thumbs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.