Merge pull request #25405 from overleaf/jdt-wf-rebrand-popover

Writefull Rebranded Features Editor Promotion

GitOrigin-RevId: 49beddbfa44bacf1546543e172dc8edcdb3784bc
This commit is contained in:
Jimmy Domagala-Tang
2025-05-12 06:18:36 -04:00
committed by Copybot
parent b99a81cb25
commit 50c2d8f32f
6 changed files with 38 additions and 1 deletions
@@ -13,6 +13,7 @@ const VALID_KEYS = [
'us-gov-banner-fedramp',
'full-project-search-promo',
'editor-popup-ux-survey',
'wf-features-moved',
]
async function completeTutorial(req, res, next) {
+1
View File
@@ -968,6 +968,7 @@ module.exports = {
sourceEditorComponents: [],
pdfLogEntryComponents: [],
pdfLogEntriesComponents: [],
pdfPreviewPromotions: [],
diagnosticActions: [],
sourceEditorCompletionSources: [],
sourceEditorSymbolPalette: [],
@@ -613,6 +613,7 @@
"full_width": "",
"future_payments": "",
"generate_from_text_or_image": "",
"generate_tables_and_equations": "",
"generate_token": "",
"generic_if_problem_continues_contact_us": "",
"generic_linked_file_compile_error": "",
@@ -1053,6 +1054,7 @@
"need_to_leave": "",
"neither_agree_nor_disagree": "",
"new_compile_domain_notice": "",
"new_create_tables_and_equations": "",
"new_file": "",
"new_folder": "",
"new_font_open_dyslexic": "",
@@ -1,4 +1,4 @@
import { memo, Suspense } from 'react'
import { ElementType, memo, Suspense } from 'react'
import classNames from 'classnames'
import PdfLogsViewer from './pdf-logs-viewer'
import PdfViewer from './pdf-viewer'
@@ -11,6 +11,7 @@ import { PdfPreviewProvider } from './pdf-preview-provider'
import PdfPreviewHybridToolbarNew from '@/features/ide-redesign/components/pdf-preview/pdf-preview-hybrid-toolbar'
import PdfErrorState from '@/features/ide-redesign/components/pdf-preview/pdf-error-state'
import { useIsNewEditorEnabled } from '@/features/ide-redesign/utils/new-editor-utils'
import importOverleafModules from '../../../../macros/import-overleaf-module.macro'
function PdfPreviewPane() {
const { pdfUrl, hasShortCompileTimeout } = useCompileContext()
@@ -18,6 +19,10 @@ function PdfPreviewPane() {
'pdf-empty': !pdfUrl,
})
const newEditor = useIsNewEditorEnabled()
const pdfPromotions = importOverleafModules('pdfPreviewPromotions') as {
import: { default: ElementType }
path: string
}[]
return (
<div className={classes}>
@@ -36,6 +41,9 @@ function PdfPreviewPane() {
</div>
</Suspense>
{newEditor ? <PdfErrorState /> : <PdfLogsViewer />}
{pdfPromotions.map(({ import: { default: Component }, path }) => (
<Component key={path} />
))}
</PdfPreviewProvider>
</div>
)
@@ -10,3 +10,26 @@
max-width: 520px;
text-align: left;
}
.feature-rebrand-promo-container {
z-index: 1;
position: absolute;
bottom: 15px;
right: 15px;
background: $bg-dark-primary;
color: $content-primary-dark;
max-width: 450px;
}
.feature-rebrand-promo-title-container {
display: flex;
}
.feature-rebrand-promo-title-text {
color: white;
font-size: 14px;
}
.feature-rebrand-promo-body {
color: white;
}
+2
View File
@@ -813,6 +813,7 @@
"gallery_show_more_tags": "Show more",
"general": "General",
"generate_from_text_or_image": "From text or image",
"generate_tables_and_equations": "Generate tables and equations from text and images. Try it for free in the Overleaf toolbar!",
"generate_token": "Generate token",
"generic_if_problem_continues_contact_us": "If the problem continues please contact us",
"generic_linked_file_compile_error": "This projects output files are not available because it failed to compile. Please open the project to see the compilation error details.",
@@ -1380,6 +1381,7 @@
"need_to_leave": "Need to leave?",
"neither_agree_nor_disagree": "Neither agree nor disagree",
"new_compile_domain_notice": "Weve recently migrated PDF downloads to a new domain. Something might be blocking your browser from accessing that new domain, <0>__compilesUserContentDomain__</0>. This could be caused by network blocking or a strict browser plugin rule. Please follow our <1>troubleshooting guide</1>.",
"new_create_tables_and_equations": "NEW! <sparkle/> Create tables and equations in seconds",
"new_file": "New file",
"new_folder": "New folder",
"new_font_open_dyslexic": "New font: OpenDyslexic Mono is designed to improve readability for those with dyslexia.",