-
Notifications
You must be signed in to change notification settings - Fork 467
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(uve): Add Device Selector functionality #30903
base: main
Are you sure you want to change the base?
Conversation
@@ -140,6 +140,19 @@ export function withEditor() { | |||
const origin = params.clientHost || window.location.origin; | |||
const iframeURL = new URL(pageAPIQueryParams, origin); | |||
|
|||
const unit = device?.inode !== 'default' ? BASE_IFRAME_MEASURE_UNIT : '%'; | |||
|
|||
const wrapper = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be a function? is a little difficult to read
}, | ||
actionIcon: 'pi pi-times' | ||
}; | ||
} else if (!getIsDefaultVariant(pageAPIResponse?.viewAs.variantId)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the else is not necessary i think
|
||
// So we dont open the editor in a device | ||
if (!this.#store.$isPreviewMode() && (deviceInode || orientation)) { | ||
this.#store.patchViewParams({ device: null, orientation: null }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't this generate a loop any time?
Maybe it should be in an untracked()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No it doesn't but I haven't tested this code properly, so Im sure this can be better
WIP