1
0
mirror of synced 2026-01-19 09:01:40 -05:00

Merge pull request #32893 from github/repo-sync

Repo sync
This commit is contained in:
docs-bot
2024-05-09 10:58:11 -07:00
committed by GitHub
5 changed files with 57 additions and 3 deletions

View File

@@ -29,7 +29,7 @@ For more information about the setup of {% data variables.visual_studio.prodname
## About licenses for {% data variables.visual_studio.prodname_vss_ghec %}
After you assign a license for {% data variables.visual_studio.prodname_vss_ghec %} to a subscriber, the subscriber will use the {% data variables.product.prodname_enterprise %} portion of the license by joining an organization in your enterprise with a personal account on {% data variables.product.prodname_dotcom_the_website %}. If the verified email address for the personal account of an enterprise member on {% data variables.product.prodname_dotcom_the_website %} matches the User Primary Name (UPN) for a subscriber to your {% data variables.product.prodname_vs %} account, the {% data variables.product.prodname_vs %} subscriber will automatically consume one license for {% data variables.visual_studio.prodname_vss_ghec %}.
After you assign a license for {% data variables.visual_studio.prodname_vss_ghec %} to a subscriber, the subscriber will use the {% data variables.product.prodname_enterprise %} portion of the license by joining an organization in your enterprise with a personal account on {% data variables.product.prodname_dotcom_the_website %}. If the verified email address for the personal account of an enterprise member on {% data variables.product.prodname_dotcom_the_website %} matches the User Principal Name (UPN) for a subscriber to your {% data variables.product.prodname_vs %} account, the {% data variables.product.prodname_vs %} subscriber will automatically consume one license for {% data variables.visual_studio.prodname_vss_ghec %}.
{% note %}

View File

@@ -405,7 +405,6 @@ const experiment = {
},
experiment_variation: {
type: 'string',
enum: ['control', 'treatment'],
description: 'The variation this user we bucketed in, such as control or treatment.',
},
experiment_success: {

View File

@@ -0,0 +1,47 @@
/**
* This component tests if the user has a language cookie whose
* value does not match the current URL. For example, the user has,
* at some point, explictitly selected a language in the drop-down
* but is now on a URL whose language prefix is not the same.
* We're curious to see how often this happens in the wild.
*
* This experiment is meant to be temporary. At least until we know and
* have documented how often this happens.
*
*/
import { useEffect } from 'react'
import { useRouter } from 'next/router'
import Cookies from 'js-cookie'
import { sendEvent, EventType } from 'src/events/components/events'
const EXPERIMENT_NAME = 'language_cookie_match'
const COOKIE_KEY = 'user_language'
function sendExperimentResult(desiredLanguage: string, matched: boolean) {
sendEvent({
type: EventType.experiment,
experiment_name: EXPERIMENT_NAME,
experiment_variation: desiredLanguage,
experiment_success: matched,
})
}
export function MeasureLanguageCookieMismatch() {
const { locale } = useRouter()
useEffect(() => {
try {
const cookie = Cookies.get(COOKIE_KEY)
if (cookie) {
sendExperimentResult(cookie, cookie === locale)
}
} catch (error) {
console.error('Error measuring language cookie match', error)
}
}, [locale])
return null
}

View File

@@ -14,6 +14,7 @@ import { ArticleList } from 'src/landings/components/ArticleList'
import { HomePageHero } from 'src/landings/components/HomePageHero'
import type { ProductGroupT } from 'src/landings/components/ProductSelections'
import { ProductSelections } from 'src/landings/components/ProductSelections'
import { MeasureLanguageCookieMismatch } from '../components/MeasureLanguageCookieMatch'
type FeaturedLink = {
href: string
@@ -72,6 +73,7 @@ function HomePage(props: HomePageProps) {
</div>
</div>
</div>
<MeasureLanguageCookieMismatch />
</div>
</div>
)

View File

@@ -6,6 +6,7 @@ import { useRouter } from 'next/router'
import copyCode from 'src/frame/components/lib/copy-code'
import toggleAnnotation from 'src/frame/components/lib/toggle-annotations'
import wrapCodeTerms from 'src/frame/components/lib/wrap-code-terms'
import { MeasureLanguageCookieMismatch } from '../components/MeasureLanguageCookieMatch'
import {
MainContextT,
@@ -109,7 +110,12 @@ const GlobalPage = ({
}
}
return <MainContext.Provider value={mainContext}>{content}</MainContext.Provider>
return (
<MainContext.Provider value={mainContext}>
{content}
<MeasureLanguageCookieMismatch />
</MainContext.Provider>
)
}
export default GlobalPage