Skip to content

Commit

Permalink
fix: scrolling in details panel and remove extraneous css
Browse files Browse the repository at this point in the history
  • Loading branch information
jenniferarnesen committed Aug 17, 2023
1 parent 78fbef8 commit a692b10
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 35 deletions.
1 change: 1 addition & 0 deletions src/components/app/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@
--transition-style: ease-out;

--header-height: 48px;
--toolbar-height: 32px;
}
4 changes: 2 additions & 2 deletions src/components/app/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import { CURRENT_AO_KEY } from '../../util/analyticalObject.js'
import { getUrlParameter } from '../../util/requests.js'
import { useSystemSettings } from '../SystemSettingsProvider.js'
import AppLayout from './AppLayout.js'
import styles from './styles/App.module.css'
import './App.css'
import './styles/App.module.css'

const App = () => {
const systemSettings = useSystemSettings()
Expand Down Expand Up @@ -51,7 +51,7 @@ const App = () => {
}, [systemSettings, dispatch])

return !isEmpty(systemSettings) ? (
<div className={styles.app}>
<div>
<CssVariables colors spacers theme />
<AppLayout />
</div>
Expand Down
40 changes: 19 additions & 21 deletions src/components/app/AppLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,28 +30,26 @@ const AppLayout = () => {

return (
<>
<div className={cx({ [styles.appLayout]: !downloadMode })}>
{downloadMode ? (
<DownloadModeMenu />
) : (
<AppMenu onFileMenuAction={onFileMenuAction} />
)}
<div
className={cx(styles.content, {
[styles.downloadContent]: downloadMode,
})}
>
{downloadMode ? <DownloadSettings /> : <LayersPanel />}
<div className={styles.appMapAndTable}>
<MapPosition />
{dataTableOpen && <BottomPanel />}
</div>
{!downloadMode && (
<DetailsPanel
interpretationsRenderId={interpretationsRenderId}
/>
)}
{downloadMode ? (
<DownloadModeMenu />
) : (
<AppMenu onFileMenuAction={onFileMenuAction} />
)}
<div
className={cx(styles.content, {
[styles.downloadContent]: downloadMode,
})}
>
{downloadMode ? <DownloadSettings /> : <LayersPanel />}
<div className={styles.appMapAndTable}>
<MapPosition />
{dataTableOpen && <BottomPanel />}
</div>
{!downloadMode && (
<DetailsPanel
interpretationsRenderId={interpretationsRenderId}
/>
)}
</div>
<LayersLoader />
<ContextMenu />
Expand Down
5 changes: 0 additions & 5 deletions src/components/app/styles/App.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@
max-height: calc(100vh - 64px)
}

.app {
font-family: 'Roboto', sans-serif;
height: 100vh;
}

/* Scrollbar width */
::-webkit-scrollbar {
width: 6px;
Expand Down
8 changes: 1 addition & 7 deletions src/components/app/styles/AppLayout.module.css
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
.appLayout {
display: flex;
height: calc(100vh - var(--header-height));
flex-direction: column;
}

.content {
display: flex;
flex-direction: row;
height: 100%;
height: calc(100vh - var(--header-height) - var(--toolbar-height));
}

.downloadContent {
Expand Down
1 change: 1 addition & 0 deletions src/components/core/styles/Drawer.module.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.drawer {
background-color: #f4f6f8;
height: 100%;
overflow-y: auto;
}

.left {
Expand Down

0 comments on commit a692b10

Please sign in to comment.