Skip to content
  • Nicholas Ray's avatar
    54313bce
    Make amcOutreach/promoCampaign support more workflows · 54313bce
    Nicholas Ray authored
    In order to support T226069, we need to add additional functionality to
    this code. Namely clients now need to be able to:
    
    * Pass in a callback function, `onBeforeHide`, when calling
    `showIfEligible`, which will execute when the user dismisses the drawer.
    For example, the client can now show an overlay or navigate to another
    page after the user dismisses the drawer.
    
    * Pass in a page title to redirect to if the user enables AMC. If the
    user enabled AMC through the drawer prior to this commit, they would
    simply get redirected back to the same page. Now clients can specify
    other pages that the user should be sent to.
    
    * Pass in query params to add to the redirected page url if the user
    enables AMC. This will be used by the history link which needs the
    `action=history` query param and will be used by the talk link which adds
    an anchor '#/Talk' to open the talk modal.
    
    Additional changes:
    
    * SpeicalMobileOptions.php now supports `returntoquery` query params for
    redirection.
    
    * More actions were added to amcOutreach.js which will be used in
    I0cce0bb6f44801c383556f8c26ee865032d86c8a
    
    * Code to open drawer during page load was removed from mobile.init.js
    as we not longer are doing this.
    
    * Storybook files were updated to reflect new method signatures
    
    * package.json size limits were updated. (mobile.startup.js seems to
    have drifted from its actual value).
    
    Bug: T226069
    Change-Id: I399dd70b5b93fda8c6d1735e3861c5ab2da43bdb
    54313bce
    Make amcOutreach/promoCampaign support more workflows
    Nicholas Ray authored
    In order to support T226069, we need to add additional functionality to
    this code. Namely clients now need to be able to:
    
    * Pass in a callback function, `onBeforeHide`, when calling
    `showIfEligible`, which will execute when the user dismisses the drawer.
    For example, the client can now show an overlay or navigate to another
    page after the user dismisses the drawer.
    
    * Pass in a page title to redirect to if the user enables AMC. If the
    user enabled AMC through the drawer prior to this commit, they would
    simply get redirected back to the same page. Now clients can specify
    other pages that the user should be sent to.
    
    * Pass in query params to add to the redirected page url if the user
    enables AMC. This will be used by the history link which needs the
    `action=history` query param and will be used by the talk link which adds
    an anchor '#/Talk' to open the talk modal.
    
    Additional changes:
    
    * SpeicalMobileOptions.php now supports `returntoquery` query params for
    redirection.
    
    * More actions were added to amcOutreach.js which will be used in
    I0cce0bb6f44801c383556f8c26ee865032d86c8a
    
    * Code to open drawer during page load was removed from mobile.init.js
    as we not longer are doing this.
    
    * Storybook files were updated to reflect new method signatures
    
    * package.json size limits were updated. (mobile.startup.js seems to
    have drifted from its actual value).
    
    Bug: T226069
    Change-Id: I399dd70b5b93fda8c6d1735e3861c5ab2da43bdb
Loading