Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(editor) Honours Props For Fragment Components (#6165)
- `absoluteMoveStrategy` modified to handle the changed result from `honoursPropsPosition`. - Fixed `getFitness` function for convert to absolute and move strategy, as it was returning a fitness above zero for a keyboard interaction. - `keyboardAbsoluteMoveStrategy` modified to handle the changed result from `honoursPropsPosition`. - Fixed keyboard resize and move tests as they were using incorrect element paths. - `supportsAbsoluteResize` modified to handle the changed result from `honoursPropsPosition`. - `getMoveCommandsForSelectedElement` lost the invariants as they weren't that necessary and were the cause of the browser tests deadlocking. - `getMoveCommandsForSelectedElement` is now a little more flexible if the parent bounds are not available, as it's possible to move something with a delta. - Added `FrameWithFourPoints`, `rectangleToFourFramePoints` and `FrameWithFourToSixPoints`. - DOM walker now checks for descendants of valid paths to catch elements inside fragments. - `componentHonoursPropsPosition` now returns detail of what exactly the component honours so that it's possible to get the detail of `position: 'absolute'` from this as well as the metadata. - Both `componentHonoursPropsPosition` and `componentHonoursPropsSize` now peak inside fragments at the root of their components. - Fixed a bug in `propsStyleIsSpreadInto` where it wasn't covering `props.style` being set directly. - Added `metadataHasPositionAbsoluteOrNull` to make specifying certain cases easier. - Changed the default value for the position in `emptySpecialSizeMeasurements` to `null`.
- Loading branch information