refactor(style-editor): restructure style editor schema handling and …#35355
Conversation
…remove unused hooks - Introduced for normalizing style editor forms. - Updated and to register style editor schemas. - Removed hook and associated tests to streamline the codebase. - Added new types for style editor fields and schemas in . - Updated various components to utilize the new schema handling, improving maintainability and clarity. This refactor enhances the style editor's integration and prepares for future feature expansions.
|
Claude finished @KevinDavilaDotCMS's task in 1m 48s —— View job PR Review
Issues Found1. console.log('styleEditorSchemas', styleEditorSchemas);This fires on every 2. Hardcoded mock with 335 lines of demo data baked into the SDK —
3. ...(styleEditorSchemas && { styleEditorSchemas })
4. Feature flag force-set to // TODO: Remove this, only hardcoded until the PR that fix is merged
flags[FeaturedFlags.FEATURE_FLAG_UVE_STYLE_EDITOR] = true;The comment says "until the PR that fix is merged" — this is that PR, and it's still here. The 5. Breaking change: style editor types dropped from Previously export * from './lib/style-editor/types';
export * from './lib/style-editor/public';Both lines are now removed. Any consumer importing 6. import { StyleEditorFormSchema } from '../style-editor/internal';
// ...
styleEditorSchemas?: StyleEditorFormSchema[]; // added to DotCMSPageResponse
7. The JSDoc says:
And the example shows: But 8. export function defineStyleEditorSchema(form: StyleEditorForm): StyleEditorFormSchema {
return normalizeForm(form);
}The JSDoc says "Normalizes and validates" but there is no validation. This is identical to calling Minor
|
…ernal module - Updated imports across various components to utilize the new internal module for style editor types and schemas. - Removed obsolete imports from the package, streamlining the codebase. - Introduced a new internal module for style editor types, enhancing organization and maintainability. - Adjusted related services and components to align with the new structure, ensuring consistent usage of style editor schemas. This refactor improves clarity and prepares the codebase for future enhancements in the style editor functionality.
…remove unused hooks
This refactor enhances the style editor's integration and prepares for future feature expansions.
2026-04-16.14-21-37.mov
This PR fixes: #35270