From c4d02f45719caf9597b94eabe10f5ebe9f756170 Mon Sep 17 00:00:00 2001 From: Mathias Jakobsen Date: Wed, 3 Dec 2025 12:17:26 +0000 Subject: [PATCH] Merge pull request #30042 from overleaf/mj-workbench-update-labs-widget [web] Update look of labs experiment and tweak workbench labs content GitOrigin-RevId: f7f693f778fb659ccf10a0c440c5c7487705d98e --- .../web/frontend/extracted-translations.json | 4 +- .../labs/labs-experiments-widget.tsx | 38 +++++++++---------- .../frontend/stylesheets/modules/labs.scss | 27 +------------ services/web/locales/en.json | 4 +- 4 files changed, 22 insertions(+), 51 deletions(-) diff --git a/services/web/frontend/extracted-translations.json b/services/web/frontend/extracted-translations.json index 39196c923a..85943ac408 100644 --- a/services/web/frontend/extracted-translations.json +++ b/services/web/frontend/extracted-translations.json @@ -545,6 +545,7 @@ "emails_and_affiliations_explanation": "", "emails_and_affiliations_title": "", "empty": "", + "enable": "", "enable_ai_features": "", "enable_managed_users": "", "enable_single_sign_on": "", @@ -574,7 +575,7 @@ "example_project": "", "existing_plan_active_until_term_end": "", "expand": "", - "experiment_full": "", + "experiment_full_check_back_soon": "", "expired": "", "expired_confirmation_code": "", "expires": "", @@ -1877,7 +1878,6 @@ "this_address_will_be_shown_on_the_invoice": "", "this_could_be_because_we_cant_support_some_elements_of_the_table": "", "this_experiment_gives_you_access_to_new_versions_of_latex": "", - "this_experiment_isnt_accepting_new_participants": "", "this_field_is_required": "", "this_grants_access_to_features_2": "", "this_is_a_new_feature": "", diff --git a/services/web/frontend/js/shared/components/labs/labs-experiments-widget.tsx b/services/web/frontend/js/shared/components/labs/labs-experiments-widget.tsx index c0fdad6aa8..db7ea358e4 100644 --- a/services/web/frontend/js/shared/components/labs/labs-experiments-widget.tsx +++ b/services/web/frontend/js/shared/components/labs/labs-experiments-widget.tsx @@ -1,10 +1,10 @@ import { ReactNode, useCallback } from 'react' import { useTranslation } from 'react-i18next' import OLBadge from '@/shared/components/ol/ol-badge' -import OLTooltip from '@/shared/components/ol/ol-tooltip' import { postJSON } from '@/infrastructure/fetch-json' import OLButton from '@/shared/components/ol/ol-button' import getMeta from '@/utils/meta' +import Notification from '../notification' export type LabsExperimentWidgetProps = { logo: ReactNode @@ -82,9 +82,6 @@ export function LabsExperimentWidget({ )}

- {disabled && ( -
{t('experiment_full')}
- )}
{optedIn && feedbackLink && ( )}
+ {disabled && ( + <> +
+ +
+
+ + )}
) } @@ -129,31 +137,19 @@ function ActionButton({ if (optedIn) { return ( - {t('turn_off')} + {t('disable')} ) } else if (disabled) { - const tooltipableButton = ( -
- - {t('turn_on')} - -
- ) - return ( - - {tooltipableButton} - + + {t('enable')} + ) } else { return ( - {t('turn_on')} + {t('enable')} ) } diff --git a/services/web/frontend/stylesheets/modules/labs.scss b/services/web/frontend/stylesheets/modules/labs.scss index 896643c3cb..e8efc6a55b 100644 --- a/services/web/frontend/stylesheets/modules/labs.scss +++ b/services/web/frontend/stylesheets/modules/labs.scss @@ -44,16 +44,6 @@ align-items: center; padding: var(--spacing-05); - > div { - display: flex; - flex-direction: column; - padding-right: var(--spacing-07); - - &:last-child { - padding-right: 0; - } - } - .experiment-logo-container { padding: var(--image-padding); } @@ -86,16 +76,7 @@ } &.disabled-experiment { - grid-template-columns: var(--image-size) 3fr 1fr auto; - - .disabled-explanation { - color: var(--content-secondary); - } - - h3, - p { - color: var(--content-disabled); - } + grid-template-columns: var(--image-size) 3fr auto auto; } } @@ -106,12 +87,6 @@ } } -.disabled-experiment { - .ai-error-assistant-avatar { - filter: grayscale(0.6); - } -} - .labs-opt-in { .form-group { margin-top: var(--spacing-06); diff --git a/services/web/locales/en.json b/services/web/locales/en.json index 86259b0eaa..321c9b54a7 100644 --- a/services/web/locales/en.json +++ b/services/web/locales/en.json @@ -697,6 +697,7 @@ "empty": "Empty", "empty_zip_file": "Zip doesn’t contain any file", "en": "English", + "enable": "Enable", "enable_ai_features": "Enable AI features", "enable_managed_users": "Enable Managed Users", "enable_single_sign_on": "Enable single sign-on", @@ -741,7 +742,7 @@ "exclusive_access_with_labs": "Exclusive access to early-stage experiments", "existing_plan_active_until_term_end": "Your existing plan and its features will remain active until the end of the current billing period.", "expand": "Expand", - "experiment_full": "Sorry, this experiment is full", + "experiment_full_check_back_soon": "Sorry, this experiment is full. Spaces may become available, so check back soon.", "expired": "Expired", "expired_confirmation_code": "Your confirmation code has expired. Click <0>Resend confirmation code to get a new one.", "expires": "Expires", @@ -2398,7 +2399,6 @@ "this_address_will_be_shown_on_the_invoice": "This address will be shown on the invoice", "this_could_be_because_we_cant_support_some_elements_of_the_table": "This could be because we can’t yet support some elements of the table in the table preview. Or there may be an error in the table’s LaTeX code.", "this_experiment_gives_you_access_to_new_versions_of_latex": "For advanced users only. This experiment gives you regular access to new, untested versions of TeX Live (the LaTeX engine used for compiling). You can then <0>choose this as your compiler on a project-by-project basis. <1>Find out more about rolling TeX Live", - "this_experiment_isnt_accepting_new_participants": "This experiment isn’t accepting new participants.", "this_field_is_required": "This field is required", "this_grants_access_to_features_2": "This grants you access to <0>__appName__ <0>__featureType__ features.", "this_is_a_new_feature": "This is a new feature",