-
Notifications
You must be signed in to change notification settings - Fork 24
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
Feature:-Header Redesign #366 #402
base: main
Are you sure you want to change the base?
Conversation
Redesign Burgur Menu and Button from https://www.figma.com/file/5C3v1LUNwMPQy9JOgnKEtr/Water-the-Trees seprate burger menu from main header file
@vernfongchao what am i reviewing here? |
We should probably figure out a more sustainable method of importing icons than creating a new component for each icon. I would lean towards just importing them directly from mui. Are we re-using these all over the place with custom css? |
the only custom css is just the font change, Theres a few icons that I consolidated into a single file based on the type of icon. I've always had a question about components like this where is it really useful for creating new components if there's a need of it being used again but with custom css other places vs just importing it again. |
change header text to montserrat
add custom font to app.css change font header to montserrat
add props to styled/emotion button
remove commentted out code
refractor Icon imports
@zoobot @mwpark2014 @ri0nardo made import change and added the font license to the bottom of the license page. please let me know if there's anything else. |
The screenshots look amazing! Very excited about these changes - users will be delighted |
@@ -139,6 +139,85 @@ function License() { | |||
with respect to this CC0 or use of the Work. | |||
</div> | |||
</div> | |||
<div> | |||
<div className="license-p"> | |||
<h3>SIL OPEN FONT LICENSE Version 1.1</h3> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if we need to display this to users or if we just need it in the source code, but you would know better than me :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually have no idea LOL
&__links { | ||
color: black; | ||
|
||
&:hover { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Be careful with how heavily you nest these css selectors. This line is like 6-7 levels deep, and it seems generally accepted to keep it 3-4 levels deep (from what I can tell on https://css-tricks.com/forums/topic/sass-best-practices-nesting-more-than-3-levels-deep/).
My reasoning for not nesting too heavily:
- It adds a bit more CSS that can bloat the CSS over time Ex: this CSS gets precompiled to
.header __navigation __authcontainer __menu __menuItem __links __links:hover
- Adds a ton of specificity to these selectors that will make it hard to maintain over time
Another resource: https://stackoverflow.com/questions/13805324/how-bad-is-it-in-practice-to-over-nest-selectors-in-sass-scss
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ahh interesting, I still fairly new to scss. Ill refractor the scss to keep the nesting down.
to="/contact" | ||
className="header__navigation__authcontainer__menu__menuitem__links" | ||
> | ||
<MenuItem |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like something that can be reused. Maybe have a react component like
const YourNewComponentName = ({ children, title }) => {
return
<MenuItem
sx={{
padding: '8px',
width: '180px',
}}
onClick={handleClose}
>
{children}
<span className="header__navigation__authcontainer__menu__menuitem__links__span">
{title}
</span>
</MenuItem>
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good idea actually, I had trouble with the Menu not anchoring correctly to the button, but the menu items shouldnt be an issue will look into refractoring that
@@ -4,15 +4,153 @@ | |||
url('../../assets/fonts/WTT-THIN.ttf') format('truetype'); | |||
} | |||
|
|||
// .header { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think SASS works for this. But IIRC, you tried styled components first. IF you do want to implement this with styled components, I think this reference would help write styled components in a more concise and reusable way: https://css-tricks.com/dry-ing-up-styled-components/
Basically, styled components are designed to be reusable and modular by doing some good old-fashioned inheritance
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm open to having this discussion. Its just hard for me as I don't really know what conventions there are for styled components especially when it comes to using it for page structuring and being imported and being reused constantly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, we can have that discussion on styled components vs SCSS on Wednesday. If we do go with styled components, we can go through some examples and establish a convention for the project
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah sounds like a plan!
Ticket: #366
What has changed:
What to note:
Redesign Burger Menu and Button from https://www.figma.com/file/5C3v1LUNwMPQy9JOgnKEtr/Water-the-Trees
Fullscreen logged In
mobile logged in
mobile logged out
help is grayed out, cursor set to default and doesn't redirect anywhere
New License page: