-
Notifications
You must be signed in to change notification settings - Fork 0
Refactor URL slug generation to use updated DotCustomFieldApi methods #1
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
Open
nicobytes
wants to merge
13
commits into
main
Choose a base branch
from
migration
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or 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
Collaborator
nicobytes
commented
Nov 19, 2025
- 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.
…-examples into migration
…t tag for consistency
…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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.