-
Notifications
You must be signed in to change notification settings - Fork 467
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
feat(edit-content): create new file functionality on File Fields #30391
Merged
nicobytes
merged 17 commits into
main
from
29875-file-field-create-new-file-functionality
Oct 24, 2024
Merged
feat(edit-content): create new file functionality on File Fields #30391
nicobytes
merged 17 commits into
main
from
29875-file-field-create-new-file-functionality
Oct 24, 2024
Conversation
This file contains 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
…ub.com:dotCMS/core into 29875-file-field-create-new-file-functionality
nicobytes
changed the title
29875 file field create new file functionality
feat(edit-content): create new file functionality on File Fields
Oct 23, 2024
oidacra
reviewed
Oct 23, 2024
core-web/libs/ui/src/lib/components/dot-drop-zone/dot-drop-zone.component.ts
Show resolved
Hide resolved
oidacra
reviewed
Oct 23, 2024
core-web/libs/ui/src/lib/components/dot-drop-zone/dot-drop-zone.component.ts
Show resolved
Hide resolved
oidacra
reviewed
Oct 23, 2024
...-content/src/lib/fields/dot-edit-content-file-field/dot-edit-content-file-field.component.ts
Show resolved
Hide resolved
oidacra
reviewed
Oct 23, 2024
.../dot-edit-content-file-field/components/dot-form-import-url/dot-form-import-url.component.ts
Show resolved
Hide resolved
oidacra
reviewed
Oct 23, 2024
...edit-content-file-field/components/dot-form-import-url/dot-form-import-url.component.spec.ts
Show resolved
Hide resolved
oidacra
reviewed
Oct 23, 2024
...ds/dot-edit-content-file-field/components/dot-form-file-editor/dot-form-file-editor.conts.ts
Show resolved
Hide resolved
oidacra
reviewed
Oct 23, 2024
...ot-edit-content-file-field/components/dot-form-file-editor/dot-form-file-editor.component.ts
Show resolved
Hide resolved
oidacra
reviewed
Oct 23, 2024
...-edit-content-file-field/components/dot-form-file-editor/dot-form-file-editor.component.html
Show resolved
Hide resolved
oidacra
approved these changes
Oct 24, 2024
hmoreras
approved these changes
Oct 24, 2024
Quality Gate passedIssues Measures |
spbolton
pushed a commit
that referenced
this pull request
Nov 11, 2024
) ### Parent Issue #29875 ### Proposed Changes This pull request introduces a new file editor component with Angular and PrimeNG, adds a store for managing the editor state, and updates related components and tests. The most important changes include the addition of the `DotFormFileEditorComponent`, its associated styles, constants, and store, as well as updates to the `DotFormImportUrlComponent` and its tests. ### New File Editor Component: * [`dot-form-file-editor.component.html`](diffhunk://#diff-dad0deafcdeaeb3aa5c4374c558e9e5493505545f78dcc46ec7dbaea8cff4f56R1-R59): Added a form for file editing with fields for file name and content, and buttons for saving or canceling the upload. * [`dot-form-file-editor.component.scss`](diffhunk://#diff-4508b6c98b0ef6b04cce00f33fc93d89eaf27283ec4fc731c983ad1d3e637919R1-R93): Added styles for the file editor component, including layout and state-specific styles. * [`dot-form-file-editor.component.ts`](diffhunk://#diff-4e07289537a18f138b8657c2505e3416523ee356c698aeb38f3d519a2257dadaR1-R270): Implemented the logic for the file editor component, including form handling, state management, and interaction with the store. * [`dot-form-file-editor.conts.ts`](diffhunk://#diff-32c45307bdce4649b35b4279ce966eeb847285431f1761f71cbde3caebea90f1R1-R17): Defined default configuration options for the Monaco editor used in the file editor component. * [`form-file-editor.store.ts`](diffhunk://#diff-5184979843abf3baa538afc8613a1fa040a7907c9614bfb64ddc472c31b4cfa7R1-R207): Created a store to manage the state of the file editor, including file upload logic and state transitions. ### Related Component Updates: * [`dot-form-import-url.component.html`](diffhunk://#diff-47b91a5a2108d26181aede1a70773f546e1499df45a54a630daaa7d5670f13c0L22-R22): Updated the validation message binding to use `form.controls.url` instead of `form.get('url')`. * [`dot-form-import-url.component.spec.ts`](diffhunk://#diff-0d18173fe874af517af41ad1e4422ff7681ba1c2ad4daf75c9806a07fa37e7b2R11): Updated the test cases to use the new `ComponentStatus` enum for state transitions. [[1]](diffhunk://#diff-0d18173fe874af517af41ad1e4422ff7681ba1c2ad4daf75c9806a07fa37e7b2R11) [[2]](diffhunk://#diff-0d18173fe874af517af41ad1e4422ff7681ba1c2ad4daf75c9806a07fa37e7b2L67-R68) [[3]](diffhunk://#diff-0d18173fe874af517af41ad1e4422ff7681ba1c2ad4daf75c9806a07fa37e7b2L81-R90) ### Checklist - [x] Tests - [x] Translations - [x] Security Implications Contemplated (add notes if applicable) ### Video https://github.com/user-attachments/assets/123eb3f8-8689-4210-ae03-d31ae18688b1 --------- Co-authored-by: Arcadio Quintero <[email protected]>
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.
Parent Issue
#29875
Proposed Changes
This pull request introduces a new file editor component with Angular and PrimeNG, adds a store for managing the editor state, and updates related components and tests. The most important changes include the addition of the
DotFormFileEditorComponent
, its associated styles, constants, and store, as well as updates to theDotFormImportUrlComponent
and its tests.New File Editor Component:
dot-form-file-editor.component.html
: Added a form for file editing with fields for file name and content, and buttons for saving or canceling the upload.dot-form-file-editor.component.scss
: Added styles for the file editor component, including layout and state-specific styles.dot-form-file-editor.component.ts
: Implemented the logic for the file editor component, including form handling, state management, and interaction with the store.dot-form-file-editor.conts.ts
: Defined default configuration options for the Monaco editor used in the file editor component.form-file-editor.store.ts
: Created a store to manage the state of the file editor, including file upload logic and state transitions.Related Component Updates:
dot-form-import-url.component.html
: Updated the validation message binding to useform.controls.url
instead ofform.get('url')
.dot-form-import-url.component.spec.ts
: Updated the test cases to use the newComponentStatus
enum for state transitions. [1] [2] [3]Checklist
Video
2024-10-23.10-30-20.mp4
This PR fixes: #29875