Gravatar

Ryan Hollister

Sr. Director


Tecton 1.0 Upgrade Guide

Follow these steps to refactor your code for Tecton 1.0. These deprecations have been around for more than a year so it is most likely that no action will be required on your part, but just in case here is each refactor step by step.

IE Support is deprecated

This requires no code change but if your extension still supports IE then it cannot upgrade. If you are ready to drop IE continue with the steps below.

showAlert Options have changed

  1. If you were using showAlert Type "danger" you need to change it to "error" it will visually look the same.
    //OLD
    showAlert({
        styleType: 'danger'
    });

    //NEW
    showAlert({
        styleType: 'error
    });
  1. If you are using the option "msg" in showAlert you must change it to "message" it will work the same as before.
    //OLD
    showAlert({
        msg: 'Warning your funds are low'
    });

    //NEW
    showAlert({
        message: 'Warning your funds are low'
    });

sendOverpanel is now removed use showOverpanel

  1. If you have been using sendOverpanel update the name to showOverpanel. The arguments and functionality remain the same.

    
     //OLD
      sendOverpanel('myWorkflow');
    
    
      //NEW
      showOverpanel('myWorkflow');
    

Params$ Behavior Subject no longer available on connect()

  1. If you were using the params$ variable returned from the connect promise it is no longer available. Instead you must use the paramsChanged source providing it a call back. Tecton now handles this subscription teardown for you by taking a callback instead of exposing a RXJS BehaviorSubject.

     //OLD
     connect().then(capabilities => {
         //At some point you would have to tear this down
         const paramSubscription = capabilities.params$.subscribe(params => {
             //do something with params
         });
     });
    
    
     //NEW
     connect().then(capabilities => {
         capabilities.sources.paramsChanged(params => {
             //do something with params
         });
     });
    

Method t() is now removed use loc()

  1. Same method first name was ridiculous. We have no good excuse.
//OLD
capabilities.sources.t('_.t.my_localized_string');

//NEW
capabilities.sources.loc('_.t.my_localized_string');

Thank you!

Thanks for upgrading to the latest and using this guide. Let us know if there is something we missed or anything you would like to see in the future by opening a ticket on the Q2 Developer Portal or emailing me at daniel.chappell@q2ebanking.com.