static/src/javascripts/projects/common/modules/identity/sign-in-gate/README.md
All sign in gate AB tests and designs should be logged in the Sign In Gate Variants Directory spreadsheet in the Identity team drive.
AB tests runs should also be added to the Identity calendar.
When making changes to a test, for example adding a new variant, it is worth modifying the id of the test to seperate it out from the previous test.
To do this you have to modify a few files files:
static/src/javascripts/projects/common/modules/experiments/tests/sign-in-gate.js change the id parameter of the testcommon/app/conf/switches/ABTestSwitches.scala, under the switch for the sign in gate, change the first parameter by turning the id in the file above into a kebab-case string with ab- appended at the front, e.g. SignInGateTertius would turn into ab-sign-in-gate-tertiusstatic/src/javascripts/projects/common/modules/identity/sign-in-gate/sign-in-gate.spec.js update the common/modules/experiments/ab mock to reflect the new test tooconcurrentTests array: static/src/javascripts/projects/common/modules/experiments/ab-tests.jsexample.js file in the ./variants folder, have the name of the file reflect the variant name, e.g. control.js.example in const name = 'example' to the new variant namehtmlTemplate method to return the new template for the variantcanShow method, this method determines if the test can be shown on that page view for that variantshow method to run anything thats needed to get the gate to show, e.g. setting the template, adding click handlers etc.SignInGateVariant type, which is an object that exports name, canShow, and show../variants/index.js, and add it to the export tests array. From this point on the variant will be able to be used.## Styling the gate
CSS for the gate lives at static/src/stylesheets/module/identity/_sign-in-gate.scss, modify or add anything here.