-
Notifications
You must be signed in to change notification settings - Fork 6
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
refactor: 1135 slim footer #1308
Merged
snmln
merged 11 commits into
1135-Refactor-Layout-Components-Footer
from
1135-slim-footer
Dec 10, 2024
Merged
Changes from 1 commit
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
e856157
usa foot implementation
snmln 65dacea
adding uswds style infrastructure
snmln 1aafd0c
Merge branch '1135-Refactor-Layout-Components-Footer' into 1135-slim-…
snmln 18f0173
implementing styling and creating interface
snmln 60398ed
wiring up config
snmln a5b4502
correcting styles
snmln c47e331
Merge branch '1135-Refactor-Layout-Components-Footer' into 1135-slim-…
snmln e629882
correct ts and lint errors
snmln a7a91ec
correctin merge conflict issues.
snmln d0a4cd4
updating styles
snmln 59dd97e
dialing in css
snmln File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,25 +3,24 @@ import { Icon } from '@trussworks/react-uswds'; | |
import NasaLogoColor from '../../nasa-logo-color.js'; | ||
import { | ||
USWDSFooter, | ||
USWDSLink, | ||
USWDSFooterNav, | ||
USWDSLogo, | ||
USWDSAddress | ||
} from '$components/common/uswds'; | ||
import './styles.scss'; | ||
|
||
interface PageFooterProps { | ||
mainNavItems: NavItem[]; | ||
subNavItems: NavItem[]; | ||
logoSvg?: SVGElement | JSX.Element; | ||
linkProperties: LinkProperties; | ||
title: string; | ||
version?: string; | ||
primarySection: any; | ||
settings: any; | ||
hidefooter?: boolean; | ||
} | ||
|
||
export default function PageFooter({ hidefooter }: PageFooterProps) { | ||
const returnToTop = () => { | ||
export default function PageFooter({ | ||
settings, | ||
primarySection, | ||
hidefooter | ||
}: PageFooterProps) { | ||
console.log(settings, primarySection, hidefooter); | ||
const returnToTopButton = () => { | ||
return ( | ||
<div | ||
id='return-to-top-container' | ||
|
@@ -34,11 +33,13 @@ export default function PageFooter({ hidefooter }: PageFooterProps) { | |
); | ||
}; | ||
|
||
const { returnToTop, secondarySection } = settings; | ||
const { footerPrimaryContactItems, footerPrimaryNavItems } = primarySection; | ||
return ( | ||
<> | ||
<USWDSFooter | ||
size='slim' | ||
returnToTop={returnToTop()} | ||
returnToTop={returnToTop && returnToTopButton()} | ||
// className={hidefooter && 'display-none'} | ||
primary={ | ||
<div | ||
|
@@ -88,12 +89,15 @@ export default function PageFooter({ hidefooter }: PageFooterProps) { | |
</div> | ||
<div className='grid-col-4 footer-text grid-gap-6'> | ||
<span>NASA Official: </span> | ||
<a key='email' href='mailto:[email protected]'> | ||
<a | ||
key={secondarySection.type} | ||
href={`mailto:${secondarySection.to}`} | ||
> | ||
<Icon.Mail | ||
className='margin-right-1 width-205 height-auto position-relative' | ||
id='mail_icon' | ||
/> | ||
[email protected] | ||
{secondarySection.title} | ||
</a> | ||
</div> | ||
</div> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
do we want the footer items to be different from the header? In my understanding, it was just a repetition of the main nav items - which would mean we should use the same configuration that we base the header on.
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.
As I was working through this, this question came up and I think we should discuss further. My thoughts are that we can and should model the footer materials after the header data model. But the instances are going to request for individualized configurability of the footer so they can customize past the header navigation. What are your thoughts?
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 sounds like a good case for YAGNI - let's wait for that request to come in first :)
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 would agree but I am concerned that this configurability potentially falls under this AC from the main ticket: