Skip to content

Commit

Permalink
place page: fix whitespace and scroll (#4613)
Browse files Browse the repository at this point in the history
removes pinned-scroll behavior on wider screens
  • Loading branch information
beets authored Sep 11, 2024
1 parent bf53d40 commit 7adc768
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
6 changes: 3 additions & 3 deletions server/templates/place.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@
<div id="body" class="container-fluid">
<div id="nl-search-bar"></div>
<div id="body-row" class="row">
<div id="sidebar-outer" class="col-md-3x col-lg-2 order-last order-lg-0">
<div id="sidebar-top-spacer" class="d-none d-lg-block"></div>
<div id="sidebar-outer" class="col-md-3x col-xl-2 order-last order-xl-0">
<div id="sidebar-top-spacer" class="d-none d-xl-block"></div>
<div id="sidebar-region">
<div id="menu"></div>
<div id="child-place"></div>
</div>
</div>
<div id="main" class="col-md-9x col-lg-10">
<div id="main-place" class="col-md-9x col-xl-10">
<div id="title" data-dcid="{{ place_dcid }}">
<div id="place-heading-container">
<div id="place-heading">
Expand Down
2 changes: 1 addition & 1 deletion static/js/place/chart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ class Chart extends React.Component<ChartPropType, ChartStateType> {
} catch (e) {
return;
}
updatePageLayoutState();
// updatePageLayoutState();
}

componentWillUnmount(): void {
Expand Down
10 changes: 6 additions & 4 deletions static/js/place/place.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,11 @@ const Y_SCROLL_MARGIN = 100;
window.addEventListener("load", (): void => {
try {
renderPage();
updatePageLayoutState();
maybeToggleFixedSidebar();
window.onresize = maybeToggleFixedSidebar;
// Disable sidebar pinning.
// TODO(beets): Delete this code.
// updatePageLayoutState();
// maybeToggleFixedSidebar();
// window.onresize = maybeToggleFixedSidebar;
} catch (e) {
return;
}
Expand Down Expand Up @@ -234,7 +236,7 @@ function renderPage(): void {
}

// Readjust sidebar based on parent places.
updatePageLayoutState();
// updatePageLayoutState();

// Display child places alphabetically
for (const placeType in data.allChildPlaces) {
Expand Down

0 comments on commit 7adc768

Please sign in to comment.