@bytebrand/fe-ui-core-autobahn 1.0.2 → 1.0.3

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.
@@ -495,35 +495,35 @@ export interface GalleryBadgesProps {
495
495
 
496
496
  /**
497
497
  * Trust/activity pill row rendered under the gallery on the SRP list card — mirrors the mobile
498
- * VDP gallery header (availability · views · favorites · Geprüft). Availability/views/favorites
499
- * are real data and each pill is omitted when its value isn't present yet; 'Geprüft' is auto.de's
500
- * general inspection/warranty promise (same claim as the legacy VDP trust strip, e.g.
501
- * VehicleDetailedSliderModal/Sidebar.tsx), not per-car data, so it always renders — it exists here
502
- * mainly so the row never looks empty while the async view/favorite counts are still loading.
498
+ * VDP gallery header (availability · views · favorites · Geprüft).
499
+ *
500
+ * PM decision (2026-07-10, Viktoriia — "this logic already exists on prod"): the row is all-or-
501
+ * nothing. A missing or zero view/favorite count is NOT shown as "0×" — the whole row (including
502
+ * the always-on availability/Geprüft pills) is hidden rather than reading as an empty/broken card.
503
+ * It only appears once BOTH counts are real and positive.
503
504
  */
504
- export const GalleryBadges: React.FunctionComponent<GalleryBadgesProps> = ({ car, t }) => (
505
- <div className="gallery-badges">
506
- {car.availability && (
507
- <span className="gallery-pill gallery-pill--good">
508
- <Icon name="circle-check" size={14} stroke={2} />
509
- {car.availability}
510
- </span>
511
- )}
512
- {car.viewsCount != null && (
505
+ export const GalleryBadges: React.FunctionComponent<GalleryBadgesProps> = ({ car, t }) => {
506
+ if (!car.viewsCount || !car.favoritesCount) return null;
507
+ return (
508
+ <div className="gallery-badges">
509
+ {car.availability && (
510
+ <span className="gallery-pill">
511
+ <Icon name="circle-check" size={16} stroke={2} color="var(--md-good)" />
512
+ {car.availability}
513
+ </span>
514
+ )}
513
515
  <span className="gallery-pill">
514
- <Icon name="eye" size={14} stroke={1.9} />
516
+ <Icon name="eye" size={16} stroke={1.9} />
515
517
  {t('autobahn:card.activity.viewsCount', { count: car.viewsCount })}
516
518
  </span>
517
- )}
518
- {car.favoritesCount != null && (
519
519
  <span className="gallery-pill">
520
- <Icon name="heart" size={14} stroke={1.9} />
520
+ <Icon name="heart" size={16} stroke={1.9} />
521
521
  {t('autobahn:card.activity.favoritesCount', { count: car.favoritesCount })}
522
522
  </span>
523
- )}
524
- <span className="gallery-pill">
525
- <Icon name="shield-check" size={14} stroke={1.9} />
526
- {t('autobahn:card.trust.checked')}
527
- </span>
528
- </div>
529
- );
523
+ <span className="gallery-pill">
524
+ <Icon name="shield-check" size={16} stroke={1.9} />
525
+ {t('autobahn:card.trust.checked')}
526
+ </span>
527
+ </div>
528
+ );
529
+ };
package/cards/types.ts CHANGED
@@ -113,8 +113,10 @@ export interface AutobahnCar {
113
113
  views?: number;
114
114
 
115
115
  // --- gallery activity strip (real data: UserActionsAPI 'stats/viewers', loaded async and
116
- // keyed by carId in SearchResultsStore.statsData — see fieldMapping.ts). Absent until
117
- // that fetch resolves; the gallery badge row simply omits the pill until then. ---
116
+ // keyed by carId in SearchResultsStore.statsData — see fieldMapping.ts). Absent until that
117
+ // fetch resolves. PM decision: the WHOLE badge row (availability/views/favorites/Geprüft)
118
+ // is all-or-nothing — it renders only when BOTH counts are present and > 0; a missing or
119
+ // zero count hides the entire row rather than showing a "0×" pill (GalleryBadges). ---
118
120
  /** total detail-page views (stats totalCarImpCount) — shown as the eye pill under the image. */
119
121
  viewsCount?: number;
120
122
  /** total users who favorited this car (stats totalFavCount) — shown as the heart pill under the image. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bytebrand/fe-ui-core-autobahn",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "auto.de md3 (Autobahn) design system — UI primitives, cards, chrome, VDP modules, theme CSS and locales. Ships raw TypeScript source (like fe-ui-core before it); each consumer's bundler compiles it.",
5
5
  "main": "index.ts",
6
6
  "license": "UNLICENSED",
package/theme/md3.css CHANGED
@@ -1006,13 +1006,13 @@
1006
1006
  /* wraps the carousel + its absolute overlays; flexes to fill whatever height the badge row below
1007
1007
  doesn't need, so the row height stays governed by the grid (like before this row existed). */
1008
1008
  .md3 .listcard-media-img { position: relative; flex: 1 1 auto; min-height: 0; }
1009
- /* activity/trust pill row under the SRP card image (availability · views · favorites · Geprüft) */
1010
- .md3 .gallery-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 10px;
1009
+ /* activity/trust pill row under the SRP card image (availability · views · favorites · Geprüft).
1010
+ Sizing/radius per Figma spec: 30px tall, 11px corner radius (NOT a full pill), 1px border. */
1011
+ .md3 .gallery-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px;
1011
1012
  border-top: 1px solid var(--md-outline-variant); background: var(--md-sc-lowest); flex: none; }
1012
- .md3 .gallery-pill { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px;
1013
- border-radius: var(--md-r-full); border: 1px solid var(--md-outline-variant); background: var(--md-sc-lowest);
1014
- color: var(--md-on-surface); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
1015
- .md3 .gallery-pill--good { color: var(--md-good); border-color: var(--md-good); }
1013
+ .md3 .gallery-pill { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px;
1014
+ border-radius: 11px; border: 1px solid var(--md-outline-variant); background: var(--md-sc-lowest);
1015
+ color: var(--md-on-surface); font-size: 13px; font-weight: 600; white-space: nowrap; }
1016
1016
  .md3 .listcard-info { padding: 16px 18px; display: flex; flex-direction: column; gap: 11px; min-width: 0; }
1017
1017
  .md3 .listcard-price { position: relative; padding: 16px 18px; border-left: 1px solid var(--md-outline-variant);
1018
1018
  display: flex; flex-direction: column; justify-content: flex-start; gap: 16px; background: var(--md-sc-low); }