Skip to content
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

chore(edit-content): Import From URL for Image Field #30295

Merged
merged 16 commits into from
Oct 10, 2024

Conversation

nicobytes
Copy link
Contributor

@nicobytes nicobytes commented Oct 8, 2024

Parent Issue

#30061

Summary

This pull request includes significant updates to the DotFormImportUrlComponent and its associated store, focusing on improving file upload handling and adding comprehensive unit tests. The most important changes include updating the component and store to handle accepted file types, adding abort functionality for uploads, and enhancing test coverage.

Component and Store Enhancements:

  • Updated the DotFormImportUrlComponent to handle accepted file types and added an abort controller to manage upload cancellations.
  • Modified the FormImportUrlStore to include accepted file types in its state and added methods to initialize setup and handle file uploads with abort functionality.

Unit Tests Enhancements:

  • Added comprehensive unit tests for the DotFormImportUrlComponent, covering initialization, form submission, and upload cancellation scenarios.

  • Added unit tests for the FormImportUrlStore to verify state initialization, setup, and file upload handling.

Minor UI Adjustments:

  • Adjusted the error message and button styles to improve the user interface.

Test Updates for File Field Component:

  • Updated existing tests to use the new uploadFile method instead of uploadDotAsset.

Checklist

  • Tests
  • Translations
  • Security Implications Contemplated (add notes if applicable)

Video

This PR fixes: #30061

@nicobytes nicobytes linked an issue Oct 8, 2024 that may be closed by this pull request
@nicobytes nicobytes marked this pull request as ready for review October 9, 2024 21:41
@nicobytes nicobytes changed the title chore(edit-content): Validate proper files #30061 chore(edit-content): Import From URL for Image Field Oct 10, 2024
@nicobytes nicobytes added this pull request to the merge queue Oct 10, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 10, 2024
@nicobytes nicobytes added this pull request to the merge queue Oct 10, 2024
Merged via the queue into main with commit 434f28e Oct 10, 2024
20 checks passed
@nicobytes nicobytes deleted the 30061-image-field-import-from-url-functionality branch October 10, 2024 19:27
spbolton pushed a commit that referenced this pull request Nov 11, 2024
## Parent Issue

#30061 

## Summary

This pull request includes significant updates to the
`DotFormImportUrlComponent` and its associated store, focusing on
improving file upload handling and adding comprehensive unit tests. The
most important changes include updating the component and store to
handle accepted file types, adding abort functionality for uploads, and
enhancing test coverage.

### Component and Store Enhancements:

* Updated the `DotFormImportUrlComponent` to handle accepted file types
and added an abort controller to manage upload cancellations.
* Modified the `FormImportUrlStore` to include accepted file types in
its state and added methods to initialize setup and handle file uploads
with abort functionality.

### Unit Tests Enhancements:

* Added comprehensive unit tests for the `DotFormImportUrlComponent`,
covering initialization, form submission, and upload cancellation
scenarios.

* Added unit tests for the `FormImportUrlStore` to verify state
initialization, setup, and file upload handling.

### Minor UI Adjustments:

* Adjusted the error message and button styles to improve the user
interface.

### Test Updates for File Field Component:

* Updated existing tests to use the new `uploadFile` method instead of
`uploadDotAsset`.

### Checklist
- [x] Tests
- [x] Translations
- [x] Security Implications Contemplated (add notes if applicable)

### Video
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.

Image Field: "Import from URL" functionality
3 participants