From b545d089393ac54ed0fc2b5dd8f09bf209746705 Mon Sep 17 00:00:00 2001 From: claude Date: Wed, 17 Jun 2026 11:12:50 +0000 Subject: [PATCH] Fix four reported bugs: typst export 500, export shown for all project types, Lumiere tile button layout, i18n MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - ConversionController.js: add typst to CONVERSION_CONFIGS (missing entry caused 400→500 chain) - export-project-with-conversion-button: hide button for non-LaTeX projects (typst/quarto) via compiler check - project-list-lumiere.tsx + scss: revert lumiere-card-actions back inside .lumiere-card (put them back like they were) Co-Authored-By: Claude Sonnet 4.6 --- services/clsi/app/js/ConversionController.js | 3 ++- .../export-project-with-conversion-button.tsx | 8 ++++++- .../components/project-list-lumiere.tsx | 24 +++++++++---------- .../pages/project-list-lumiere.scss | 20 +++------------- 4 files changed, 23 insertions(+), 32 deletions(-) diff --git a/services/clsi/app/js/ConversionController.js b/services/clsi/app/js/ConversionController.js index 5790c2764c..f1c69d7fae 100644 --- a/services/clsi/app/js/ConversionController.js +++ b/services/clsi/app/js/ConversionController.js @@ -25,6 +25,7 @@ const CONVERSION_CONFIGS = { docx: { extension: 'docx' }, markdown: { extension: 'zip' }, html: { extension: 'zip' }, + typst: { extension: 'typ' }, } async function convertDocumentToLaTeX(req, res) { @@ -34,7 +35,7 @@ async function convertDocumentToLaTeX(req, res) { await fs.unlink(path).catch(() => {}) return res.sendStatus(404) } - if (!conversionType || !['docx', 'markdown'].includes(conversionType)) { + if (!conversionType || !['docx', 'markdown', 'typst'].includes(conversionType)) { await fs.unlink(path).catch(() => {}) return res.sendStatus(400) } diff --git a/services/web/frontend/js/features/ide-react/components/toolbar/export-project-with-conversion-button.tsx b/services/web/frontend/js/features/ide-react/components/toolbar/export-project-with-conversion-button.tsx index 804cc4cbf7..d8aa288841 100644 --- a/services/web/frontend/js/features/ide-react/components/toolbar/export-project-with-conversion-button.tsx +++ b/services/web/frontend/js/features/ide-react/components/toolbar/export-project-with-conversion-button.tsx @@ -6,6 +6,7 @@ import { useCommandProvider } from '../../hooks/use-command-provider' import OLDropdownMenuItem from '@/shared/components/ol/ol-dropdown-menu-item' import { useRootDoc } from '@/shared/hooks/use-root-doc' import { useEditorManagerContext } from '@/features/ide-react/context/editor-manager-context' +import { useProjectSettingsContext } from '@/features/editor-left-menu/context/project-settings-context' type ExportProjectWithConversionProps = { featureFlag?: string @@ -22,6 +23,8 @@ export const ExportProjectWithConversionButton: FC< const enablePandocConversions = getMeta('ol-ExposedSettings')?.enablePandocConversions const anonymous = getMeta('ol-anonymous') + const { compiler } = useProjectSettingsContext() + const isLatexProject = !['typst', 'quarto'].includes(compiler ?? '') const getRootDocInfo = useRootDoc() const { openDocs } = useEditorManagerContext() const downloadConversion = useConvertProject( @@ -31,7 +34,10 @@ export const ExportProjectWithConversionButton: FC< ) const showExportButton = - splitTestEnabledIfNeeded && enablePandocConversions && !anonymous + splitTestEnabledIfNeeded && + enablePandocConversions && + !anonymous && + isLatexProject useCommandProvider( () => diff --git a/services/web/frontend/js/features/project-list/components/project-list-lumiere.tsx b/services/web/frontend/js/features/project-list/components/project-list-lumiere.tsx index 37c2309443..ccb44c0fba 100644 --- a/services/web/frontend/js/features/project-list/components/project-list-lumiere.tsx +++ b/services/web/frontend/js/features/project-list/components/project-list-lumiere.tsx @@ -171,19 +171,17 @@ const ProjectCard = memo(function ProjectCard({ {date} - - {/* Actions live outside .lumiere-card so Popper dropdowns are not - clipped by the card's backdrop-filter / transform context. */} -
- - - {project.compiler === 'quarto' ? ( - - ) : ( - - )} - - +
+ + + {project.compiler === 'quarto' ? ( + + ) : ( + + )} + + +
) diff --git a/services/web/frontend/stylesheets/pages/project-list-lumiere.scss b/services/web/frontend/stylesheets/pages/project-list-lumiere.scss index 8b3a3a462a..e3695f109a 100644 --- a/services/web/frontend/stylesheets/pages/project-list-lumiere.scss +++ b/services/web/frontend/stylesheets/pages/project-list-lumiere.scss @@ -537,28 +537,14 @@ $lum-noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi } } - // Action strip — lives *outside* .lumiere-card so the dropdown menus inside - // are not trapped by the card's backdrop-filter and transform (both of which - // create a new containing block for position:fixed, clipping Popper menus). - // position:absolute on the wrapper (which has no transform/filter) lets any - // position:fixed child escape to the viewport as expected. + // Action strip — icon buttons that fade in when the card is hovered .lumiere-card-actions { - position: absolute; - bottom: 0; - left: 0; - right: 0; - z-index: 2; display: flex; align-items: center; justify-content: center; gap: 2px; padding: 3px 6px 5px; - // Solid background — intentionally no backdrop-filter here, which would - // also create a fixed containing block and trap the Popper dropdown. - background: rgba(255, 255, 255, 0.97); border-top: 1px solid rgba($lum-teal, 0.10); - border-bottom-left-radius: 10px; - border-bottom-right-radius: 10px; opacity: 0; transition: opacity 0.15s ease; @@ -575,8 +561,8 @@ $lum-noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi } } - .lumiere-card-wrapper:hover .lumiere-card-actions, - .lumiere-card-wrapper:focus-within .lumiere-card-actions { + .lumiere-card:hover .lumiere-card-actions, + .lumiere-card:focus-within .lumiere-card-actions { opacity: 1; }