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

feat: Update landing page index styles #1170

Merged
merged 11 commits into from
Nov 27, 2023
Merged

Conversation

jcbcapps
Copy link
Contributor

SC-2741

Proposed changes

Adds table to the landing page index


Reviewer notes

Setup

Start the system

yarn services:up
yarn dev
cd ../ussf-portal-cms
yarn dev

Login to the portal http://localhost:3000

Start storybook

yarn storybook

Login to storybook http://localhost:6006, though the command above should open it for you


Code review steps

As the original developer, I have

  • Met the acceptance criteria
  • Created new stories in Storybook if applicable
  • Created/modified automated unit tests in Jest
  • Created/modified automated E2E tests
  • Followed guidelines for zero-downtime deploys, if applicable
  • Use ANDI to check for basic a11y issues

As a reviewer, I have

Check out our How to review a pull request document.


Screenshots

lp-dark
lp-light

@jcbcapps jcbcapps requested a review from a team as a code owner November 27, 2023 16:42
Copy link

This pull request has been linked to Shortcut Story #2741: Update page design for .../landing.

@AnnaGingle AnnaGingle requested a review from a team November 27, 2023 18:17
@AnnaGingle
Copy link

Hi there @jcbcapps ! I am not seeing any landing pages. Do I need to hook this PR up to the API? to see data? If so, will these instructions work? #1127 (comment)

Screenshot 2023-11-27 at 12 19 52 PM

@jcbcapps
Copy link
Contributor Author

Hi there @jcbcapps ! I am not seeing any landing pages. Do I need to hook this PR up to the API? to see data? If so, will these instructions work? #1127 (comment)

@AnnaGingle This PR uses data from the CMS, so no, the instructions you linked will not be helpful. You'll need to have the latest version of the CMS on your local machine. After running yarn services:up, run yarn dev in that repo, navigate to http://localhost:3001 in your browser, and create some landing pages. Let me know if you need more assistance/need to pair.

@AnnaGingle
Copy link

@jcbcapps Got it working! Thanks

Here is some design feedback (I will circle back when feedback on accessibility)

  • The table should have the same corner radius of 4px
    Dark mode
  • Row 1 should have the bg color 0A1529 (same as all sites & applications)
  • Row 2 should have bg color 060C17 (same as all sites & applications
  • Row 1 & 2 border color should be 71767A

Everything else is on point! Good work

Comment on lines 24 to 43
{sortedLandingPages.length > 0 && (
<Table
bordered
striped
className={`usa-table--borderless ${styles.table}`}>
<tbody>
{sortedLandingPages.map((landingPage: LandingPage) => {
return (
<li key={`landing_page_` + landingPage.slug}>
<Link href={`/landing/${landingPage.slug}`}>
{landingPage.pageTitle}
</Link>
</li>
<tr key={`landing_page_` + landingPage.slug}>
<td>
<Link href={`/landing/${landingPage.slug}`}>
{landingPage.pageTitle}
</Link>
</td>
</tr>
)
})}
</ul>
</Grid>
</div>
</tbody>
</Table>
)}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion: Add a storybook story for this. I think you will need to pull the table out into a component for that since I don't think we add pages there. However, if we do have pages in storybook that works too.

Copy link
Contributor

Choose a reason for hiding this comment

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

Additionally that might make adding a simple unit test easier and it will be ready for future features. Though that may already be on your list.

@jcbcapps jcbcapps requested a review from gidjin November 27, 2023 20:38
Copy link
Contributor

@gidjin gidjin left a comment

Choose a reason for hiding this comment

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

LGTM thanks for making those changes!

Copy link

@AnnaGingle AnnaGingle left a comment

Choose a reason for hiding this comment

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

LGTM!

@mergify mergify bot merged commit d762d92 into main Nov 27, 2023
@mergify mergify bot deleted the sc-2741/update-landing-index-style branch November 27, 2023 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants