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

Fix #25341 Template Builder error when loading a template #25359

Merged

Conversation

zJaaal
Copy link
Contributor

@zJaaal zJaaal commented Jun 27, 2023

πŸ€– Generated by Copilot at 432e837

Summary

πŸ†•πŸ”βœ…

Renamed and added outputs to template builder components to improve communication and consistency. Added a new test case and a new method to handle template updates and history reloads. Enhanced the template item object with title and width properties.

Sing, O Muse, of the skillful TemplateBuilderComponent
That emits the template item with title and width augment
And of the wise renaming of the updateTemplate outputs
To avoid confusion and enhance the clarity of their routes

Walkthrough

  • Rename updateTemplate output to onTemplateItemChange in dot-template-builder-advanced and dot-edit-layout-designer components to avoid confusion with parent component output (link, link)
  • Add onTemplateItemChange method to dot-template-builder.component.ts to handle template item changes from both advanced and designer components, emit updated template item to parent component, and reload history iframe if it exists (link)
  • Remove ngOnChanges method and OnChanges interface from dot-template-builder.component.ts as they are no longer needed to reload history iframe (link, link, link)
  • Add test case to dot-template-builder.component.spec.ts to verify that onTemplateItemChange method is called when updateTemplate output of dot-template-builder-advanced component emits a value (link)
  • Add test case to dot-template-builder.component.spec.ts to verify that onTemplateItemChange method is called when updateTemplate output of dot-edit-layout-designer component emits a value (link, link)
  • Add title and width properties to template item object that is emitted by TemplateBuilderComponent in template-builder.component.ts when layout changes, to match backend template item properties (link)

Screenshots

Screen.Recording.2023-06-27.at.1.22.44.PM.mov

@zJaaal zJaaal linked an issue Jun 27, 2023 that may be closed by this pull request
@zJaaal zJaaal requested a review from fmontes June 27, 2023 16:38
@dotcms-sonarqube
Copy link

SonarQube Quality Gate

Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@fmontes fmontes merged commit 84216b2 into master Jun 27, 2023
17 checks passed
@fmontes fmontes deleted the issue-25341-template-builder-error-when-loading-a-template branch June 27, 2023 19:10
manuelrojas pushed a commit that referenced this pull request Jun 28, 2023
* fix form console error

* fix ngOnChanges error

* fix tests
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.

Template Builder: Error when Loading a Template
5 participants