-
Notifications
You must be signed in to change notification settings - Fork 16
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 361 ] Funding Opportunity Content #377
Conversation
|
||
const PdfContainer = ({ file, image, alt }: pdf) => { | ||
return ( | ||
<Grid className="margin-bottom-2" tablet={{ col: 6 }} tabletLg={{ col: 3 }}> |
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.
nit: PdfContainer
seems like the wrong name. It doesn't contain any PDFs. It links to PDFs, but technically that doesn't even have to be the case; you could pass it whatever link (file
doesn't even have to be a file). Functionally this component is more of an "image link." You might even move this grid element into the nofoPdfs.map
in the funding content and let this component just worry about making image links.
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.
Makes sense to me. I renamed it NofoImageLInk.
Co-authored-by: Andy Cochran <[email protected]>
"widescreen": false, | ||
// 1400px | ||
), | ||
|
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.
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, that was the formatter.
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.
Might be a setting that allows inline CSS comments. 🤔
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.
What is this doing? Are we overriding the defaults?
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.
By default only mobile-lg
, tablet
, and desktop
breakpoints are enabled. This PR overrides the breakpoint map to also enable tablet-lg
.
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.
…so that we can have all 4 PDF links beside each other on screens slightly smaller than desktop
. Otherwise the link images are HUGE.
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.
Seems like prettier is super opinionated on not having comments on the same line as code, so much so that there is no option to disable it for a file, and for some reason, // prettier-ignore
ir /* prettier-ignore */
isn't working on this block of scss code: prettier/prettier#807
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.
Maybe we don't need the inline comments.
/* Override default breakpoints,
see https://designsystem.digital.gov/utilities/layout-grid/#utilities-settings */
$theme-utility-breakpoints: (
"card": false,
"card-lg": false,
"mobile": false,
"mobile-lg": true,
"tablet": true,
"tablet-lg": true,
"desktop": true,
"desktop-lg": false,
"widescreen": false,
),
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.
kk, let's go with that.
const { t } = useTranslation("common", { keyPrefix: "Index" }); | ||
|
||
return ( | ||
<div className="bg-base-lightest"> |
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.
Can we add some dynamic top/bottom padding to this section? LIke what @daphnegold did on the hero section:
className="bg-primary desktop:padding-y-15 tablet:padding-y-2 padding-y-1"
Not as much as "15" but this same technique.
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.
sounds good, I added className="desktop:padding-y-4 tablet:padding-y-2 padding-y-1"
to both the funding and goal content sections.
frontend/package-lock.json
Outdated
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.
There are a lot of additional packages in here, is that intentional or maybe a remnant of react-pdf?
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, that must have been a hold over from the react-pdf experimentation. Thanks for catching.
<h3>{t("fo_title_2")}</h3> | ||
</Grid> | ||
<Grid> | ||
<p className="usa-intro">{t("fo_paragraph_3")}</p> |
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 noticed this in the Goal Content component too, that the fonts are kinda wonky and we're swapping between serif and sans. Just an observation we may want to address now or in the future.
The cause according to testing locally is the usa-intro
class. I'm guessing in some cases it applies a different font palette that overrides our current one? Not entirely sure, should we remove?
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.
Once we have the whole page together, I'll take a pass at tidying up any typography and whitespace issues. Within the context of a responsive layout, I'll be able to better specify optimal size/padding/etc. (That's harder and more tedious to do in Figma unless you make like 5 versions of the page at various widths.)
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.
(In Figma, I failed to represent the .usa-intro
content with the right serif font. Not a problem that this doesn't match what's in Figma.)
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.
Only thing I'd request is to make sure the package-lock.json
is reflecting reality because there's a lot of new stuff in there, possibly erroneously
"widescreen": false, | ||
// 1400px | ||
), | ||
|
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.
What is this doing? Are we overriding the defaults?
@@ -37,7 +37,7 @@ describe("Index", () => { | |||
|
|||
it("passes accessibility scan", async () => { | |||
const { container } = render(<Index />); | |||
const results = await axe(container); | |||
const results = await waitFor(() => axe(container)); |
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.
Just curious why this was added for my own knowledge :D
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.
Because we're using the next/link Link component, that returns a promise, I think, so without the waitFor, the axe was not able to see the entire page. As a result it logged a bunch of warnings.
<p className="usa-intro">{t("fo_paragraph_3")}</p> | ||
</Grid> | ||
<Grid row gap> | ||
{nofoPdfs.map((pdf) => ( |
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 love the way you didn't hardcode these in here and we can swap them out! 🥇
Summary
Fixes #361
Time to review: 15 min
Changes proposed
Context for reviewers
Additional information
Local test and coverage
index page desktop
index page mobile
storybook