Skip to content

Conversation

@nicobytes
Copy link
Collaborator

  • Replaced deprecated DotCustomFieldApi.set() calls with field.setValue() for setting the URL slug.
  • Updated the retrieval of the saved value to use field.getValue() for consistency.
  • Cleaned up the code by removing unnecessary comments and ensuring proper formatting.

- Replaced deprecated DotCustomFieldApi.set() calls with field.setValue() for setting the URL slug.
- Updated the retrieval of the saved value to use field.getValue() for consistency.
- Cleaned up the code by removing unnecessary comments and ensuring proper formatting.
…ctionality

- Updated the title custom field script to utilize DotCustomFieldApi for retrieving and setting values.
- Replaced dojo-based event handling with native JavaScript event listeners for better performance and readability.
- Enhanced URL slug generation logic to ensure it only triggers when the URL field is empty.
- Cleaned up the code structure for improved maintainability.
- Removed unnecessary whitespace and comments in dynamic-field.vtl for cleaner code.
- Updated text-count.vtl to use getField() method for retrieving field values and implemented onChange event handling for better performance.
- Adjusted title_custom_field.vtl to dynamically reference field IDs for improved flexibility.
- Enhanced url-title.vtl to utilize field-specific IDs and updated event handling for slug generation.
- Introduced a new text-count.js.vtl file to implement character counting for a text input field.
- Updated the existing text-count.vtl to enhance the character counting logic and ensure it dynamically reflects the character limit.
- Improved user feedback by changing text color based on character count thresholds.
- Introduced a new applySuggestion function to streamline the process of applying suggested slugs.
- Refactored showSuggestion to dynamically create and append suggestion links instead of using inline onclick attributes.
- Improved event handling by adding event listeners for better performance and maintainability.
- Updated field retrieval to use more descriptive variable names for clarity.
…roved readability and functionality

- Updated event handling in title_custom_field.vtl to use 'blur' instead of 'change' for better user experience.
- Enhanced variable naming for clarity in title_custom_field.vtl.
- Adjusted indentation in template_custom_field.vtl for consistent formatting.
- Introduced migration.md to provide guidelines for transitioning to the new DotCustomFieldApi.
- Refactored youtube-search.vtl to utilize DotCustomFieldApi for field management, enhancing maintainability and readability.
- Updated event handling to use native JavaScript methods and improved variable naming for clarity.
- Enhanced video preview functionality by dynamically creating and appending elements instead of using inline attributes.
- Updated text-count.vtl to remove dijit classes and use native HTML elements, improving maintainability.
- Refactored url-title.vtl to eliminate dojoType attributes and streamline variable naming for clarity.
- Enhanced youtube-search.vtl by replacing deprecated patterns with the new DotCustomFieldApi, improving event handling and user experience.
- Ensured all field accesses are wrapped in DotCustomFieldApi.ready() to prevent race conditions and maintain functionality.
…ing dialog functionality

- Updated migration.md to include new File and Page Browser Dialog examples using DotCustomFieldApi.
- Refactored cachettl_custom_field.vtl to eliminate Dojo dependencies and utilize native JavaScript for field management.
- Improved template_custom_field.vtl by adding a fetchTemplates function and enhancing template selection handling.
- Replaced deprecated Dojo dialog implementations in og-preview.vtl with native HTML dialog elements and improved event handling.
- Refactored redirect_custom_field.vtl to streamline page selection and update redirect URL handling using DotCustomFieldApi.
- Introduced a .prettierrc.json file to enforce consistent code formatting for VTL files.
- Updated migration.md to clarify guidelines for preserving functionality and business logic during VTL file migrations.
- Refactored various VTL files to improve readability and maintainability, including consistent use of quotes and indentation.
- Enhanced event handling in several files to utilize modern JavaScript practices, improving overall code quality.
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.

1 participant