Removed the hightlight-sso-2 split test, Re-order login SSO options & remove ShareLaTeX wording (#9984)

* removed the hgihlight-sso-2 split test

* added the correct variant

* removed the if else condition

* renamed the file _registration_sso_highlight_sso_variant.pug  to _registration_sso.pug

* replaced with home-registration

* Swapped translations and deleted one

* removed shareLatex login text from login page and related translations that were being used only once in this code snippet

* renamed a file name while rendering it and deleted the unsuded file. and replaced a string with error variable for message

* added event segmentation back

* swapped two lines

* removed event-segemntation from one file

GitOrigin-RevId: d99de42215e9f6034f618c47dbd47fa7a4913efa
This commit is contained in:
Davinder Singh
2022-10-24 11:42:21 +01:00
committed by Copybot
parent 6820e8741d
commit aa009c1e78
8 changed files with 3 additions and 34 deletions

View File

@@ -44,30 +44,18 @@ module.exports = HomeController = {
async home(req, res) {
if (Features.hasFeature('homepage') && homepageExists) {
try {
const highlightSSOAssignment =
await SplitTestHandler.promises.getAssignment(
req,
res,
'highlight-sso-2'
)
const homeRegistration = await SplitTestHandler.promises.getAssignment(
req,
res,
'home-registration'
)
const highlightSSO = highlightSSOAssignment.variant === 'active'
const removeRegistration = homeRegistration.variant
return res.render('external/home/v2', {
highlightSSO,
removeRegistration,
})
} catch (err) {
logger.error(
{ err },
"error fetching 'highlight-sso-2' split test assignment"
)
logger.error({ err }, err.message)
return res.render('external/home/v2', {
highlightSSO: false,
removeRegistration: 'default',
})
}

View File

@@ -38,18 +38,12 @@ async function _addAffiliation(user, affiliationOptions) {
async function recordRegistrationEvent(user) {
try {
const highlightSSOAssignment =
await SplitTestHandler.promises.getAssignmentForUser(
user._id,
'highlight-sso-2'
)
const homeRegistrationAssignment =
await SplitTestHandler.promises.getAssignmentForUser(
user._id,
'home-registration'
)
const segmentation = {
highlightSSO: highlightSSOAssignment.variant === 'active',
'home-registration': homeRegistrationAssignment.variant,
}
if (user.thirdPartyIdentifiers && user.thirdPartyIdentifiers.length > 0) {