Skip to content

Commit

Permalink
Got rid of dreaded horizontal scroll for flowsheet list view
Browse files Browse the repository at this point in the history
  • Loading branch information
dangunter committed Jun 2, 2024
1 parent 0bef78e commit 3b02644
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 5 deletions.
1 change: 1 addition & 0 deletions electron/ui/src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
font-family: oxygen, sans-serif;
background: white;
background-size: cover;
width: 100%;
}

.App-logo {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,9 @@ export default function FlowsheetsListTable(props) {
}

return (
<TableContainer sx={{p: 3}}>
{
<TableContainer sx={{p: 3, paddingRight: 0}}>
{/* removing right padding to eliminate horiz scrollbar */}
{

category === "" ?

Expand Down
6 changes: 6 additions & 0 deletions electron/ui/src/components/MainContent/MainContent.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#AppRootContainer {
padding: 0;
margin: 0;
width: 100%;
max-width: 100%;
}
3 changes: 2 additions & 1 deletion electron/ui/src/components/MainContent/MainContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* Displays nothing if the theme and list of flowsheets is not yet loaded
* -- this avoids adding conditional rendering logic to the App component.
*/
import './MainContent.css';
import {Container} from "@mui/material";
import Header from "../Boilerplate/Header/Header";
import {Navigate, Route, Routes} from "react-router-dom";
Expand All @@ -17,7 +18,7 @@ export default function MainContent(props) {
const theme = props.theme;
const spState = props.subProcState;
return (
<Container>
<Container id='AppRootContainer'>
<Header theme={theme}/>
<Routes>
<Route path="flowsheet/:id/config" element={<FlowsheetConfig
Expand Down
4 changes: 2 additions & 2 deletions electron/ui/src/views/FlowsheetsList/FlowsheetsList.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default function FlowsheetsList(props) {
};

return (
<Container maxWidth="xl">
<Container>
<h2 style={{textAlign:"left"}}>Flowsheets</h2>

<FlowsheetsListTable rows={rows} handleNewFlowsheetDialogClickOpen={handleNewFlowsheetDialogClickOpen}></FlowsheetsListTable>
Expand All @@ -58,7 +58,7 @@ export default function FlowsheetsList(props) {
</Snackbar>
}

</Container>
</Container>
);

}
Expand Down

0 comments on commit 3b02644

Please sign in to comment.