It would be great if we could use rules to define which strategy to use in which cases.

For this, we would need to add a new event when we load the strategy list - and then various actions to prioritize the strategy (eg: setFirst, removeAllStrategies)

That way the user could use conditions provided by Rules to define which strategy should be executed.

-----

Compatibility with Rules latest dev but need patch in #3141206: Updating event context after the rule's execution

Comments

vdsh created an issue. See original summary.

vdsh’s picture

Issue summary: View changes

  • vdsh committed 4ae462f on 2.0.x
    Issue #3139144: Prioritize strategies with Rules
    
vdsh’s picture

This module now provides an integration with Rules in 2.0.1 (using the patch from #3141206: Updating event context after the rule's execution):
- an event 'Before choosing the JS Delay Strategy'
- 2 actions 'Set a strategy for this page (if existing)' or 'Remove JS Strategies for this page'.
- 2 conditions:
- 'Is admin route'
- 'Current route'

I have attached rules using those actions & conditions as examples.

vdsh’s picture

Status: Active » Fixed
vdsh’s picture

Issue summary: View changes

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.