Repository navigation
[backport cloud/1.55] fix(load3d): apply workspace inset to every viewer #20139
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,9 @@ | ||
| export const LOAD3D_VIEWER_CONTENT_CLASS = | ||
| 'w-[80vw] max-w-[min(80vw,calc(100vw-var(--workspace-inset-right,0px)-1rem))] h-[80vh] max-h-[80vh]' | ||
| import type { DialogComponentProps } from '@/stores/dialogStore' | ||
|
|
||
| export const LOAD3D_VIEWER_DIALOG_PROPS = { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟢 Low — This shared object is neither frozen nor |
||
| renderer: 'reka', | ||
| size: 'full', | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ⚪ Nit — |
||
| contentClass: | ||
| 'w-[80vw] max-w-[min(80vw,calc(100vw-var(--workspace-inset-right,0px)-1rem))] sm:max-w-[min(80vw,calc(100vw-var(--workspace-inset-right,0px)-1rem))] h-[80vh] max-h-[80vh]', | ||
| maximizable: true | ||
| } satisfies DialogComponentProps | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,6 @@ | ||
| import { defineAsyncComponent } from 'vue' | ||
|
|
||
| import { LOAD3D_VIEWER_DIALOG_PROPS } from '@/components/load3d/load3dViewerDialog' | ||
| import { t } from '@/i18n' | ||
| import { useDialogStore } from '@/stores/dialogStore' | ||
| import { | ||
|
|
@@ -18,11 +19,6 @@ export function openHdrViewer(url: string) { | |
| title: getImageFilenameFromUrl(fullResUrl) ?? t('hdrViewer.title'), | ||
| component: HdrViewerContent, | ||
| props: { imageUrl: fullResUrl }, | ||
| dialogComponentProps: { | ||
| renderer: 'reka', | ||
| size: 'full', | ||
| contentClass: 'left-1/2 w-[80vw] sm:max-w-[80vw] h-[80vh] max-h-[80vh]', | ||
| maximizable: true | ||
| } | ||
| dialogComponentProps: LOAD3D_VIEWER_DIALOG_PROPS | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ⚪ Nit — The HDR viewer, assets sidebar, job history, and agent reply dialogs now all derive their geometry from a Load3D-owned constant, so any future Load3D-specific sizing tweak silently resizes four unrelated surfaces that have no test coverage outside the Load3D spec. Consider hoisting the shared geometry into a neutral viewer-dialog module so the blast radius of a change is explicit. Raised by 2 of 8 reviewers (gemini-3.1-pro edge-case, claude-opus-5-thinking-max adversarial). |
||
| }) | ||
| } | ||
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.
🟢 Low — Asserting a fixed 8px left gutter only holds while the inset branch of
min(80vw, 100vw - inset - 1rem)binds, i.e. while the panel is at least0.2 * viewportWidth - 16wide. That is true at 1280/1920 with the 420px panel default, but loweringPANEL_MIN_WIDTHor adding a wider viewport flips to the80vwbranch, where the viewer still centres correctly with a larger gutter and this step fails on correct layout. Since the step is named "centre the viewer", assert the centring relation (dialogBox.xclose to(panelBox.x - dialogBox.width) / 2), which holds on both branches. Raised by 2 of 8 reviewers (gemini-3.1-pro edge-case, claude-opus-5-thinking-max edge-case).