-
Notifications
You must be signed in to change notification settings - Fork 467
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(edit-content): improve load time in edit content form (#30392)
### Proposed Changes #30389 ### Summary This pull request includes significant changes to the `dot-edit-content-field` component in the `core-web` library. The main updates involve deferring the rendering of various field components and removing the now unnecessary `DotEditContentFieldsModule`. ### Rendering Optimization: * Added `@defer (on immediate)` directive to defer the rendering of multiple field components in `dot-edit-content-field.component.html` to improve performance. (`core-web/libs/edit-content/src/lib/components/dot-edit-content-field/dot-edit-content-field.component.html`) <img width="780" alt="Screenshot 2024-10-18 at 10 05 57 AM" src="https://github.com/user-attachments/assets/aa054965-9a20-4667-a32c-e9fa8bf5306c"> ### Module Refactoring: * Removed the `DotEditContentFieldsModule` and updated the imports to include individual field components directly in `dot-edit-content-field.component.ts`. (`core-web/libs/edit-content/src/lib/components/dot-edit-content-field/dot-edit-content-field.component.ts`) [[1]](diffhunk://#diff-f03434ad88316542a23c3fb0bf50b6650130632c3e7953d7ee3c882cb5950d06L9-R22) [[2]](diffhunk://#diff-f03434ad88316542a23c3fb0bf50b6650130632c3e7953d7ee3c882cb5950d06L30-R54) * Deleted the now redundant `DotEditContentFieldsModule` file. (`core-web/libs/edit-content/src/lib/fields/dot-edit-content-fields.module.ts`) ### Checklist - [x] Tests - [x] Translations - [x] Security Implications Contemplated (add notes if applicable) ### Screenshots With all fields, each field is loaded only when necessary. ![Frame 10](https://github.com/user-attachments/assets/2514cbbc-5758-40e4-9b7b-46a31a7fc791) When the user selects a few fields, only those fields are loaded ![Frame 11](https://github.com/user-attachments/assets/2fe4475c-eec1-4b03-90dd-5e5ba6ac3154)
- Loading branch information
Showing
4 changed files
with
126 additions
and
119 deletions.
There are no files selected for viewing
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
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
53 changes: 0 additions & 53 deletions
53
core-web/libs/edit-content/src/lib/fields/dot-edit-content-fields.module.ts
This file was deleted.
Oops, something went wrong.
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