From a18220724e12908b5fa589725d9030c167515e24 Mon Sep 17 00:00:00 2001 From: tarunsinghofficial Date: Tue, 21 Jan 2025 19:45:41 +0530 Subject: [PATCH 1/5] ui: add padding in StandalonePage to make responsive --- src/components/StandalonePage.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/StandalonePage.svelte b/src/components/StandalonePage.svelte index f523fbe..b8a72b4 100644 --- a/src/components/StandalonePage.svelte +++ b/src/components/StandalonePage.svelte @@ -8,6 +8,6 @@ let { children } = $props(); -
+
{@render children?.()}
From 93c4ed9b86a816f383feb07776a3885df05350bf Mon Sep 17 00:00:00 2001 From: tarunsinghofficial Date: Tue, 21 Jan 2025 19:57:59 +0530 Subject: [PATCH 2/5] Remove unnecessary ternary operation for cleaner code in schedule table rendering --- .../schedule-for-stop/RouteScheduleTable.svelte | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/components/schedule-for-stop/RouteScheduleTable.svelte b/src/components/schedule-for-stop/RouteScheduleTable.svelte index fa1a20a..ac6073f 100644 --- a/src/components/schedule-for-stop/RouteScheduleTable.svelte +++ b/src/components/schedule-for-stop/RouteScheduleTable.svelte @@ -63,11 +63,12 @@ > {formatHour(hour)} AM - + {#each times as stopTime, index (index)} {extractMinutes(stopTime.arrivalTime)} - {index < times.length - 1 ? ', ' : ''} {/each} @@ -96,11 +97,12 @@ > {formatHour(hour)} PM - + {#each times as stopTime, index (index)} {extractMinutes(stopTime.arrivalTime)} - {index < times.length - 1 ? ', ' : ''} {/each} From 434470a73d93ae3f788e3e135d3e8c38fbc99ed6 Mon Sep 17 00:00:00 2001 From: tarunsinghofficial Date: Tue, 21 Jan 2025 20:03:21 +0530 Subject: [PATCH 3/5] Refactor UI: Combine 'Collapse All' and 'Show All' buttons into a single toggle button for improved usability --- .../stops/[stopID]/schedule/+page.svelte | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/routes/stops/[stopID]/schedule/+page.svelte b/src/routes/stops/[stopID]/schedule/+page.svelte index 627f2b2..fa4e913 100644 --- a/src/routes/stops/[stopID]/schedule/+page.svelte +++ b/src/routes/stops/[stopID]/schedule/+page.svelte @@ -21,6 +21,7 @@ let stopDirection = $state(''); let loading = $state(true); let accordionComponent = $state(); + let allRoutesExpanded = $state(false); let schedulesMap = new Map(); let routeReference = new Map(); @@ -105,6 +106,15 @@ return grouped; } + function toggleAllRoutes() { + if (allRoutesExpanded) { + accordionComponent.closeAll(); + } else { + accordionComponent.openAll(); + } + allRoutesExpanded = !allRoutesExpanded; + } + onMount(async () => { const formattedDate = currentDate.toISOString().split('T')[0]; await fetchScheduleForStop(stopId, formattedDate); @@ -148,11 +158,10 @@
- -
From 469ee9a0ad31b94967ca298367cefa09807aefe6 Mon Sep 17 00:00:00 2001 From: tarunsinghofficial Date: Tue, 21 Jan 2025 20:17:20 +0530 Subject: [PATCH 4/5] added padding in accordion item for better UI --- src/components/containers/AccordionItem.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/containers/AccordionItem.svelte b/src/components/containers/AccordionItem.svelte index ce0466a..9b3d45f 100644 --- a/src/components/containers/AccordionItem.svelte +++ b/src/components/containers/AccordionItem.svelte @@ -21,7 +21,7 @@
-
+