feat(configurator): replace inline previews with smart button + Preview links

The Quote Configurator form devoted nearly half its width to a sticky
3D viewer + drawing PDF preview. That panel meant the actual fields
(geometry, dimensions, pricing) had to fight for real estate. Replaced
the inline previews with two affordances that take zero layout space:

  1. New '3D Model' smart button at the top of the form, next to the
     existing 'Drawings' button. Click to open the existing
     fp_3d_viewer_open client action — same fullscreen modal the
     'Full Screen' button used to launch from the side panel.

  2. Inline 'Preview' link (eye icon) sits next to the 3D Model and
     Drawing fields in the Customer & Part group. Click to open the
     same modal preview as the smart button. Two paths to the same
     content — power users grab the field-adjacent link mid-edit;
     visual-thinkers grab the smart button up top.

Layout collapses to a single full-width column. The .o_fp_cfg_layout
wrapper is kept (display:block) so we have a stable hook in case a
side panel returns later for a different purpose. Old SCSS dance with
:has() selectors to fake-collapse the grid is gone.

Bumped fusion_plating_configurator to 19.0.3.0.0.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
gsinghpal
2026-04-19 00:13:28 -04:00
parent 4065c6891b
commit f3e01a342b
3 changed files with 61 additions and 85 deletions

View File

@@ -4,54 +4,18 @@
// License OPL-1 (Odoo Proprietary License v1.0)
// =============================================================================
// -- Configurator two-column layout: 3/4 fields + 1/4 preview --
// When the preview column is hidden (no 3D model AND no drawings), the
// fields column expands to full width via the :has() selector below.
// -- Configurator layout (single column) -------------------------------------
// The right-side 3D viewer + drawing preview were retired in favour of
// smart-button + inline-Preview-link affordances. Layout collapses to a
// single full-width column. Wrapper kept so the SCSS hook stays stable
// in case we add a side panel back later.
.o_fp_cfg_layout {
display: grid;
grid-template-columns: 1fr 380px;
gap: 16px;
align-items: start;
display: block;
}
// Full width when right column has no visible content
.o_fp_cfg_layout:has(> .o_fp_cfg_preview.o_invisible_modifier),
.o_fp_cfg_layout:has(> .o_fp_cfg_preview[style*="display: none"]),
.o_fp_cfg_layout:has(> .o_fp_cfg_preview[style*="display:none"]) {
grid-template-columns: 1fr;
}
.o_fp_cfg_fields {
min-width: 0;
}
.o_fp_cfg_preview {
position: sticky;
top: 16px;
// Force all field widgets (3D viewer, Html drawing preview) to be
// block-level + full width so the 3D and PDF iframes match exactly.
.o_field_widget,
> div > .o_field_widget {
display: block;
width: 100%;
}
iframe {
display: block;
}
}
// Responsive: stack on narrow screens
@media (max-width: 1200px) {
.o_fp_cfg_layout {
grid-template-columns: 1fr;
}
.o_fp_cfg_preview {
position: static;
}
}
// -- 3D viewer widget --
.o_fp_3d_viewer_root {
width: 100%;