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

feat: Update detour list page and table styles for mobile #2774

Merged
merged 1 commit into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 3 additions & 1 deletion assets/css/detours/_detour_table.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ $table-border-radius: 0.5rem;
tr {
th:first-child,
td:first-child {
border-left: $table-border;
@include media-breakpoint-up(md) {
border-left: $table-border;
}
}

th:last-child,
Expand Down
4 changes: 2 additions & 2 deletions assets/src/components/detourListPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ export const DetourListPage = () => {
const [showDetourModal, setShowDetourModal] = useState(false)

return (
<div className="c-detour-list-page h-100 overflow-y-auto p-4 bg-white">
<div className="c-detour-list-page h-100 overflow-y-auto p-0 p-md-4 bg-white">
{userInTestGroup(TestGroups.DetoursPilot) && (
<Button
className="c-detour-list-page__button icon-link fw-light px-3 py-2"
className="c-detour-list-page__button icon-link fw-light px-3 py-2 u-hide-for-mobile"
onClick={() => setShowDetourModal(true)}
>
<PlusSquare />
Expand Down
2 changes: 1 addition & 1 deletion assets/src/components/detoursTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const DetoursTable = ({ data }: DetoursTableProps) => {

return (
<Table hover className="c-detours-table">
<thead>
<thead className="u-hide-for-mobile">
<tr>
<th className="px-3 py-4">Route and direction</th>
<th className="px-3 py-4 u-hide-for-mobile">Starting Intersection</th>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@

exports[`DetourListPage renders detour list page with dummy data 1`] = `
<div
className="c-detour-list-page h-100 overflow-y-auto p-4 bg-white"
className="c-detour-list-page h-100 overflow-y-auto p-0 p-md-4 bg-white"
>
<table
className="c-detours-table table table-hover"
>
<thead>
<thead
className="u-hide-for-mobile"
>
<tr>
<th
className="px-3 py-4"
Expand Down
Loading