Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 456/home page structure enhancements #516

Merged
merged 33 commits into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
ae7d978
Moving <main> to Layout.jsx
xscottxbrownx Nov 13, 2023
b16918e
Fix for margin and issue of creating unneccessary nodes in DOM
xscottxbrownx Nov 13, 2023
87932ea
fix semantic headers
xscottxbrownx Nov 13, 2023
81e56fd
adding PASS info as h1
xscottxbrownx Nov 13, 2023
d98a1aa
small refactor for alignment
xscottxbrownx Nov 13, 2023
38617f2
switching boolean prop that determines if their is marginBottom
xscottxbrownx Nov 15, 2023
0cf5b60
implementing logo styling feedback
xscottxbrownx Nov 15, 2023
e9f67df
Merge branch 'Development' into issue-456/home-page-structure-enhance…
xscottxbrownx Nov 15, 2023
d2b3cc3
adjust color and mobile sizing
xscottxbrownx Nov 16, 2023
e4fe3c7
Merge branch 'Development' into issue-456/home-page-structure-enhance…
xscottxbrownx Nov 16, 2023
103db67
implement scroll onclick of learn more icon button
xscottxbrownx Nov 16, 2023
2c70ac5
updated snapshot for Home.test
xscottxbrownx Nov 19, 2023
6ad8d82
reverting update of snapshot
xscottxbrownx Nov 19, 2023
46591b6
Merge branch 'Development' into issue-456/home-page-structure-enhance…
xscottxbrownx Nov 21, 2023
0b6b737
Update home section test
milofultz Nov 21, 2023
c07643c
Merge branch 'Development' into issue-456/home-page-structure-enhance…
xscottxbrownx Nov 21, 2023
35e66b9
update Home.test.jsx to no longer use snapshot
xscottxbrownx Nov 21, 2023
cb9de77
adjustments to tests
xscottxbrownx Nov 21, 2023
a0ca52e
about-pass div is now more accurate
xscottxbrownx Nov 21, 2023
b7418cf
aligning text
xscottxbrownx Nov 22, 2023
648063a
consistent text width on homepage
xscottxbrownx Nov 22, 2023
d1fa00e
implement smooth scrolling to about section
xscottxbrownx Nov 22, 2023
9a3749e
fix concole error
xscottxbrownx Nov 23, 2023
da5c1bb
Make h1 include full title
milofultz Nov 17, 2023
1c0b63c
desktop styling fix
xscottxbrownx Nov 19, 2023
80eec96
Tighten up heading code
milofultz Nov 21, 2023
c41cc3a
Put testid in right place for tests
milofultz Nov 24, 2023
323a65c
Merge pull request #531 from codeforpdx/issue-456/home-page-structure…
xscottxbrownx Nov 25, 2023
8b9253e
Merge branch 'Development' into issue-456/home-page-structure-enhance…
xscottxbrownx Nov 25, 2023
d8054bd
resolving conflicts
xscottxbrownx Nov 25, 2023
d151b55
adjusting test to be more resilient
xscottxbrownx Nov 25, 2023
9ee1e3f
giving tests more resilience
xscottxbrownx Nov 25, 2023
1d9dc94
Merge branch 'Development' into issue-456/home-page-structure-enhance…
xscottxbrownx Nov 26, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 15 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"@mui/material": "^5.12.2",
"@mui/styled-engine-sc": "^5.12.0",
"@mui/system": "^5.12.1",
"@mui/utils": "^5.14.18",
"@mui/x-data-grid": "^6.16.2",
"@mui/x-date-pickers": "^6.5.0",
"@tanstack/react-query": "^4.32.0",
Expand Down
38 changes: 21 additions & 17 deletions src/components/Home/HomeSection.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
import React from 'react';
// Material UI Imports
import Box from '@mui/material/Box';
import Typography from '@mui/material/Typography';
import Button from '@mui/material/Button';
import Stack from '@mui/material/Stack';
import Typography from '@mui/material/Typography';

/**
* Represents a home section component
*
* @memberof Home
* @name HomeSecton
* @name HomeSection
* @param {object} Props - the component props
* @param {string} Props.componentImageSrc - image src
* @param {string} Props.componentImageAlt - image alt
Expand All @@ -19,6 +20,7 @@ import Button from '@mui/material/Button';
* @param {string} Props.href - section button href
* @param {string} Props.label - section button aria-label
* @param {boolean} Props.isReallySmallScreen - screen size
* @param {boolean} Props.hasMargin - gives marginBottom
* @returns {React.JSX.Element} - the home section component
*/
const HomeSection = ({
Expand All @@ -29,9 +31,10 @@ const HomeSection = ({
button,
href,
label,
isReallySmallScreen
isReallySmallScreen,
hasMargin
}) => (
<>
<Stack mb={hasMargin ? 8 : null} alignItems="center">
<Box
component="img"
src={componentImageSrc}
Expand All @@ -42,25 +45,26 @@ const HomeSection = ({
/>
<Typography
variant="h2"
mb="24px"
sx={{
color: 'primary.main',
textAlign: 'center',
marginBottom: '24px',
fontSize: '28px'
}}
>
<strong>{title}</strong>
</Typography>
<Typography
sx={{
color: 'primary.dark',
width: isReallySmallScreen ? '100%' : '85%',
marginBottom: '24px',
textAlign: 'center'
}}
>
{description}
</Typography>
{description && (
<Typography
data-testid="testDescription"
sx={{
color: 'primary.dark',
width: isReallySmallScreen ? '100%' : '85%',
marginBottom: '24px'
}}
>
{description}
</Typography>
)}
{button && (
<Button
variant="contained"
Expand All @@ -75,7 +79,7 @@ const HomeSection = ({
{button}
</Button>
)}
</>
</Stack>
);

export default HomeSection;
19 changes: 15 additions & 4 deletions src/components/Home/KeyFeatures.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import React from 'react';
// Material UI Imports
import Box from '@mui/material/Box';
import Stack from '@mui/material/Stack';
import Typography from '@mui/material/Typography';

/**
Expand All @@ -17,31 +18,41 @@ import Typography from '@mui/material/Typography';
* @returns {React.JSX.Element} the KeyFeatures section component
*/
const KeyFeatures = ({ icon, title, description, isReallySmallScreen }) => (
<>
<Stack alignItems="center">
<Box
sx={{
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
gap: '10px',
marginBottom: '14px',
color: 'primary.main'
}}
>
{icon}
<strong>{title}</strong>
<Typography
variant="h6"
component="h3"
sx={{
color: 'primary.main',
textAlign: 'center'
}}
>
<strong>{title}</strong>
</Typography>
</Box>
<Typography
variant="body1"
sx={{
width: isReallySmallScreen ? 1 : '67%',
width: isReallySmallScreen ? 1 : '85%',
textAlign: 'center',
color: 'primary.dark',
marginBottom: '50px'
}}
>
{description}
</Typography>
</>
</Stack>
);

export default KeyFeatures;
2 changes: 1 addition & 1 deletion src/layouts/Layout.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const Layout = ({ ariaLabel, children }) => {
>
<NavBar />
{session.info.isLoggedIn && <Breadcrumbs />}
{children}
<main>{children}</main>
xscottxbrownx marked this conversation as resolved.
Show resolved Hide resolved
{session.info.isLoggedIn && <InactivityMessage />}
<Footer />
<NotificationContainer notifications={state.notifications} />
Expand Down
Loading