fix: clarify Smart Wearable file size error message#3398
Open
decentraland-bot wants to merge 1 commit into
Open
fix: clarify Smart Wearable file size error message#3398decentraland-bot wants to merge 1 commit into
decentraland-bot wants to merge 1 commit into
Conversation
Route FileType.SMART_WEARABLE to the correct `smart_wearable_too_big` translation key so users see a meaningful title and message explaining that the 3MB limit applies to uncompressed ZIP content, not the ZIP file itself. Update the title in all three locale files (en/es/zh) to make this distinction explicit. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Coverage Report for CI Build 25379527759Coverage remained the same at 49.841%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats💛 - Coveralls |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ImportStep.tsxlacked aFileType.SMART_WEARABLEcase in theFileTooBigErrorBuilderClientswitch statement. Smart wearable upload errors fell through to the genericfile_too_bigdefault — which is a flat string key, not a nested.title/.message— resulting in a blank error title shown to users.FileType.SMART_WEARABLE→smart_wearable_too_big, which already has the correct message explaining the 3 MB limit applies to uncompressed content.smart_wearable_too_big.titlein all three locale files (en/es/zh) to make it explicit that the limit applies to uncompressed content, not the ZIP file itself.Plan
Root Cause Analysis
In
ImportStep.tsx, the switch onerror.getType()had cases forWEARABLE,SKIN,EMOTE, andTHUMBNAIL— but notSMART_WEARABLE. Smart wearable errors fell to:The display block then accesses
create_single_item_modal.error.file_too_big.titleand.message. Butfile_too_bigis a flat string in the JSON (not a nested object), so both resolve to undefined → blank error shown to user.The translation
smart_wearable_too_bigalready existed with the correct.message. Only the.titleneeded updating to distinguish between ZIP size and uncompressed size.Relevant Files
src/components/Modals/CreateSingleItemModal/ImportStep/ImportStep.tsx:218-226— switch statement, addedSMART_WEARABLEcasesrc/modules/translation/languages/en.json:347-350— updatedsmart_wearable_too_big.titlesrc/modules/translation/languages/es.json:346-349— updated Spanish titlesrc/modules/translation/languages/zh.json:340-343— updated Chinese titleChanges
ImportStep.tsx — added explicit case:
en.json — updated title:
Testing
FileType.SMART_WEARABLE = "smart-wearable"exists in@dcl/builder-clientdist typesFileTypeis already imported inImportStep.tsxsmart_wearable_too_bighas the correct.title/.messagenested structure matching the pattern used to build the error display@types/react-router-dommissing) are unrelated to these changesContext
A user uploaded a Smart Wearable ZIP of 2.9 MB (under the 3 MB ZIP limit) but the upload was rejected because the uncompressed content was 3.7 MB. The error shown was blank/misleading.
🤖 Created via Slack with Claude
Requested by Gabriel Díaz via Slack