elementor/core/experiments
Robert Ferentz b743e62f44
Internal: Improve popup display rules. [ED-24353] (#36156)
<!--start_gitstream_placeholder-->
###  PR Description
## 1. Problem & Context

Refactoring popup/promotion display logic to respect a new feature flag
(`e_panel_promotions`) that gates experimental sticky promotion
rendering in the editor panel. Centralizes promotion data fetching and
improves layout stability.

## 2. What Changed (Where)

- **experiments/manager.php**: Added `e_panel_promotions` hidden feature
flag (dev status, active by default)
- **core/utils/promotions/filtered-promotions-manager.php**: Extracted
sticky promotion data fetching into dedicated method
- **includes/widget-base.php**: Conditional `upsale_data` assignment
based on feature flag
- **editor-templates/panel-elements.php**: Extracted inline sticky
promotion markup into separate template file
- **modules/promotions/module.php**: Added filter to inject sticky
promotion data into editor settings when feature active
- **editor-editing-panel components & panel.php**: Integrated React
component for sticky promotion; added flex layout adjustments
- **assets/dev/scss/editor/panel/panel.scss**: Enhanced sticky
positioning styles with flex container support
- **packages/types/global.d.ts**: Added TypeScript typing for
`editingPanelStickyPromotion`

## 3. How It Works

Feature flag gates upsale data flow: when `e_panel_promotions` is
active, widget upsale data is nullified (line 383), promotion data
instead flows through settings → React component
(`EditingPanelStickyPromotion`). Sticky promotion template reused in
both legacy Marionette elements view and new editing panel via
`#tmpl-elementor-panel-element-sticky-promotion`. Layout stabilized with
flex column wrapping panel content, positioning sticky promotion at
bottom.

## 4. Risks

Dual rendering path (Marionette/React) could cause promotion duplication
if feature flag toggled mid-session. CSS `:has()` selector lacks IE11
support but acceptable given target audience. Template extraction
assumes `$promotion_data_sticky` available in both scopes—verify
template inclusion contexts.

_Generated by LinearB AI and added by gitStream._
<sub>AI-generated content may contain inaccuracies. Please verify before
using.
💡 **Tip:** You can customize your AI Description using **Guidelines**
[Learn
how](https://docs.gitstream.cm/automation-actions/#describe-changes)</sub>
<!--end_gitstream_placeholder-->

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: svitlanadykun <svitlanad@elementor.red>
2026-06-10 15:33:27 +00:00
..
assets/js/admin Fix: Use Intl.ListFormat to format list of dependencies [ED-12179] (#24590) 2023-12-19 14:18:35 +02:00
exceptions Internal: Fixed lint comments [EDS-1186] (#29747) 2025-01-02 16:20:59 +02:00
experiments-reporter.php Internal: Add a badge for cloud experiments [HTS-336] (#21346) 2023-02-26 13:34:06 +02:00
manager.php Internal: Improve popup display rules. [ED-24353] (#36156) 2026-06-10 15:33:27 +00:00
non-existing-dependency.php Internal: Fixed lint comments [EDS-1186] (#29747) 2025-01-02 16:20:59 +02:00
wp-cli.php Internal: Update php coding standard rules - FunctionComment [ED-20572] (#32425) 2025-09-02 14:06:32 +03:00
wrap-core-dependency.php Internal: Fixed lint comments [EDS-1186] (#29747) 2025-01-02 16:20:59 +02:00