From f3e01a342bbd302e2bcc8baa33a97c0adfc9adf4 Mon Sep 17 00:00:00 2001 From: gsinghpal Date: Sun, 19 Apr 2026 00:13:28 -0400 Subject: [PATCH] feat(configurator): replace inline previews with smart button + Preview links MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- .../__manifest__.py | 2 +- .../static/src/scss/fp_3d_viewer.scss | 48 ++-------- .../views/fp_quote_configurator_views.xml | 96 +++++++++++-------- 3 files changed, 61 insertions(+), 85 deletions(-) diff --git a/fusion_plating/fusion_plating_configurator/__manifest__.py b/fusion_plating/fusion_plating_configurator/__manifest__.py index 15cf4c5e..36f870e8 100644 --- a/fusion_plating/fusion_plating_configurator/__manifest__.py +++ b/fusion_plating/fusion_plating_configurator/__manifest__.py @@ -5,7 +5,7 @@ { 'name': 'Fusion Plating — Configurator', - 'version': '19.0.2.0.0', + 'version': '19.0.3.0.0', 'category': 'Manufacturing/Plating', 'summary': 'Quotation configurator with part catalog, coating configs, and formula-based pricing engine.', 'description': """ diff --git a/fusion_plating/fusion_plating_configurator/static/src/scss/fp_3d_viewer.scss b/fusion_plating/fusion_plating_configurator/static/src/scss/fp_3d_viewer.scss index 11a539c8..3a8231bb 100644 --- a/fusion_plating/fusion_plating_configurator/static/src/scss/fp_3d_viewer.scss +++ b/fusion_plating/fusion_plating_configurator/static/src/scss/fp_3d_viewer.scss @@ -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%; diff --git a/fusion_plating/fusion_plating_configurator/views/fp_quote_configurator_views.xml b/fusion_plating/fusion_plating_configurator/views/fp_quote_configurator_views.xml index 7c7b3fea..0800404b 100644 --- a/fusion_plating/fusion_plating_configurator/views/fp_quote_configurator_views.xml +++ b/fusion_plating/fusion_plating_configurator/views/fp_quote_configurator_views.xml @@ -66,6 +66,22 @@ invisible="not part_catalog_id"> + +