Skip to content

Conversation

@ad1992
Copy link
Member

@ad1992 ad1992 commented Feb 21, 2024

for #7500
The imports from any image.ts and clipboard.ts leads to importing whole locales file as we are using t.

However in error messages using t doesn't really help so I have replaced it with a hardcoded error message wherever applicable and passing an optional errorMessage param to copyTextToSystemClipboard

@vercel
Copy link

vercel bot commented Feb 21, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
excalidraw ✅ Ready (Inspect) Visit Preview Feb 21, 2024 2:10pm
excalidraw-package-example ✅ Ready (Inspect) Visit Preview Feb 21, 2024 2:10pm
excalidraw-package-example-with-nextjs ✅ Ready (Inspect) Visit Preview Feb 21, 2024 2:10pm
1 Ignored Deployment
Name Status Preview Updated (UTC)
docs ⬜️ Ignored (Inspect) Visit Preview Feb 21, 2024 2:10pm

@github-actions
Copy link

github-actions bot commented Feb 21, 2024

Coverage Report

Status Category Percentage Covered / Total
🔴 Lines 65.04% / 70% 46087 / 70852
🔴 Statements 65.04% / 70% 46087 / 70852
🔴 Functions 66.23% / 68% 1397 / 2109
🟢 Branches 80.1% / 70% 5649 / 7052
File Coverage
File Stmts % Branch % Funcs % Lines Uncovered Lines
Changed Files
excalidraw-app/collab/RoomDialog.tsx 0% 0% 0% 0% 1-218
excalidraw-app/share/ShareDialog.tsx 19.31% 50% 16.66% 19.31% 34-45, 55-184, 187-250, 253-270, 281-290
packages/excalidraw/clipboard.ts 57.88% 73.52% 61.53% 57.88% 53-55, 81-82, 93-94, 96-97, 108-111, 113-114, 136-140, 145-148, 158-163, 174-183, 234-238, 241-293, 325-326, 354-355, 377-404, 407-439, 443-482
packages/excalidraw/actions/actionClipboard.tsx 28.24% 72.72% 45.45% 28.24% 21-42, 52-99, 109-111, 120-157, 168-216, 228-249, 253-258
packages/excalidraw/components/ShareableLinkDialog.tsx 23.33% 100% 0% 23.33% 22-90
packages/excalidraw/data/index.ts 41.5% 100% 50% 41.5% 84-200
packages/excalidraw/element/image.ts 65.32% 72.72% 42.85% 65.32% 18-19, 21-22, 50-51, 63-67, 71, 92-95, 98-124
Generated in workflow #1961

@ad1992 ad1992 requested a review from dwelle February 21, 2024 06:37
@dwelle
Copy link
Member

dwelle commented Feb 21, 2024

However in error messages using t doesn't really help so I have replaced it with hardcoded error message instead of passing a argument errorMsg or something.

It doesn't matter only in the normalizeSVG() case since we rethrow a new error, but it the copyTextToSystemClipboard() is used all over the place and at least in some cases the error is exposed to users (e.g. RoomModal, SVG clipboard export actions...). So we'll have to go through the codebase and rethrow user-facing error messages in places where it matters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants