Skip to content

Commit

Permalink
Update Dev Logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Campbell committed Aug 5, 2020
1 parent 25a34fd commit dcb0c62
Showing 1 changed file with 50 additions and 3 deletions.
53 changes: 50 additions & 3 deletions Dev Logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,56 @@ These are daily and weekly summaries of the work thats been done on webqueue2. T

---

<!-- ### Monday 8/3/20 -->

<!-- ### Tuesday 8/4/20 -->
### Monday 8/3/20
- Experimented with [`<Grid>`](https://material-ui.com/components/grid/#grid) based two column layout: works for fixed grid counts but not fluid.
- Experimented with flexbox two column layout: `flex-grow`, `flex-shrink` and `flex-basis` properties behave inconsistantly sometimes not respective responsive units.
- Built a drawer based UI example

### Tuesday 8/4/20
- Watched [Introduction to CSS by Scott Alan](https://app.pluralsight.com/library/courses/css-intro/table-of-contents) on Pluralsight.
- Experimented with [`<Slide>`](https://material-ui.com/components/transitions/#slide) transitions in Material UI for showing and hiding ItemView.
- Found a working combination of `flex-basis` and `flex-shrink` that makes widths behave expectedly (thanks to @dhallet.)
```jsx
// Create state variable for openning ItemView
const [sidebarOpen, setSidebarOpen] = useState(false)

// Create JSS Styles
const useStyles = makeStyles({
"leftCol": {
backgroundColor: "lightgreen"
},
"rightCol": {
backgroundColor: "lightblue",
overflow: "hidden",
width: "0"
},
"rightColShift": {
flexShrink: "0",
width: "50%"
},
"transition-width": {
transition: theme.transitions.create(["width"], {
duration: theme.transitions.duration.enteringScreen,
easing: theme.transitions.easing.enteringScreen
})
}
});

const classes = useStyles();

// Render UI
return (
<Button variant="contained" color="primary" onClick={() => setSidebarOpen(!sidebarOpen)}>Toggle</Button>
<Box display="flex">
<Box className={clsx(classes.leftCol, classes["transition-width"])} >
{/* Content ... */}
</Box>
<Box className={clsx(classes.rightCol, classes["transition-width"], sidebarOpen && classes.rightColShift)}>
{/* Content ... */}
</Box>
</Box>
);
```

<!-- ### Wednesday 8/5/20 -->

Expand Down

0 comments on commit dcb0c62

Please sign in to comment.