-
Notifications
You must be signed in to change notification settings - Fork 12
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
Va-minimal-footer: add component #937
Conversation
…ns-affairs/component-library into 1777-minimal-footer
<Host> | ||
<div class="va-footer"> | ||
<a href="/" > | ||
<img class="va-logo" src={vaSeal} aria-hidden="true"/> |
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 because this is a functional image, and serves as the only content of the anchor tag, instead of aria-hidden="true"
it needs some alt text to indicate that it's a link that takes the user to the va.gov home page. Something like alt="VA.gov home"
More info here - https://www.w3.org/WAI/tutorials/images/functional/#example-1-image-used-alone-as-a-linked-logo.
And actually, I think the minimal header needs to be fixed as well -
component-library/packages/web-components/src/components/va-minimal-header/va-minimal-header.tsx
Line 30 in f26ebe3
<img class="va-logo" src={vaSeal} aria-hidden="true"/> |
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.
@micahchiang thanks for the heads up. Also, here is a PR to update minimal 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 left a comment on the other PR and I just wanted to mention here too that we can probably use the existing alt text from the current VA.gov footer logo: "VA logo and Seal, U.S. Department of Veterans Affairs"
There is also a title
on the link "Go to VA.gov":
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.
@jamigibbs fixed!
} | ||
</style> | ||
|
||
</head> | ||
<body> | ||
<my-component first="Stencil" last="'Don't call me a framework' JS"></my-component> | ||
</body> | ||
<va-minimal-footer /> |
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 I understand why this file was changed?
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.
ug, accidentally committed!
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.
Did we have to manually add this image here to the Storybook assets? Or was it moved by the build script? I noticed that there is a PNG and an SVG version in web-components/src/assets
but here it's just the PNG.
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.
@jamigibbs I removed the .png since it's not being used
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.
Same also here. There is a PNG and an SVG version in web-components/src/assets
but here it's just the PNG.
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.
@jamigibbs I removed the .png since it's not being used
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.
@it-harrison There are a couple of other places that a .png
file exists still. Do we want these removed as well?
import { newSpecPage } from '@stencil/core/testing'; | ||
import { VAMinimalFooter } from '../va-minimal-footer'; | ||
|
||
describe('va-minimal-footer', () => { |
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 need a unit test at all for this component? I think we can accomplish the same thing that you're doing here with an e2e test like this:
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.
@jamigibbs I included the unit test here because the similar e2e test required putting the entire base 64 encoded svg in the test which made it unwieldy.
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.
That makes sense, thank you!
}, | ||
}; | ||
|
||
const Template = () => { |
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.
The component story isn't displaying in the code example:
I think to fix this you'll need to pass in an empty object to story like this:
@it-harrison Can you add this new component and the English strings that we will want to get translations for to our spreadsheet here? 🙏 https://docs.google.com/spreadsheets/d/1iIg9pP5GG-QFk7DrsyoKJv9GebtYmDuzKf_heqxWks4/edit#gid=0 |
|
||
const defaultArgs = {}; | ||
|
||
const Template = ({ }) => { |
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.
You can probably just do 🤷♀️:
const defaultArgs = {};
const Template = (defaultArgs) => {
Or remove defaultArgs
completely. I think the example I linked to before was done a little strange:
@@ -12,7 +12,7 @@ | |||
<style type="text/css" media="screen"> | |||
body { | |||
/* For a little breathing room around the components */ | |||
padding: 4rem; | |||
/* padding: 4rem; */ |
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.
Are you able to revert this change too?
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 dev looks good to me but let's get design approval too before it's merged. cc @danbrady
packages/web-components/src/components/va-minimal-footer/va-minimal-footer.scss
Outdated
Show resolved
Hide resolved
@danbrady I have updated the css: I'm not sure if the mobile view is correct - the padding changes from 32px/8px to 10px/16px. I got these numbers from looking at the minimal-header, not sure if they are correct: |
Thanks, @it-harrison. Looking at the mockup, we want more height to the footer. So let's set the padding to 32px/8px for both mobile and desktop. When the header gets tweaked to fill the width, ee should ensure we're consistent with the padding there too. |
Chromatic
https://1777-minimal-footer--60f9b557105290003b387cd5.chromatic.com
Description
Closes 1777
Testing done
local testing in Chrome, Edge, Firefox, Safari
Screenshots
Desktop:
Mobile
Acceptance criteria
Definition of done