-
Notifications
You must be signed in to change notification settings - Fork 171
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disallow changing location for components which do not support style …
…props (#6624) **Problem:** When a grid contains component items which do not support style props: - changing location should be disabled, because we can not attach the gridRow*, gridColumn* props on the component - reorder should still work, because that just modifies the order of the grid items as siblings **Fix:** I used MetadataUtils.targetRegisteredStyleControlsOrHonoursStyleProps to decide if a component supports the necessary grid placement style props: - if `layout` inspector section is enabled in the component annotations, we should allow changing location - if gridRow/gridColumn/etc props are taken by the component, then we should allow changing location - reorder does not need any constrains, it does not depend on style props **Manual Tests:** I hereby swear that: - [x] I opened a hydrogen project and it loaded - [x] I could navigate to various routes in Play mode
- Loading branch information
Showing
3 changed files
with
269 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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