@bytebrand/fe-ui-core-autobahn 1.0.223 → 1.0.225

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1328,15 +1328,11 @@ export interface FinanceDetailsModalProps {
1328
1328
  /** the price-rating badge + bar were clicked: the page closes the modal and scrolls to its
1329
1329
  * "Preis & Marktwert" section (#vdp-preis). Omit and they are not a link. */
1330
1330
  onShowPriceRating?: () => void;
1331
- /** opened directly via the page's Finanzierungs-/Leasingdetails link — the sheet opens
1332
- * scrolled to the breakdown instead of the "Rate anpassen" controls at its top. */
1331
+ /** opened directly via the page's Finanzierungs-/Leasingdetails link — on mobile the sheet
1332
+ * opens expanded (full height) instead of sized to the "Rate anpassen" controls. It always
1333
+ * opens at its top: no automatic scroll down to the "Repräsentatives Beispiel" (auto.de
1334
+ * feedback 25.11), neither in the mobile sheet nor in the desktop popup. */
1333
1335
  initialShowBreakdown?: boolean;
1334
- /** skips the smooth scrollIntoView/scrollSheetToBreakdown animation initialShowBreakdown
1335
- * otherwise triggers on open (still sets showBreakdown itself) — for a consumer whose sheet
1336
- * has nothing ABOVE the breakdown to scroll past (e.g. checkout's stripped-down instance,
1337
- * with the rate hero/sliders/toggles above it hidden), that animation has nowhere real to go
1338
- * and only reads as a stray jump. */
1339
- skipInitialScroll?: boolean;
1340
1336
  /** mobile only — price-rating label, drives the eval pill/bar (same as the collapsed card). */
1341
1337
  ratingLabel?: string;
1342
1338
  /** Kaufen tab only — real carStore.isAvailable (same source as VdpTrustRow's "Sofort
@@ -1413,7 +1409,6 @@ export const FinanceDetailsModal: React.FunctionComponent<FinanceDetailsModalPro
1413
1409
  onClose,
1414
1410
  onShowPriceRating,
1415
1411
  initialShowBreakdown,
1416
- skipInitialScroll,
1417
1412
  ratingLabel,
1418
1413
  available,
1419
1414
  onModeChange,
@@ -1438,10 +1433,7 @@ export const FinanceDetailsModal: React.FunctionComponent<FinanceDetailsModalPro
1438
1433
  // anpassen") or expanded (opened directly via the page's details link) — reset on every open,
1439
1434
  // since this component stays mounted (the page always renders it, gated by `open`).
1440
1435
  const [showBreakdown, setShowBreakdown] = React.useState(!!initialShowBreakdown);
1441
- // Desktop always shows the breakdown inline but it can sit below the fold of .fin-modal-body's
1442
- // own scroll area too — whichever of the two refs is actually visible (show-mobile/hide-mobile
1443
- // via CSS) is the one scrolled to.
1444
- const desktopBreakdownRef = React.useRef<HTMLDivElement | null>(null);
1436
+ // the mobile sheet's breakdown — the in-sheet details link scrolls to it.
1445
1437
  const mobileBreakdownRef = React.useRef<HTMLDivElement | null>(null);
1446
1438
  // mobile (ADV-276): the sheet opens sized to its rate controls — its bottom edge sits right
1447
1439
  // under the "Finanzierungs-/Leasing-Details" link (the [data-sheet-fold] element; on Kaufen its
@@ -1528,18 +1520,12 @@ export const FinanceDetailsModal: React.FunctionComponent<FinanceDetailsModalPro
1528
1520
  React.useEffect(() => {
1529
1521
  if (!open) setSheetAnimated(false);
1530
1522
  }, [open]);
1531
- // opened directly via the page's details link: open expanded and scrolled to the breakdown.
1523
+ // opened directly via the page's details link: the mobile sheet opens expanded, but at its top —
1524
+ // no auto-scroll to the "Repräsentatives Beispiel" (auto.de feedback 25.11).
1532
1525
  React.useEffect(() => {
1533
1526
  if (!open) return;
1534
1527
  setShowBreakdown(!!initialShowBreakdown);
1535
- if (!initialShowBreakdown || skipInitialScroll) return;
1536
- const timer = window.setTimeout(() => {
1537
- if (mobileBreakdownRef.current?.offsetParent) scrollSheetToBreakdown();
1538
- else desktopBreakdownRef.current?.scrollIntoView({ behavior: 'smooth', block: 'start' });
1539
- }, 50);
1540
- return () => window.clearTimeout(timer);
1541
- // eslint-disable-next-line react-hooks/exhaustive-deps
1542
- }, [open, initialShowBreakdown, skipInitialScroll]);
1528
+ }, [open, initialShowBreakdown]);
1543
1529
  // in-sheet details link: expanding scrolls down to the breakdown, collapsing back to the top.
1544
1530
  const revealBreakdownRef = React.useRef(false);
1545
1531
  React.useEffect(() => {
@@ -2099,7 +2085,7 @@ export const FinanceDetailsModal: React.FunctionComponent<FinanceDetailsModalPro
2099
2085
  t={t}
2100
2086
  />
2101
2087
  )}
2102
- <div ref={desktopBreakdownRef} style={!isCash ? { marginTop: 18 } : undefined}>
2088
+ <div style={!isCash ? { marginTop: 18 } : undefined}>
2103
2089
  {!isCash && (
2104
2090
  <>
2105
2091
  <p