Say why an export opened from inside its ZIP has no background - #398
Merged
Merged
Conversation
On Windows, double-clicking index.html inside the ZIP copies that one file to a temporary folder and leaves the frames behind, so the page loads with a black background and nothing to explain it. When every keyframe fails to load, the exported page now shows what happened and what to do. The README said the opposite of what happens: an extracted export opened by double-click paints its frames in Chrome, since they load as images. It now says to extract first.
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Reported with a screenshot: an export of an uploaded clip showed its section headings on a black page. The address bar read AppData\Local\Temp<id>_, which is where Windows puts a file you double-click while still inside a ZIP. It copies that one file and leaves the frames folder behind.
Reproduced in Chrome with the same export in two folders:
The page gave no hint why. When every keyframe of the set being drawn fails to load, the export now shows a notice explaining that the frames folder is not beside the page and that the ZIP needs extracting first, and it stops requesting the rest of the set. A healthy export never shows it. After this change the same two folders give: extracted, background painted and no notice; alone, the notice in view, marked role=alert, and 5 failed requests instead of 14.
The README said the opposite of what happens: that an extracted export opened by double-click would not show its background, because browsers block file:// pages from reading neighbouring files. The frames load as images, which Chrome allows, and the extracted folder above paints. It now tells the owner to extract the whole ZIP first and why.
Tests run the emitted loader against images that all fail and all load, and check the notice appears only in the first case. Both fail against main. Also ran: tsc, eslint, 537 vitest tests, production build.