Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix elevator closure row heights and truncate wrapping text #2422

Merged
merged 8 commits into from
Jan 31, 2025
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion assets/css/v2/elevator/closures.scss
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
.closure-list {
display: flex;
flex-flow: column wrap;
height: 904px;
height: 1048px;
transform: translateX(calc(-100% * var(--closure-list-offset)));

.closure-row {
Expand Down Expand Up @@ -122,8 +122,13 @@

&__elevator-name.list-item {
display: list-item;
margin-right: 48px;
margin-bottom: 8px;
margin-left: 48px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
list-style-position: inside;
}

&__summary.important {
Expand Down
22 changes: 12 additions & 10 deletions assets/src/components/v2/elevator/closures.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,18 @@ const ClosureRow = ({
)}
</div>

{closures.map((closure) => (
<div
key={closure.id}
className={cx("closure-row__elevator-name", {
"list-item": closures.length > 1,
})}
>
{closure.name} ({closure.id})
</div>
))}
{closures.map((closure) => {
return (
<div
key={closure.id}
className={cx("closure-row__elevator-name", {
"list-item": closures.length > 1,
})}
>
{closure.name} ({closure.id})
</div>
);
})}
digitalcora marked this conversation as resolved.
Show resolved Hide resolved

<div className={cx("closure-row__summary", { important: summary })}>
{summary ?? "Accessible route available"}
Expand Down