Add feature flag for displaying trigger filters
[MAILPOET-5257]
This commit is contained in:
@@ -3,6 +3,7 @@ import { useSelect } from '@wordpress/data';
|
|||||||
import { storeName } from '../../../store';
|
import { storeName } from '../../../store';
|
||||||
import { FiltersPanel } from '../../filters';
|
import { FiltersPanel } from '../../filters';
|
||||||
import { StepCard } from '../../step-card';
|
import { StepCard } from '../../step-card';
|
||||||
|
import { MailPoet } from '../../../../../mailpoet';
|
||||||
|
|
||||||
function StepSidebarGeneralError(): JSX.Element {
|
function StepSidebarGeneralError(): JSX.Element {
|
||||||
const { errors } = useSelect(
|
const { errors } = useSelect(
|
||||||
@@ -63,7 +64,8 @@ export function StepSidebar(): JSX.Element {
|
|||||||
key={selectedStep.id}
|
key={selectedStep.id}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{selectedStep.type === 'trigger' && <FiltersPanel />}
|
{MailPoet.FeaturesController.isSupported('automation_filters') &&
|
||||||
|
selectedStep.type === 'trigger' && <FiltersPanel />}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@@ -7,12 +7,14 @@ use MailPoetVendor\Doctrine\DBAL\Exception\TableNotFoundException;
|
|||||||
class FeaturesController {
|
class FeaturesController {
|
||||||
const LANDINGPAGE_AB_TEST_DEBUGGER = 'landingpage_ab_test_debugger';
|
const LANDINGPAGE_AB_TEST_DEBUGGER = 'landingpage_ab_test_debugger';
|
||||||
const FEATURE_BRAND_TEMPLATES = 'brand_templates';
|
const FEATURE_BRAND_TEMPLATES = 'brand_templates';
|
||||||
|
const AUTOMATION_FILTERS = 'automation_filters';
|
||||||
|
|
||||||
// Define feature defaults in the array below in the following form:
|
// Define feature defaults in the array below in the following form:
|
||||||
// self::FEATURE_NAME_OF_FEATURE => true,
|
// self::FEATURE_NAME_OF_FEATURE => true,
|
||||||
private $defaults = [
|
private $defaults = [
|
||||||
self::LANDINGPAGE_AB_TEST_DEBUGGER => false,
|
self::LANDINGPAGE_AB_TEST_DEBUGGER => false,
|
||||||
self::FEATURE_BRAND_TEMPLATES => false,
|
self::FEATURE_BRAND_TEMPLATES => false,
|
||||||
|
self::AUTOMATION_FILTERS => false,
|
||||||
];
|
];
|
||||||
|
|
||||||
/** @var array|null */
|
/** @var array|null */
|
||||||
|
Reference in New Issue
Block a user