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 @dario-daza's task in 2m 44s —— View job Frontend Review
Issues1. Stale JSDoc not fixed — Still showing the old multi-dimensional 2. console.warn(
`[registerStyleEditorSchemas] Skipping schema with index [${index}] ...`
);All other SDK code uses 3. config.inputType = field.inputType as unknown as StyleEditorFieldInputType;
config.placeholder = field.placeholder as unknown as string;After narrowing 4. Both 5. The only guard is 6. The Clean
|
…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.
…se-content-type-tab-as-single-source-of-truth-for-headless-and-traditional-pages-frontend
…se-content-type-tab-as-single-source-of-truth-for-headless-and-traditional-pages-frontend
### Proposed Changes
* Create a new endpoint in the PageAPI to retrieve the Content Type
**SCHEMAS** present in a page, the endpoint is `GET
/api/v1/page/{pageId}/contenttype-schema`
* Reuse logic to retrieve the Schemas from the Content Type metadata
from the Contentlets present in a Page.
* Create Postman test to the new endopoint.
* Unify Feature Flag for Style Editor Headless and Traditional
* Consume new endpoint in the FE
This PR fixes: #35270
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…se-content-type-tab-as-single-source-of-truth-for-headless-and-traditional-pages-frontend
|
@claude check frontent changes again |
|
Claude finished @rjvelazco's task in 3m 3s —— View job Frontend Review
SummaryThe architecture shift is sound — moving schema definition from client code to server-side Issues1. JSDoc/comment mismatch in The description says "organized as a multi-dimensional array (array of column arrays)" and the The dead comment at line 146 — Both need to be updated to reflect the actual (flat) output. Fix this → 2. The only guard is the SSR check ( The 3. console.warn(
`[registerStyleEditorSchemas] Skipping schema with index [${index}] for not having a contentType`
);All other SDK logging uses 4.
This is likely acceptable for the initial ship but should be documented as a known limitation, since it creates a confusing editing experience. 5. export function defineStyleEditorSchema(form: StyleEditorForm): StyleEditorFormSchema {
return normalizeForm(form);
}This is a transparent wrapper with no additional logic or validation. Having two exported names for the same operation ( Nits
|
…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
This PR fixes: #35270