Fix errors - #36890
Conversation
… ESLint configurations - Updated Node.js version from 22.15.0 to 22.22.3 in multiple configuration files, including `.github/copilot-instructions.md` and `pom.xml`. - Consolidated ESLint configuration rules across various applications and libraries for consistency and clarity, ensuring all relevant files adhere to the same standards. - Removed unnecessary imports and streamlined coverage collection settings in Jest configuration files. This update enhances compatibility and maintains code quality across the project.
…onfig, and improve frontend onboarding documentation
…urations - Cleaned up ESLint configuration files across multiple applications and libraries by removing unnecessary imports related to FlatCompat. - This change streamlines the ESLint setup and enhances consistency across the project.
…pt-6-across-the-core-web-nx-workspace
…ate tests - Refactored the `ContentTypesLayoutComponent` to use signals for managing the add-to-menu state, replacing the previous boolean flag. - Updated the HTML template to reflect the new signal-based logic for displaying the add-to-menu component. - Adjusted unit tests in `content-types-layout.component.spec.ts` to accommodate the changes in state management and component interactions. - Modified the `DotAddToMenuComponent` to emit events correctly, ensuring proper functionality in the updated context. - Enhanced the `dot-content-types.component.html` to align with the new event handling for the add-to-menu feature.
…functionality - Added tests to verify that timeline items are correctly keyed by inode and bundleId. - Implemented checks to ensure the timeline key updates appropriately when version lists are swapped. - Introduced mock data for DotCMSContentletVersion and DotPushPublishHistoryItem to facilitate testing. - Enhanced the DotHistoryTimelineListComponent to utilize a stable identity function for timeline items, improving key generation logic.
…nit tests - Adjusted the HTML structure in `content-types-layout.component.html` for better readability and consistency. - Updated the unit tests in `content-types-layout.component.spec.ts` to streamline component overrides and enhance clarity. - Made minor formatting changes in `dot-history-timeline-list.component.spec.ts` to improve code organization and maintainability.
…pt-6-across-the-core-web-nx-workspace
…pt-6-across-the-core-web-nx-workspace
…pt-6-across-the-core-web-nx-workspace
…pt-6-across-the-core-web-nx-workspace
…pt-6-across-the-core-web-nx-workspace
…pt-6-across-the-core-web-nx-workspace
…pt-6-across-the-core-web-nx-workspace
Restores nx format:check compliance so Initial Artifact Build passes in CI. Co-authored-by: Cursor <cursoragent@cursor.com>
…pt-6-across-the-core-web-nx-workspace-2
- Updates the pinned nx version and regenerates the pnpm lockfile to match, pulling in the corresponding transitive dependency graph changes for @nx/* packages.
- Aligns @angular/* packages with the latest 22.1.x patch release - Follows the @nx/* toolchain bump to 23.1.1 across all Nx plugins - Updates ng-packagr and related devkit/build-angular versions to match
…lar 22 across multiple applications - Updated tsconfig.app.json files in dotcdn, dotcms-binary-field-builder, dotcms-block-editor, and dotcms-ui to include a TODO comment regarding the re-enabling of strictTemplates once Angular 22 template errors are resolved.
…pt-6-across-the-core-web-nx-workspace-2
Moved workflow-actions-dialog.spec.ts from edit-content/sidebar to edit-content/workflows to better reflect the test's subject area.
- Angular 21/22's tighter change detection left the form hidden because the async role fetch in ngOnInit updated state without triggering a CD pass, leaving `@if (form)` unrendered inside the dialog's appendTo="body" view. - Inject ChangeDetectorRef and call detectChanges() after setup to force the view to render once roles resolve.
…pt-6-across-the-core-web-nx-workspace-2
Replace inline `import('@playwright/test').Page` type expressions with the named `Page` import for readability.
…pt-6-across-the-core-web-nx-workspace-2
…ail handling - Added an `id` attribute to the thumbnail field in the template properties form for better accessibility. - Updated the thumbnail field component to handle empty values correctly, preventing unnecessary data fetches and ensuring the loading state is managed properly. - Enhanced tests to verify the new behavior of the thumbnail field when receiving empty values. This change improves the user experience and ensures the component behaves as expected in various scenarios.
|
Claude finished @nicobytes's task in 1m 4s —— View job PR ReviewReviewed the diff against Resolved
Notes (non-blocking)
No issues found. The PR looks good to merge. · |
There was a problem hiding this comment.
Pull request overview
This pull request updates the template thumbnail field used in the template create/edit UI and refactors the binary upload button web component to better handle empty values and simplify file input access.
Changes:
- Adds
name="thumbnail"wiring for the template thumbnail binary field and updateswriteValueto short-circuit/reset state when the ID is empty. - Extends unit tests to ensure no fetch happens when the thumbnail ID/form value is empty.
- Refactors the Stencil upload button to query the file input on demand and no-op when no file is selected.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| core-web/libs/dotcms-webcomponents/src/components/contenttypes-fields/dot-binary-file/components/dot-binary-upload-button/dot-binary-upload-button.tsx | Refactors file input access and file-selection handling in the upload button component. |
| core-web/apps/dotcms-ui/src/app/portlets/dot-templates/dot-template-create-edit/dot-template-props/dot-template-thumbnail-field/dot-template-thumbnail-field.component.ts | Updates CVA writeValue to reset state when provided an empty/null thumbnail ID. |
| core-web/apps/dotcms-ui/src/app/portlets/dot-templates/dot-template-create-edit/dot-template-props/dot-template-thumbnail-field/dot-template-thumbnail-field.component.spec.ts | Adds tests ensuring empty IDs don’t trigger fetches or disabled state changes. |
| core-web/apps/dotcms-ui/src/app/portlets/dot-templates/dot-template-create-edit/dot-template-props/dot-template-thumbnail-field/dot-template-thumbnail-field.component.html | Sets name="thumbnail" on the dot-binary-file used for thumbnail uploads. |
| core-web/apps/dotcms-ui/src/app/portlets/dot-templates/dot-template-create-edit/dot-template-props/dot-template-props.component.html | Attempts to improve label association for the thumbnail field by adding an id to the thumbnail field component. |
|
Confirmed on the two Medium notes for
No further code change needed for these notes. |
…accessibility - Changed the `for` attribute of the thumbnail label from `thumbnail` to `dot-thumbnail` for improved clarity. - Removed the `id` attribute from the `dot-template-thumbnail-field` component to streamline the HTML structure. - Ensured the component maintains proper form control binding with `formControlName="image"`. This update enhances the accessibility and consistency of the template properties form.
|
Tick the box to add this pull request to the merge queue (same as
|
This pull request improves the thumbnail field handling in the template creation/editing UI and refines the binary upload button implementation. The main changes enhance accessibility, ensure correct behavior when no thumbnail is provided, and simplify the file input logic.
Template Thumbnail Field Improvements:
idandname="thumbnail"to the thumbnail input field for better accessibility and form integration (dot-template-props.component.html,dot-template-thumbnail-field.component.html). [1] [2]writeValuemethod inDotTemplateThumbnailFieldComponentto properly handle empty or null IDs by resetting state and avoiding unnecessary service calls (dot-template-thumbnail-field.component.ts).dot-template-thumbnail-field.component.spec.ts). [1] [2]Binary Upload Button Refactoring:
fileInputproperty andcomponentDidLoadlifecycle method, replacing direct references with a newgetFileInput()helper for safer DOM access (dot-binary-upload-button.tsx). [1] [2]Fix #35930