Skip to content

Commit

Permalink
0.4.1 - viewport issues resolved
Browse files Browse the repository at this point in the history
  • Loading branch information
JessicaMulein committed Oct 27, 2024
1 parent 42fefca commit 763c24f
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 20 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,12 @@ Join our community of developers.
## Changelog
### Sun Oct 27 14:39:00 2024
- Version 0.4.1
- Restricted Load/Save screen from saving over auto saves
- Fixed viewport issues and start working towards responsiveness to different screen sizes.
### Sat Oct 26 14:46:00 2024
- Version 0.4.0
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dominion-assistant/source",
"version": "0.0.0",
"version": "0.4.1",
"license": "MIT",
"scripts": {
"start": "nx serve",
Expand Down
3 changes: 2 additions & 1 deletion src/components/CenteredContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ const CenteredContainer = styled(Box)(({ theme }) => ({
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
minHeight: 'calc(100vh - 56px)', // Subtract BottomNavigation height
height: 'calc(100vh - 56px)', // instead of minHeight
overflow: 'auto', // only show scrollbar when needed
padding: theme.spacing(2),
boxSizing: 'border-box',
}));
Expand Down
10 changes: 9 additions & 1 deletion src/components/GameScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,15 @@ const GameScreen: React.FC<GameScreenProps> = ({ nextTurn, endGame, undoLastActi

return (
<>
<Container>
<Container
sx={{
height: '100%',
display: 'flex',
flexDirection: 'column',
padding: 1,
overflow: 'auto',
}}
>
<Scoreboard />
<Player />
<ButtonContainer>
Expand Down
2 changes: 0 additions & 2 deletions src/components/TabView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ const TabView: React.FC<TabViewProps> = ({ tabs }) => {
sx={{
flex: 1,
overflow: 'auto',
// Add bottom padding to prevent content from hiding behind nav
paddingBottom: '56px', // Height of BottomNavigation
}}
>
<Outlet />
Expand Down
36 changes: 23 additions & 13 deletions src/components/screens/AboutScreen.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,31 @@
import React from 'react';
import {
Box,
Typography,
Link,
Container,
Paper,
List,
ListItem,
ListItemText,
} from '@mui/material';
import { Box, Typography, Link, Paper, List, ListItem, ListItemText } from '@mui/material';
import DominionTransparentLogo from '@/assets/images/Dominion-tx.png';
import SuperCapsText from '@/components/SuperCapsText';
import { VERSION_NUMBER } from '@/game/constants';
import CenteredContainer from '../CenteredContainer';

export default function AboutScreen() {
return (
<Container maxWidth="md" sx={{ height: '100vh', display: 'flex', flexDirection: 'column' }}>
<CenteredContainer
sx={{
marginLeft: { xs: 0, md: '15%' },
marginRight: { xs: 0, md: '15%' },
minHeight: '100%',
overflow: 'hidden',
overflowY: 'auto',
scrollbarWidth: 'none', // For Firefox
justifyContent: 'flex-start',
py: 2,
'&::-webkit-scrollbar': {
display: 'none', // For Chrome, Safari, and Opera
},
'@media (max-width: 900px)': {
marginLeft: 0,
marginRight: 0,
},
}}
>
<Box sx={{ flexGrow: 1, py: 4 }}>
<Box sx={{ display: 'flex', flexDirection: 'column', gap: 4 }}>
<Box>
Expand Down Expand Up @@ -157,9 +167,9 @@ export default function AboutScreen() {
</Box>
</Box>
</Box>
<Box mt={4} width="100%" textAlign="center">
<Box mt={4} width="100%" textAlign="center" sx={{ paddingBottom: '56px' }}>
<Typography variant="body2">Version: {VERSION_NUMBER}</Typography>
</Box>
</Container>
</CenteredContainer>
);
}
2 changes: 1 addition & 1 deletion src/components/screens/DominionAssistantScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const StyledContainer = styled(Box)(({ theme }) => ({
flexDirection: 'column',
alignItems: 'center',
padding: theme.spacing(2),
height: '100vh',
height: 'calc(100vh - 56px)',
}));

export default function DominionAssistantScreen() {
Expand Down
2 changes: 1 addition & 1 deletion src/game/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { IMatsEnabled } from '@/game/interfaces/mats-enabled';
import { IGameOptions } from '@/game/interfaces/game-options';
import { deepClone } from '@/game/utils';

export const VERSION_NUMBER = '0.4.0';
export const VERSION_NUMBER = '0.4.1';

export const MIN_PLAYERS = 2;
export const MAX_PLAYERS = 6;
Expand Down

0 comments on commit 763c24f

Please sign in to comment.