aboutsummaryrefslogtreecommitdiff
path: root/src/frontend/app
diff options
context:
space:
mode:
authorAriel Costas Guerrero <ariel@costas.dev>2025-11-30 19:17:02 +0100
committerAriel Costas Guerrero <ariel@costas.dev>2025-11-30 19:17:02 +0100
commitcee521142a4e0673b155d97c3e4825b7fec1987f (patch)
treee8030687f62a63c34ad69cb81eefe8470c55cfee /src/frontend/app
parente7283ba10d45b42e1274cd13c3d6aabec57c85b4 (diff)
Refactor street name processing and remove unused stop downloader script
- Updated `street_name.py` to simplify street name handling by removing the `re_remove_street_type` regex and exception streets list, replacing them with a dictionary for name replacements. - Deleted the `download-stops.py` script from the Santiago stop downloader, which was no longer needed. - Removed the empty `.gitkeep` file from the overrides directory. - Added a new `VigoController` class to handle stop estimates and timetables, including error handling for missing data. - Introduced `LineFormatterService` to format circulation routes based on specific line conditions.
Diffstat (limited to 'src/frontend/app')
-rw-r--r--src/frontend/app/components/LineIcon.css3
-rw-r--r--src/frontend/app/components/Stops/ConsolidatedCirculationCard.css4
-rw-r--r--src/frontend/app/components/Stops/ConsolidatedCirculationListSkeleton.tsx50
-rw-r--r--src/frontend/app/root.css2
4 files changed, 29 insertions, 30 deletions
diff --git a/src/frontend/app/components/LineIcon.css b/src/frontend/app/components/LineIcon.css
index 50f2d5f..01ff2bd 100644
--- a/src/frontend/app/components/LineIcon.css
+++ b/src/frontend/app/components/LineIcon.css
@@ -64,10 +64,13 @@
--line-psa4: hsl(120, 100%, 30%);
--line-ptl: hsl(120, 60%, 70%);
--line-tur: hsl(300, 33%, 30%);
+ --line-tur-text: hsl(0, 0%, 100%);
--line-u1: hsl(30, 80%, 20%);
--line-u1-text: hsl(0, 0%, 100%);
--line-u2: hsl(30, 80%, 20%);
--line-u2-text: hsl(0, 0%, 100%);
+ --line-vts: hsl(300, 33%, 30%);
+ --line-vts-text: hsl(0, 0%, 100%);
}
.line-icon-default {
diff --git a/src/frontend/app/components/Stops/ConsolidatedCirculationCard.css b/src/frontend/app/components/Stops/ConsolidatedCirculationCard.css
index 8a442c3..3dc33ea 100644
--- a/src/frontend/app/components/Stops/ConsolidatedCirculationCard.css
+++ b/src/frontend/app/components/Stops/ConsolidatedCirculationCard.css
@@ -1,4 +1,4 @@
-@reference "../../root.css";
+@import "tailwindcss";
.consolidated-circulation-card {
all: unset;
@@ -129,7 +129,7 @@
border-radius: 999px;
background: rgba(0, 0, 0, 0.03);
- @apply flex items-center justify-center gap-1 flex-shrink-0 bg-gray-200/30 dark:bg-gray-600/30;
+ @apply flex items-center justify-center gap-1 shrink-0 bg-gray-200/30 dark:bg-gray-600/30;
}
.meta-chip.delay-ok {
diff --git a/src/frontend/app/components/Stops/ConsolidatedCirculationListSkeleton.tsx b/src/frontend/app/components/Stops/ConsolidatedCirculationListSkeleton.tsx
index 90d92e2..c99b883 100644
--- a/src/frontend/app/components/Stops/ConsolidatedCirculationListSkeleton.tsx
+++ b/src/frontend/app/components/Stops/ConsolidatedCirculationListSkeleton.tsx
@@ -9,41 +9,39 @@ export const ConsolidatedCirculationListSkeleton: React.FC = () => {
baseColor="var(--skeleton-base)"
highlightColor="var(--skeleton-highlight)"
>
- <div className="consolidated-circulation-container">
+ <>
<div className="consolidated-circulation-caption">
<Skeleton width="60%" style={{ maxWidth: "300px" }} />
</div>
- <div className="consolidated-circulation-list">
- {[1, 2, 3, 4, 5].map((i) => (
- <div key={i} className="consolidated-circulation-card">
- <div className="card-header">
- <div className="line-info">
- <Skeleton width={40} height={28} borderRadius={4} />
- </div>
-
- <div className="route-info">
- <Skeleton width="80%" height={18} />
- </div>
+ {[1, 2, 3, 4, 5].map((i) => (
+ <div
+ key={i}
+ className="consolidated-circulation-card"
+ style={{ marginBottom: "0.75rem" }}
+ >
+ <div className="card-row main">
+ <div className="line-info">
+ <Skeleton width={40} height={28} borderRadius={4} />
+ </div>
- <div className="time-info">
- <Skeleton width={70} height={24} />
- <Skeleton width={50} height={14} />
- </div>
+ <div className="route-info">
+ <Skeleton width="80%" height={18} />
</div>
- <div className="card-footer">
- <Skeleton width="90%" height={14} />
- <Skeleton
- width="70%"
- height={14}
- style={{ marginTop: "4px" }}
- />
+ <div className="eta-badge">
+ <Skeleton width={50} height={40} borderRadius={12} />
</div>
</div>
- ))}
- </div>
- </div>
+
+ <div className="card-row meta">
+ <Skeleton width={90} height={20} borderRadius={999} />
+ <Skeleton width={70} height={20} borderRadius={999} />
+ <Skeleton width={60} height={20} borderRadius={999} />
+ </div>
+ </div>
+ ))}
+ </>
</SkeletonTheme>
);
};
diff --git a/src/frontend/app/root.css b/src/frontend/app/root.css
index c880763..8c3ef47 100644
--- a/src/frontend/app/root.css
+++ b/src/frontend/app/root.css
@@ -1,5 +1,3 @@
-@import "tailwindcss";
-
:root {
--colour-scheme: light;
--background-color: #ffffff;