Skip to content

Conversation

@nicobytes
Copy link
Contributor

@nicobytes nicobytes commented Dec 30, 2025

Proposed Changes

This pull request improves the robustness and styling of the NativeFieldComponent by preventing duplicate mounting and ensuring proper cleanup of the container element. The changes address both the component's lifecycle logic and its associated styles.

Component lifecycle improvements:

  • Added a check in native-field.component.ts to prevent remounting the container if it is already mounted, avoiding duplicate initialization.
  • Enhanced the cleanup process in the component's ngOnDestroy method to fully remove all child nodes and clear the innerHTML of the host element, ensuring no residual DOM elements remain after destruction.

Styling updates:

  • Updated the CSS selector in native-field.component.scss to exclude elements with the .custom-select-button class from certain button styles, preventing unintended styling conflicts.

Checklist

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

…dit mode support

- Updated the title custom field template to support a new edit mode using the `DotCustomFieldApi`.
- Implemented event listeners for the title box to automatically update the URL and friendly name fields based on the title input.
- Improved code structure by separating logic for new edit mode and legacy Dojo implementation.
- Ensured backward compatibility by maintaining the original script for non-edit mode scenarios.

This change enhances user experience by providing real-time updates and a more modern approach to handling custom fields.
…:dotCMS/core into 34029-task-migrate-pages-vtls-to-new-api
…:dotCMS/core into 34029-task-migrate-pages-vtls-to-new-api
…ment, enhance data access with new utility methods
…e and DotTruncatePathPipe to improve modularity
…rity and maintainability. Updated mock responses and added tests for contentlet retrieval, locking, and language suggestions. Enhanced test structure with meaningful variable names and consistent use of async patterns.
… improved clarity and maintainability. Updated mock responses and added tests for various upload scenarios, including handling of abort signals and contentlet uploads. Enhanced test structure with meaningful variable names and consistent use of async patterns.
…arity and maintainability. Implemented tests for site and folder retrieval, error handling, and tree structure transformation. Enhanced test structure with meaningful variable names and consistent use of async patterns.
… and error handling. Added lint target in project.json, refined ignore patterns in .eslintrc.json, and adjusted TypeScript configurations for better type safety. Enhanced unit tests in DotBrowsingService for error handling and folder retrieval, ensuring consistent use of async patterns and meaningful variable names.
…settings and focus on testing and build targets.
…lderParams for improved type safety and clarity. Updated getContentByFolder method signatures and adjusted related components to streamline content retrieval parameters. Enhanced DotBrowserSelectorComponent to manage folder parameters using Angular's signals for better state management.
…to utilize ContentByFolderParams for improved clarity and type safety. Updated test cases to pass parameters directly, ensuring consistent use of the new structure. Enhanced AngularFormBridge to accept params for better content filtering and retrieval. Streamlined test assertions for better maintainability..
…s for the DotCustomFieldApi modal. Updated the onClose callback to handle the new URL structure, improving the functionality of the page selection feature.
…eldComponent, and NativeFieldComponent. Updated return type description and field accessibility notes for clarity and consistency.
…or improved modularity and clarity. Updated service methods to utilize DotCMSAPIResponse for consistent response handling. Enhanced unit tests for DotBrowsingService to ensure robust error handling and folder retrieval functionality.
@nicobytes nicobytes linked an issue Dec 30, 2025 that may be closed by this pull request
10 tasks
@alwaysmeticulous
Copy link

Meticulous was unable to execute a test run for this PR because the most recent commit is associated with multiple PRs. To execute a test run, please try pushing up a new commit that is only associated with this PR.

Last updated for commit 159208d. This comment will update as new commits are pushed.

@mergify
Copy link

mergify bot commented Dec 30, 2025

⚠️ The sha of the head commit of this PR conflicts with #34126. Mergify cannot evaluate rules on this PR. ⚠️

…nality

- Refactored SCSS for native field component to exclude custom select button from button styles.
- Introduced new styles for custom select button and dropdown options in the template custom field.
- Improved accessibility and usability of the custom dropdown with enhanced event handling and state management.

These changes aim to provide a more consistent and user-friendly experience when interacting with custom fields
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements a custom field template refactor (#34029) with the following key changes:

  • Major refactoring of the template selector custom field from a simple dropdown to a custom-styled button with paginated dropdown
  • Introduction of a new DotBrowsingService to consolidate site/folder browsing logic previously duplicated across multiple components
  • Implementation of a reusable DotBrowserSelectorComponent for content selection modals
  • Enhancement of the form bridge to support opening browser modals from custom fields
  • Code cleanup including removal of unused imports, duplicate functions, and dependency consolidation

Reviewed changes

Copilot reviewed 79 out of 84 changed files in this pull request and generated no comments.

Show a summary per file
File Description
template_custom_field_new.vtl Complete rewrite from simple select dropdown to custom button with paginated dropdown, added browser modal support
redirect_custom_field*.vtl Split into old/new versions with conditional loading pattern
DotBrowsingService New centralized service for site/folder browsing operations
DotBrowserSelectorComponent New reusable component for content selection with tree navigation
angular-form-bridge.ts Added openBrowserModal method to support custom field modal dialogs
Various test files Updated imports and mocks to use new service structure
yarn.lock Cleaned up duplicate/unused dependencies
Config files TypeScript strictness adjustments for bridge library

@nicobytes nicobytes marked this pull request as ready for review January 3, 2026 13:06
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.

[TASK] Migrate "Pages" VTLs to new API

2 participants