From 2134253660895076a7a5f21e1b5ee95b68ac4b69 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Mon, 24 Nov 2025 18:45:42 -0800 Subject: [PATCH 01/12] looks decent --- .../HarnessSelector/HarnessSelector.svelte | 2 +- .../ProductDescriptions/CommaFour.svelte | 23 +++++++++++++++++++ src/lib/constants/vehicles.js | 2 +- 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/src/lib/components/HarnessSelector/HarnessSelector.svelte b/src/lib/components/HarnessSelector/HarnessSelector.svelte index 0afa38f7..53a89d8b 100644 --- a/src/lib/components/HarnessSelector/HarnessSelector.svelte +++ b/src/lib/components/HarnessSelector/HarnessSelector.svelte @@ -69,7 +69,7 @@ let inputValue = ""; let inputRef; - $: filteredItems = $harnesses.filter(item => + $: filteredItems = $harnesses.filter(item => normalizeDiacritics(item.car.toLowerCase()).match(normalizeDiacritics(inputValue.toLowerCase())) ); diff --git a/src/lib/components/ProductDescriptions/CommaFour.svelte b/src/lib/components/ProductDescriptions/CommaFour.svelte index a018338c..e4dd9fbf 100644 --- a/src/lib/components/ProductDescriptions/CommaFour.svelte +++ b/src/lib/components/ProductDescriptions/CommaFour.svelte @@ -116,6 +116,15 @@ showNoHarnessOption={true} > +
+
+ Trade-in +
+
+ Get $250 credit when you trade in your old comma device. Any comma device, in any condition. + Instructions and Terms. +
+
Get $250 credit when you trade in your old comma device. Any comma device, in any condition. Instructions and Terms @@ -206,6 +215,20 @@ margin: 1rem 0; } + .trade-in { + & .title { + margin-top: 1rem; + font-size: 1.5rem; + font-weight: 600; + } + + & .description { + font-size: 1rem; + color: #000000A6; + } + + } + .harness-price { display: flex; } diff --git a/src/lib/constants/vehicles.js b/src/lib/constants/vehicles.js index 50a064b3..c515b10b 100644 --- a/src/lib/constants/vehicles.js +++ b/src/lib/constants/vehicles.js @@ -3,4 +3,4 @@ import vehicles from '$lib/vehicles.json' export const vehicleCountText = `${Math.round(Object.values(vehicles).reduce((sum, list) => sum + list.length, 0) / 25) * 25}+`; // Harness selection options -export const NO_HARNESS_OPTION = { car: "I already have a car harness" }; +export const NO_HARNESS_OPTION = { car: "I already have a car harness (-$50)" }; From 525b803c855cbf572f97126dcbe70da743055e6b Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Mon, 24 Nov 2025 19:07:15 -0800 Subject: [PATCH 02/12] button group --- src/lib/components/ButtonGroup.svelte | 62 +++++++++++++++++++ .../ProductDescriptions/CommaFour.svelte | 19 ++++-- 2 files changed, 77 insertions(+), 4 deletions(-) create mode 100644 src/lib/components/ButtonGroup.svelte diff --git a/src/lib/components/ButtonGroup.svelte b/src/lib/components/ButtonGroup.svelte new file mode 100644 index 00000000..c44f5767 --- /dev/null +++ b/src/lib/components/ButtonGroup.svelte @@ -0,0 +1,62 @@ + + +
+ + + +
+ + diff --git a/src/lib/components/ProductDescriptions/CommaFour.svelte b/src/lib/components/ProductDescriptions/CommaFour.svelte index e4dd9fbf..fca553fb 100644 --- a/src/lib/components/ProductDescriptions/CommaFour.svelte +++ b/src/lib/components/ProductDescriptions/CommaFour.svelte @@ -2,6 +2,7 @@ import Product from "$lib/components/Product.svelte"; import NoteCard from "$lib/components/NoteCard.svelte"; import CheckboxCard from "$lib/components/CheckboxCard.svelte"; + import ButtonGroup from "$lib/components/ButtonGroup.svelte"; import Accordion from "$lib/components/Accordion.svelte"; import Badge from "$lib/components/Badge.svelte"; import HarnessSelector from "$lib/components/HarnessSelector/HarnessSelector.svelte"; @@ -19,6 +20,7 @@ import { onMount } from 'svelte'; import { getProduct } from '$lib/utils/shopify'; import { products as productsData } from '$lib/data/products.js'; + import Button from "$lib/components/Button.svelte"; export let product; let additionalProductIds = []; @@ -116,6 +118,7 @@ showNoHarnessOption={true} > +
Trade-in @@ -125,10 +128,18 @@ Instructions and Terms.
- - Get $250 credit when you trade in your old comma device. Any comma device, in any condition. - Instructions and Terms - + + console.log(val)}> + + + + + + +
From 0b234e6e08343b8340465866fd7119d0258e6263 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Mon, 24 Nov 2025 19:08:30 -0800 Subject: [PATCH 03/12] unselect --- src/lib/components/ButtonGroup.svelte | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/lib/components/ButtonGroup.svelte b/src/lib/components/ButtonGroup.svelte index c44f5767..6bbac993 100644 --- a/src/lib/components/ButtonGroup.svelte +++ b/src/lib/components/ButtonGroup.svelte @@ -7,8 +7,12 @@ const handleSelect = (selectedValue) => { console.log("Selected value:", selectedValue); - value = selectedValue; - onSelect && onSelect(selectedValue); + if (value === selectedValue) { + value = null; + } else { + value = selectedValue; + } + onSelect && onSelect(value); }; $: option1 = options[0] || {}; From c16fe3d8ab3741a8b041de1257caa5d844c73a67 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Mon, 24 Nov 2025 19:15:27 -0800 Subject: [PATCH 04/12] style --- src/lib/components/ButtonGroup.svelte | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/lib/components/ButtonGroup.svelte b/src/lib/components/ButtonGroup.svelte index 6bbac993..3da65947 100644 --- a/src/lib/components/ButtonGroup.svelte +++ b/src/lib/components/ButtonGroup.svelte @@ -20,19 +20,19 @@
-
diff --git a/src/lib/components/ProductDescriptions/CommaFour.svelte b/src/lib/components/ProductDescriptions/CommaFour.svelte index 04e33333..6a2b5387 100644 --- a/src/lib/components/ProductDescriptions/CommaFour.svelte +++ b/src/lib/components/ProductDescriptions/CommaFour.svelte @@ -150,12 +150,9 @@
-
- $250 credit -
From e15da66b8ca8e43d75a54bbf64bfd564c0f91081 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Mon, 24 Nov 2025 20:23:08 -0800 Subject: [PATCH 09/12] center second --- src/lib/components/ButtonGroup.svelte | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib/components/ButtonGroup.svelte b/src/lib/components/ButtonGroup.svelte index 8f8e233b..eedbaee6 100644 --- a/src/lib/components/ButtonGroup.svelte +++ b/src/lib/components/ButtonGroup.svelte @@ -104,6 +104,10 @@ gap: 0.5rem; } + .button:last-child .card hgroup .title-row { + justify-content: center; + } + .button .card hgroup .title-row .title { font-family: JetBrains Mono, monospace; font-size: 0.875rem; From 95cf64cd0d40fcc3b56d384979abe5748b879925 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Mon, 24 Nov 2025 20:28:34 -0800 Subject: [PATCH 10/12] stash --- src/lib/components/ButtonGroup.svelte | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/components/ButtonGroup.svelte b/src/lib/components/ButtonGroup.svelte index eedbaee6..5e6cc6db 100644 --- a/src/lib/components/ButtonGroup.svelte +++ b/src/lib/components/ButtonGroup.svelte @@ -109,10 +109,11 @@ } .button .card hgroup .title-row .title { - font-family: JetBrains Mono, monospace; - font-size: 0.875rem; + /*font-family: JetBrains Mono, monospace;*/ + /*font-size: 0.875rem;*/ + font-size: 1rem; font-weight: 400; - text-transform: uppercase; + /*text-transform: uppercase;*/ line-height: 1.1; color: black; } @@ -122,7 +123,6 @@ font-size: 0.875rem; font-weight: 400; text-transform: none; - color: #666; text-align: right; line-height: 1.1; } From d13f8e8efa654ce6ba1e94343192e095cb93be9f Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Mon, 24 Nov 2025 20:50:13 -0800 Subject: [PATCH 11/12] wrap --- src/lib/components/ButtonGroup.svelte | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib/components/ButtonGroup.svelte b/src/lib/components/ButtonGroup.svelte index 5e6cc6db..0323b276 100644 --- a/src/lib/components/ButtonGroup.svelte +++ b/src/lib/components/ButtonGroup.svelte @@ -57,6 +57,10 @@ align-items: stretch; gap: 1rem; margin: 1rem 0 0; + + @media screen and (max-width: 1300px) { + flex-direction: column; + } } .button { From 05f3da905498b2177fb0746ecb37f91180733631 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Mon, 24 Nov 2025 20:56:20 -0800 Subject: [PATCH 12/12] more --- src/lib/components/ButtonGroup.svelte | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/lib/components/ButtonGroup.svelte b/src/lib/components/ButtonGroup.svelte index 0323b276..e4b1d2b4 100644 --- a/src/lib/components/ButtonGroup.svelte +++ b/src/lib/components/ButtonGroup.svelte @@ -138,11 +138,25 @@ line-height: 1.25; } - .button.checked .card { - background-color: var(--color-accent); + .button:nth-child(1).checked .card { + /*background-color: var(--color-accent);*/ + /*cool #51ff00 green gradient bottom left to top right*/ + /*background: linear-gradient(135deg, #51ff00 0%, #00c800 100%);*/ + background: linear-gradient(to bottom left, #51ff00 0%, #6CDA3A 100%); + /*border-color: var(--color-accent);*/ + /*border: 4px solid var(--color-accent);*/ } - .button.checked .card hgroup span { + .button:nth-child(2).checked .card { + background-color: black; + color: white; + } + + .button:nth-child(1).checked .card hgroup span { color: black; } + + .button:nth-child(2).checked .card hgroup span { + color: white; + }