Merge pull request #28589 from overleaf/revert-28283-jdt-monthly-tl-experiment

Revert "Rolling TexLive builds experiment"

GitOrigin-RevId: c3c6833dca7ef0d207f854c93bf0bb03bd814694
This commit is contained in:
Brian Gough
2025-09-19 08:08:15 +00:00
committed by Copybot
parent aaafb86fe2
commit aaa62b2dbc
14 changed files with 62 additions and 171 deletions
@@ -1484,7 +1484,6 @@
"revoke_invite": "",
"right": "",
"role": "",
"rolling_texlive_build": "",
"saml_auth_error": "",
"saml_identity_exists_error": "",
"saml_invalid_signature_error": "",
@@ -1779,7 +1778,6 @@
"test": "",
"test_configuration": "",
"test_configuration_successful": "",
"test_more_recent_versions_of_texlive": "",
"tex_live_version": "",
"texgpt": "",
"thank_you": "",
@@ -11,18 +11,18 @@ export default function SettingsImageName() {
const { imageName, setImageName } = useProjectSettingsContext()
const { write } = usePermissionsContext()
const allowedImageNames = useMemo(() => getMeta('ol-imageNames') || [], [])
const allowedImageNames = useMemo(
() => getMeta('ol-allowedImageNames') || [],
[]
)
const options: Array<Option> = useMemo(
() =>
allowedImageNames
// filter out images that aren't allowed, unless thats the current image the project is on
.filter(image => image.allowed || image.imageName === imageName)
.map(({ imageName, imageDesc }) => ({
value: imageName,
label: imageDesc,
})),
[allowedImageNames, imageName]
allowedImageNames.map(({ imageName, imageDesc }) => ({
value: imageName,
label: imageDesc,
})),
[allowedImageNames]
)
if (allowedImageNames.length === 0) {
@@ -11,21 +11,21 @@ export default function ImageNameSetting() {
const { t } = useTranslation()
const { write } = usePermissionsContext()
const imageNames = useMemo(() => getMeta('ol-imageNames') || [], [])
const allowedImageNames = useMemo(
() => getMeta('ol-allowedImageNames') || [],
[]
)
const options: Array<Option> = useMemo(
() =>
imageNames
// filter out images that aren't allowed, unless thats the current image the project is on
.filter(image => image.allowed || image.imageName === imageName)
.map(({ imageName, imageDesc }) => ({
value: imageName,
label: imageDesc,
})),
[imageNames, imageName]
allowedImageNames.map(({ imageName, imageDesc }) => ({
value: imageName,
label: imageDesc,
})),
[allowedImageNames]
)
if (imageNames.length === 0) {
if (allowedImageNames.length === 0) {
return null
}
@@ -1,44 +0,0 @@
import { useState } from 'react'
import LabsExperimentWidget from '../../shared/components/labs/labs-experiments-widget'
import { isInExperiment } from '@/utils/labs-utils'
import { useTranslation } from 'react-i18next'
import MaterialIcon from '@/shared/components/material-icon'
import { isSplitTestEnabled } from '@/utils/splitTestUtils'
const MonthlyTexliveLabsWidget = ({
labsProgram,
setErrorMessage,
}: {
labsProgram: boolean
setErrorMessage: (err: string) => void
}) => {
const { t } = useTranslation()
const [optedIn, setOptedIn] = useState(isInExperiment('monthly-texlive'))
const monthlyTexLiveSplitTestEnabled = isSplitTestEnabled('monthly-texlive')
if (!monthlyTexLiveSplitTestEnabled) {
return null
}
const logo = (
<MaterialIcon
type="construction"
size="2x"
className="rounded bg-primary-subtle"
/>
)
return (
<LabsExperimentWidget
description={t('test_more_recent_versions_of_texlive')}
experimentName="monthly-texlive"
logo={logo}
labsEnabled={labsProgram}
setErrorMessage={setErrorMessage}
optedIn={optedIn}
setOptedIn={setOptedIn}
title={t('rolling_texlive_build')}
/>
)
}
export default MonthlyTexliveLabsWidget
+1 -1
View File
@@ -2,7 +2,7 @@ import getMeta from './meta'
// Should be `never` when no experiments are active. Otherwise it should be a
// union of active experiment names e.g. `'experiment1' | 'experiment2'`
export type ActiveExperiment = 'monthly-texlive'
export type ActiveExperiment = never
export const isInExperiment = (experiment: ActiveExperiment): boolean => {
const experiments = getMeta('ol-labsExperiments')
+2 -2
View File
@@ -5,7 +5,7 @@ import { UserSettings } from '../../../types/user-settings'
import { OAuthProviders } from '../../../types/oauth-providers'
import { ExposedSettings } from '../../../types/exposed-settings'
import {
type ImageName,
type AllowedImageName,
OverallThemeMeta,
type SpellCheckLanguage,
} from '../../../types/project-settings'
@@ -80,6 +80,7 @@ export interface Meta {
'ol-algolia': AlgoliaConfig | undefined
'ol-allInReconfirmNotificationPeriods': UserEmailData[]
'ol-allowedExperiments': string[]
'ol-allowedImageNames': AllowedImageName[]
'ol-anonymous': boolean
'ol-baseAssetPath': string
'ol-brandVariation': Record<string, any>
@@ -162,7 +163,6 @@ export interface Meta {
owned?: boolean
}[]
'ol-i18n': { currentLangCode: string }
'ol-imageNames': ImageName[]
'ol-inactiveTutorials': string[]
'ol-institutionEmailNonCanonical': string | undefined
'ol-institutionLinked': InstitutionLink | undefined