frontend validation

This commit is contained in:
EthanHealy01 2025-12-04 20:25:56 +00:00
parent be67e66bac
commit ec784a2620
3 changed files with 25 additions and 14 deletions

View File

@ -6015,6 +6015,21 @@ description = "When enabled, the editor exports each edited text box as one PDF
[pdfTextEditor.options.advanced]
title = "Advanced Settings"
[pdfTextEditor.tooltip.header]
title = "Preview Limitations"
[pdfTextEditor.tooltip.textFocus]
title = "Text and Image Focus"
text = "This workspace focuses on editing text and repositioning embedded images. Complex page artwork, form widgets, and layered graphics are preserved for export but are not fully editable here."
[pdfTextEditor.tooltip.previewVariance]
title = "Preview Variance"
text = "Some visuals (such as table borders, shapes, or annotation appearances) may not display exactly in the preview. The exported PDF keeps the original drawing commands whenever possible."
[pdfTextEditor.tooltip.alpha]
title = "Alpha Viewer"
text = "This alpha viewer is still evolving—certain fonts, colours, transparency effects, and layout details may shift slightly. Please double-check the generated PDF before sharing."
[pdfTextEditor.manual]
mergeTooltip = "Merge selected boxes"
merge = "Merge selection"

View File

@ -13,8 +13,6 @@ import {
Stack,
Switch,
Text,
Title,
Tooltip as MantineTooltip,
} from '@mantine/core';
import { useTranslation } from 'react-i18next';
import AutorenewIcon from '@mui/icons-material/Autorenew';
@ -25,7 +23,7 @@ import FileDownloadIcon from '@mui/icons-material/FileDownloadOutlined';
import { PdfTextEditorViewData, TextGroup } from '@app/tools/pdfTextEditor/pdfTextEditorTypes';
import { pageDimensions } from '@app/tools/pdfTextEditor/pdfTextEditorUtils';
import FontStatusPanel from '@app/components/tools/pdfTextEditor/FontStatusPanel';
import ToolStep, { ToolStepProvider } from '@app/components/tools/shared/ToolStep';
import ToolStep from '@app/components/tools/shared/ToolStep';
import { usePdfTextEditorTips } from '@app/components/tooltips/usePdfTextEditorTips';
import { Tooltip } from '@app/components/shared/Tooltip';
import LocalIcon from '@app/components/shared/LocalIcon';

View File

@ -304,8 +304,6 @@ const analyzePageContentType = (groups: TextGroup[], pageWidth: number): boolean
return isParagraphPage;
};
type GroupingMode = 'auto' | 'paragraph' | 'singleLine';
const PdfTextEditorView = ({ data }: PdfTextEditorViewProps) => {
const { t } = useTranslation();
const { activeFiles } = useFileContext();
@ -366,14 +364,14 @@ const PdfTextEditorView = ({ data }: PdfTextEditorViewProps) => {
dirtyPages,
hasDocument,
hasVectorPreview,
fileName,
fileName: _fileName,
errorMessage,
isGeneratingPdf,
isSavingToWorkbench,
isGeneratingPdf: _isGeneratingPdf,
isSavingToWorkbench: _isSavingToWorkbench,
isConverting,
conversionProgress,
hasChanges,
forceSingleTextElement,
hasChanges: _hasChanges,
forceSingleTextElement: _forceSingleTextElement,
groupingMode: externalGroupingMode,
autoScaleText,
requestPagePreview,
@ -382,11 +380,11 @@ const PdfTextEditorView = ({ data }: PdfTextEditorViewProps) => {
onGroupDelete,
onImageTransform,
onImageReset,
onReset,
onGeneratePdf,
onReset: _onReset,
onGeneratePdf: _onGeneratePdf,
onSaveToWorkbench,
onForceSingleTextElementChange,
onGroupingModeChange,
onForceSingleTextElementChange: _onForceSingleTextElementChange,
onGroupingModeChange: _onGroupingModeChange,
onMergeGroups,
onUngroupGroup,
onLoadFile,