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

Update header and footer to use MUI #14

Merged
merged 6 commits into from
Jan 29, 2022

Conversation

DivyanshuParwal
Copy link
Contributor

No description provided.

@netlify
Copy link

netlify bot commented Dec 19, 2021

✔️ Deploy Preview for orcahome ready!

🔨 Explore the source changes: 1921cf4

🔍 Inspect the deploy log: https://app.netlify.com/sites/orcahome/deploys/61e285e9385d9d00082ee58e

😎 Browse the preview: https://deploy-preview-14--orcahome.netlify.app

"@material-ui/styles": "^4.11.4",
"@mui/icons-material": "^5.2.1",
"@mui/material": "^5.2.6",
"@mui/styles": "^5.2.3",
"bootstrap": "^4.6.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can remove this dependency as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should keep this for now as other parts of the app are still using bootstrap.

@DivyanshuParwal DivyanshuParwal changed the title Add Footer Update Footer and Header Design Jan 26, 2022
Copy link
Member

@paulcretu paulcretu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good @DivyanshuParwal, thanks for your work and patience! I left some comments for you as feedback but nothing critical. Let's not worry about fixing them right now because I want to get things merged in ASAP. Can always make them into additional issues.

Two more things I want to add:

  1. Ideally the MUI setup should be its own PR, but will merge as is
  2. For some reason there seem to be some empty files, no worries I'll remove them later

.vscode/settings.json Show resolved Hide resolved
components/Footer.js Show resolved Hide resolved
</AppBar>
</Box>
)
return (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be slightly cleaner to have this be either an if/else or ternary, especially if the mobile and desktop JSX are moved into their own variables/components. Something like what I ended up doing in the orcasite repo

{iconContainer}
<Button
variant="contained"
sx={{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good use of the sx prop

borderRadius: '100px',
'&:hover': { color: 'black', backgroundColor: 'white' },
}}
startIcon={<NotificationsIcon sx={{ color: '#F79234' }} />}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would try to not use one-off colors and try to set everything up in the theme instead

pages/_app.js Show resolved Hide resolved
pages/_document.js Show resolved Hide resolved

const useCheckMobileScreen = () => {
const [width, setWidth] = useState(0)
const handleWindowSizeChange = () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is one way to check mobile, might be easier just to use the media query hook that comes with MUI. Check out how I did it in orcasite

})

const Nav = () => {
const [anchorElNav, setAnchorElNav] = React.useState(null)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works fine but it might be simpler just to store open state as boolean and pass the anchor ref in directly (since it's always the same icon)

@paulcretu paulcretu changed the title Update Footer and Header Design Update header and footer to use MUI Jan 29, 2022
@paulcretu paulcretu merged commit bf4f420 into orcasound:master Jan 29, 2022
paulcretu added a commit to paulcretu/orcahome that referenced this pull request Jan 30, 2022
paulcretu added a commit that referenced this pull request Jan 30, 2022
@DivyanshuParwal DivyanshuParwal deleted the new_branch branch January 31, 2022 14:16
@UXBrendan
Copy link

@paulcretu @evanjscallan

As I send design to production, how can I document that the header and footer nav bars are persistent throughout the entire Orcasound web experience? Where do I point devs to implement the header and footer nav bars? It would be best to have a single header and nav bar implementation, so that when changes are made, it updates throughout the Orcasound web experience.

@UXBrendan UXBrendan self-assigned this Apr 3, 2023
@UXBrendan UXBrendan added type: documentation Improvements or additions to documentation type: feature New feature or request help wanted Extra attention is needed question Further information is requested status: needs discussion Discussion needed before ready to work on labels Apr 3, 2023
@paulcretu
Copy link
Member

At the end of the day it's up to the devs who are implementing the nav bars. The way it's set up right now there are components (Nav.js and Footer.js) that can be reused on each page. Layout.js makes it easy to apply the same layout to all pages. You can point devs to those files.

I would make it clear that "consistent nav bars" is a requirement for getting PRs approved/merged.

As for keeping nav consistent across orcahome and orcasite, easiest is to copy changes over manually (eventually we could share components but it's more complicated). I would wait to cross that bridge once we get there (orcahome and orcasite v3 are close to done). I'm intentionally focusing on nav last for orcasite. Also it's not that hard to modify, so we can adjust as we go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested status: needs discussion Discussion needed before ready to work on type: documentation Improvements or additions to documentation type: feature New feature or request
Projects
Development

Successfully merging this pull request may close these issues.

4 participants