-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: Add tus data to ecc-utils-design-form on upload #388
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
🦋 Changeset detectedLatest commit: 1613b89 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
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 |
Reviewer's Guide by SourceryThis PR modifies the file upload handling in the EccUtilsDesignForm component to properly return and store TUS (resumable upload protocol) data after a successful file upload. The implementation includes returning upload metadata, updating form data, and improving the handling of required fields validation. Sequence diagram for TUS file upload processsequenceDiagram
actor User
participant Form as EccUtilsDesignForm
participant Server
User->>Form: Select file for upload
Form->>Server: Initialize TUS upload
Server-->>Form: Upload URL
Form->>Server: Upload file
Server-->>Form: Upload success
Form->>Form: Return upload data
Form->>Form: Update form data
Form->>User: Notify upload success
Updated class diagram for EccUtilsDesignFormclassDiagram
class EccUtilsDesignForm {
-handleTusFileUpload(Event, Field) Promise<Record<string, string> | null>
-renderInputTemplate(Field, string) TemplateResult
-render()
-requiredButEmpty: string[]
+alertFieldChange(string, Record<string, string>)
}
note for EccUtilsDesignForm "handleTusFileUpload now returns upload data or null"
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @SalihuDickson - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider using a proper TypeScript interface instead of 'any' for the upload data object to maintain better type safety
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟡 Complexity: 1 issue found
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
hey @anuragxxd, can you please take a look at this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! Just a small comment!
Description
Fixes #387
Checklist
Comments
Summary by Sourcery
Fix the TUS file upload handling in the ecc-utils-design-form component to return upload data and update form state accordingly. Enhance the management of required fields and document the changes with a new changeset file.
Bug Fixes:
Enhancements:
Chores: