Skip to content

Commit

Permalink
feat: Elevator Closures list (#2288)
Browse files Browse the repository at this point in the history
* API additions needed for Elevators.

* Added new CG.

* Return maps with all info client will need.

* Added mock support for tests.

* Added CG tests.

* Fixed reference to key.

* Improved test.

* Credo.

* Logger error if one is returned.

* Address PR feedback.

* Simplify business logic so it all lives in CG.

* Credo.

* Fix serialization.

* Implement list without paging.

* Add paging.

* Added route pills.

* Fix horizontal rules.

* Generate pages before rendering any alerts.

* Added paging indicators.

* Fix tests.

* CSS styles.

* Drop refresh rate to 7 seconds.

* Simplify paging.

* Fix horizontal rules.

* Fixed paging logic.

* Group alerts by station.

* Renamed variable.

* Added a test.

* Update refresh interval.

* Various spacing/sizing fixes.

* Address PR feedback.

* Refactored out common hooks for client paging.

* Fix issue with data not updating if there is only one page.

* Fixed styles on rows with short descriptions.

* Simplify page index array generation.

* Import LCD screen container styles.

* Fix variable names.

* Revert changes to LocationContext.

* Tweak CSS to use compatible features.

* Use structs instead of plain maps.

* Couple more style tweaks.
  • Loading branch information
cmaddox5 authored Nov 15, 2024
1 parent 85fb64d commit 452160d
Show file tree
Hide file tree
Showing 20 changed files with 846 additions and 85 deletions.
1 change: 1 addition & 0 deletions assets/css/colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ $line-color-ferry: #008eaa;

$alert-yellow: #fd0;

$true-grey-45: #737373;
$true-grey-70: #b2b1af;

$warm-neutral-80: #cccbc8;
Expand Down
3 changes: 3 additions & 0 deletions assets/css/elevator_v2.scss
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
@import "https://rsms.me/inter/inter.css";
@import "colors";
@import "v2/lcd_common/screen_container";
@import "v2/elevator/elevator_closures";
@import "v2/elevator/normal";
@import "v2/simulation_common";
@import "v2/lcd_common/simulation";
@import "v2/elevator/header";
@import "v2/elevator/footer";
@import "v2/lcd_common/route_pill";

body {
margin: 0;
font-family: Inter;
}

.multi-screen-page {
Expand Down
137 changes: 124 additions & 13 deletions assets/css/v2/elevator/elevator_closures.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,148 @@
display: flex;
flex-direction: column;
height: 100%;
font-family: Inter, sans-serif;
background-color: $warm-neutral-90;

.in-station-summary {
display: flex;
justify-content: space-between;
padding: 24px 58px;
padding: 24px 48px;
font-size: 48px;
font-weight: 400;
line-height: 64px;
color: $cool-black-30;

.text {
margin-right: 82px;
}
}

hr {
width: 100%;
height: 24px;
margin-top: 0;
margin-bottom: 0;
hr.thick {
min-height: 24px;
margin: 0;
background-color: $cool-black-15;
border: none;
}

hr.thin {
min-height: 2px;
margin: 24px 0 0;
background-color: $true-grey-45;
border: none;
opacity: 0.5;
}

.outside-alert-list {
.outside-closure-list {
position: relative;
height: 100%;
background-color: $warm-neutral-90;

.header {
.header-container {
margin: 48px;
margin-bottom: 0;

.header {
display: flex;
max-height: 432px;
font-size: 112px;
font-weight: 700;
line-height: 112px;

&__title {
word-spacing: 9999px;
}
}
}

.closure-list-container {
overflow: hidden;

.closure-list {
display: flex;
flex-flow: column wrap;
height: 904px;
transform: translateX(calc(-100% * var(--closure-list-offset)));

.closure-row {
max-width: 1080px;
padding: 0 48px;
margin-top: 24px;

&__station-name {
font-size: 62px;
font-weight: 600;
line-height: 80px;
color: $cool-black-15;
}

&__name-and-pills {
display: flex;
align-items: center;
margin-bottom: 14px;

.route-pill {
width: 132px;
height: 68.13px;
margin-right: 24px;

&__text {
line-height: 68.13px;
}

&__icon {
height: 100%;
}

&__icon-image {
height: 100%;
margin-top: 0;
}
}
}

&__elevator-name {
line-height: 64px;
}

&__elevator-name.list-item {
display: list-item;
margin-bottom: 8px;
margin-left: 48px;
}
}
}
}

.paging-info-container {
position: absolute;
bottom: 0;
display: flex;
padding: 48px;
font-size: 150px;
font-weight: 700;
line-height: 150px;
justify-content: space-between;
width: 100%;
height: 72px;
margin-bottom: 20px;

.more-elevators-text {
align-self: center;
padding: 0 48px 20px;
}

.paging-indicators {
display: flex;
align-items: center;
margin-right: 66px;

.paging-indicator:first-child:not(:only-child) {
margin-right: 27px;
}
}
}

.paging-info-container,
.closure-row__elevator-name {
font-size: 48px;
font-weight: 400;
color: $cool-black-30;
}
}
}
Loading

0 comments on commit 452160d

Please sign in to comment.