Resolve #3587592 "Backend minItems"
Enforce minItems: 1 for required array props on the server in JavaScriptComponent::updateFromClientSide() rather than relying on the client to send the correct value. Required array props always get minItems: 1 set; all other props have minItems removed. This removes the frontend minItems handling added in [#3516754] which was fragile — the client should not be responsible for encoding schema constraints that the server validates anyway, and the lack of e2e test coverage for the code editor meant the regression went undetected.
Testing instructions
- Create a JavaScript component with a required array prop via the code editor UI, save it, reload — confirm it saves without a
minItems-related validation error - Create a JavaScript component with a non-required array prop via the code editor UI, save it, reload — confirm it saves without error
- Place the component with the required array prop on a page — confirm that the field requires at least one item before the page can be saved
- Place the component with the non-required array prop on a page — confirm the field accepts zero items (no minimum enforced)
Closes #3587592
Edited by Ignacio Sánchez Holgueras