disallow edit frames if component comes from fragment with varibles d…#715
Conversation
🦋 Changeset detectedLatest commit: d231c9d The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
| current: Struct | ||
| isDirty: boolean | ||
| componentToFragId: Record<string, string> | ||
| componentToFragInfo: Record<string, FragmentInfo> |
There was a problem hiding this comment.
this will require a change when we bump motion-tools in app to change the param type
|
I am also fine trying to do this after we move edit frames to a plugin if it makes it too messy to extract out with this new logic in to CC @micheal-parks |
| const isFrameNode = $derived(!!framesAPI.current) | ||
| const isGeometry = $derived(!!geometriesAPI.current) | ||
| const showEditFrameOptions = $derived(isFrameNode && partConfig.hasEditPermissions) | ||
| const isFragmentComponentWithVariables = $derived( |
There was a problem hiding this comment.
Maybe we should add a small message in the details panels saying something along the lines of "This frame is not editable due to the presence of fragment variables"?
There was a problem hiding this comment.
oh yeah I'll add something for that
|
All good with merging this first before plugin making |
Details
In this ticket https://viam.atlassian.net/browse/APP-15772 we saw people had issues editing frames coming from fragments that use variables overwriting the variables. This is technically correct (fragment mods should override variables)
this was a little confusing to users who didn't understand they were overwriting variables so we will disable editing components from fragments which have variables
Testing
demo-disable-fragment-variable.mov