Support #12368
openAR try on Feature enhacement
Subtasks
Related issues
Updated by Ajit A 1 day ago
- Status changed from New to In Progress
- % Done changed from 0 to 100
Feature: Global Virtual Try-On Storefront Kill-Switch and Administrative Control Fix: Implemented an end-to-end global feature toggle for the Virtual Try-On feature across the entire platform. In Noxa-Jewellery-be, added the enableTryOn boolean property (defaulting to true) to the CompanyProfile schema and DTO, and introduced a secure @Patch('try-on-toggle') endpoint guarded by JwtAuthGuard and AdminGuard. In Noxa-Jewellery-fe, added a quick-toggle switch in the product management toolbar with dynamic status pills ("AR Ready", "Disabled", "Not Configured") in the table columns. In Noxa_E_Comm_Fe, wired companyProfile.enableTryOn across ProductDetails, ProductCardImage, HomeVirtualTryOnBanner, and TryOnStudio so that disabling the feature cleanly removes try-on badges, hides promotional banners, disables AR launch buttons, and presents a graceful fallback screen in the dedicated studio without broken UI states.
Feature: Dual-Earring Support with Independent Polygonal Lasso Cropping and Selective View Filtering Fix: Enhanced AR earring configuration in Noxa-Jewellery-be and Noxa-Jewellery-fe to support independent left and right earring assets (arLeftEarringImage, arRightEarringImage) alongside selective view disabling (arDisabledViews). Upgraded ARAssetGenerator.tsx with a Photoshop-style 8-point polygonal lasso contour tracer, point-by-point contour manipulation, and per-view enable/disable checkboxes that sync in real time to the backend. In Noxa_E_Comm_Fe, updated useARSession.ts and VirtualTryOn.tsx to detect screen-left versus screen-right earlobe landmarks, automatically mirroring or independently rendering the specific left/right earring assets on their corresponding anatomical anchors while honoring disabled component views.
Bug: Floating Earring and Misaligned Necklace AR Placement on Storefront Try-On Fix: Calibrated landmark anchoring heuristics in Noxa_E_Comm_Fe/lib/ar/anchors.ts. Reduced the earlobe drop distance factor from 0.11 to 0.065 and eliminated base outward offset (baseOutwardDist = 0) to anchor earring piercing hooks snugly against the physical earlobe silhouette without floating gaps in natural frontal views. Adjusted the necklace anchor height offset (anchorY = neckNotchY + rawHeight * 0.18) and suprasternal notch calibration (faceNeckNotchY = chinPt.y + Math.max(faceH * 0.08, jawWidth * 0.12)) to ensure chains seat naturally across the clavicle and collar line without floating above the throat or sagging excessively on the lower chest.
Feature: Mobile-Friendly Drag-and-Drop Reordering and Responsive Notification Toasts Fix: Resolved mobile UX limitations in Noxa-Jewellery-fe. Added touch event listeners (onTouchStart, onTouchMove, onTouchEnd) using document.elementFromPoint in MultipleImageUpload and MultipleVisualUpload to enable seamless reordering of product gallery photos and video visuals on mobile devices and touchscreens. Extracted inline notification dimensions in Toast.tsx and common.tsx into responsive CSS rules in src/index.css, introducing @media (max-width: 640px) media queries that scale toast widths, icons, font sizes, and dismiss buttons to fit mobile viewports cleanly.
Issue: Storefront Skeleton Loading Architecture and Promo Section Visual Alignment Fix: Replaced the jarring full-viewport loading spinner in Noxa_E_Comm_Fe by removing app/loading.tsx and creating dedicated skeleton loaders (HomePromoSkeleton.tsx, FeaturedCollectionsSkeleton.tsx, and ProductsListingSkeleton.tsx). Updated HomePromoSection.tsx to display full 1:1 square artwork on both mobile and desktop screens with luxury radial glow styling, contained object scaling, and high-contrast layered badges, eliminating layout shifts and mobile rendering inconsistencies.
File Changes Summary
Repository: Noxa-Jewellery-be
Modified:
src/company-profile/company-profile.controller.ts — Added @Patch('try-on-toggle') endpoint for global try-on state toggling.
src/company-profile/company-profile.service.ts — Added toggleTryOn() and included enableTryOn in public profile mapping.
src/company-profile/dto/update-company-profile.dto.ts — Added optional enableTryOn boolean property.
src/company-profile/schemas/company-profile.schema.ts — Added enableTryOn schema field with default true.
src/products/dto/create-product.dto.ts — Added DTO fields for arLeftEarringImage, arRightEarringImage, and arDisabledViews.
src/products/products.service.ts — Added update handling to permit clearing/nullifying dual earring assets.
src/products/schemas/product.schema.ts — Added arLeftEarringImage, arRightEarringImage, and arDisabledViews schema fields.
Untracked:
scratch/clean-stale-bangle.js — One-off database modification script with plaintext MongoDB URI.
Repository: Noxa-Jewellery-fe
Modified:
src/components/ARAssetGenerator.tsx — Added dual-earring editing tabs, 8-point polygonal lasso contour tracing, and per-view disable toggles.
src/components/MultipleVisualUpload.tsx — Added touch-based drag-and-drop reordering for video/GIF visuals.
src/components/Toast.tsx — Refactored notification markup with dedicated responsive CSS class names.
src/components/common.tsx — Extracted toast icon styling into CSS classes.
src/index.css — Added responsive @media (max-width: 640px) toast rules and mobile notification typography.
src/pages/products/CreateProduct.tsx — Added touch reordering for product images and integrated dual-earring / view-disabling fields in product form state.
src/pages/products/ProductsList.tsx — Added global Try-On toggle button with loading state, dynamic table column indicators, and status badges.
src/services/service.companyProfile.ts — Added enableTryOn to interface and implemented toggleTryOn() API caller.
Repository: Noxa_E_Comm_Fe
Deleted:
app/loading.tsx — Removed global full-page loader in favor of section-level skeleton loaders.
Modified:
components/VirtualTryOn.tsx — Integrated dual-earring asset inputs, disabled view filtering, and calibrated asset resolution.
components/home/HomePromoSection.tsx — Replaced generic section loader with HomePromoSkeleton and refined hero artwork aspect ratios.
components/home/HomeVirtualTryOnBanner.tsx — Added global toggle check to cleanly unmount banner when disabled.
components/product/FeaturedCollections.tsx — Replaced generic section loader with FeaturedCollectionsSkeleton.
components/product/ProductCardImage.tsx — Added isGlobalTryOnEnabled and isTryOnReady conditions for the product card try-on badge.
components/product/ProductDetails.tsx — Guarded virtual try-on launch button with global toggle and dual-earring assets.
components/product/ProductsListing.tsx — Adjusted top padding for header alignment.
components/try-on/TryOnStudio.tsx — Added graceful "Temporarily Unavailable" fallback view when try-on is globally toggled off.
components/ui/loaders/ProductsListingSkeleton.tsx — Adjusted skeleton header padding to match listing.
lib/ar/anchors.ts — Refined mathematical formulas for earlobe anchors and suprasternal notch necklace placement.
lib/hooks/useARSession.ts — Added placement diagnostics interface and dual-earring ear-side resolution in the rendering pipeline.
lib/services/companyProfileService.ts — Added enableTryOn field to public profile interface.
lib/services/productService.ts — Added mapping for arLeftEarringImage, arRightEarringImage, and arDisabledViews, and added cache: "no-store" to getProductById.
lib/types/ar.ts — Added leftEarringDataUrl and rightEarringDataUrl to JewelryAsset.
lib/types/product.ts — Added dual earring and disabled view fields to ApiProduct and Product types.
Untracked:
components/ui/loaders/FeaturedCollectionsSkeleton.tsx — Skeleton component for Featured Collections.
components/ui/loaders/HomePromoSkeleton.tsx — Skeleton component for Home Promo Section.