Conversation
🦋 Changeset detectedLatest commit: 7d9507f The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
| }, | ||
| () => issues | ||
| () => issues, | ||
| (path) => deep_get(upload_progress, path) ?? { uploaded: 0, total: 0 } |
There was a problem hiding this comment.
maybe set total: 1 here to protect people from dividing by zero?
|
paging @Rich-Harris to see if this can go out with #14775 :-) |
| uploaded: 0, | ||
| total: 0 | ||
| }) /* upload progress is always 0 on the server */ |
There was a problem hiding this comment.
Can't this lead to 0/0 issues during SSR? Using your example to calculate the percentage
Update: just saw your comment above, a non-zero SSR total might be good
|
@ottomated Want to resolve the conflicts? I can give it a review after that's done. |
|
@elliott-with-the-longest-name-on-github should be good! |
elliott-with-the-longest-name-on-github
left a comment
There was a problem hiding this comment.
This looks pretty darn good to me. I'll have another maintainer check it as a backup, but I'm pretty excited about it! Just a minor nit to start off
| blob_parts.push(file); | ||
| } | ||
|
|
||
| const file_offset_start = 1 + 4 + 2 + encoded_header.length + encoded_file_offsets.length; |
There was a problem hiding this comment.
| const file_offset_start = 1 + 4 + 2 + encoded_header.length + encoded_file_offsets.length; | |
| const file_offset_start = HEADER_BYTES + encoded_header.length + encoded_file_offsets.length; |
|
Some thoughts on API below... Responding to this: #14878 (comment) Alternatively, could we provide a Additionally, does |
|
We discussed this today and I think Rich and Simon will be stopping by to take a look, but overall: We definitely think there should be a precalculated "percentage complete" property, and we'd all prefer if |
|
I would love it to be an accessor but the established pattern (.value, .issues) is a function call. This might be related to the whole proxy thing that allows fields to be named |
see #14773
Builds on #14775 to use XHRs for file upload progress in forms:
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm testand lint the project withpnpm lintandpnpm checkChangesets
pnpm changesetand following the prompts. Changesets that add features should beminorand those that fix bugs should bepatch. Please prefix changeset messages withfeat:,fix:, orchore:.Edits