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

Implement next steps logic #318

Merged
merged 21 commits into from
Jul 19, 2021
Merged

Implement next steps logic #318

merged 21 commits into from
Jul 19, 2021

Conversation

rocketnova
Copy link
Contributor

@rocketnova rocketnova commented Jul 16, 2021

Ticket

Resolves #316

Changes

  • Adds "Your Next Steps" and "EDD Next Steps" to Claim Status
  • Adds support for <em> elements in <Trans> components
  • Updates <NextSteps> component to expect to create text that might contain links
  • Updates the Typescript target to es6

Context

This PR adds in support for the latest next steps content: "Your Next Steps" and "EDD Next Steps".

A major change to note is that I've updated the Typescript target from es5 to es2015 in order to support iterating over an IterableIterator type. Let me know if this is going to be an issue for us.

Note: This PR does not include the conditional next step about certification (coming in a future PR).

Testing

yarn test

PLUS

While #299 is not resolved, comment out these lines, then run yarn storybook, and check that each scenario displays the next steps from the latest content (including correct links):

if (isAzureEnv) {
const appInsightsStream = await appInsights.createWriteStream()
logger = pino(appInsightsStream)
}

components/ClaimStatus.tsx Outdated Show resolved Hide resolved
tsconfig.json Outdated Show resolved Hide resolved
utils/getClaimStatus.tsx Show resolved Hide resolved
utils/getClaimStatus.tsx Show resolved Hide resolved
@rocketnova rocketnova changed the title Implement next steps Implement next steps logic Jul 16, 2021
Comment on lines +115 to +120
return {
heading: buildClaimStatusHeading(scenarioType),
summary: buildClaimStatusSummary(scenarioObject, scenarioString),
yourNextSteps: buildNextSteps(scenarioObject, scenarioString, 'your-next-steps'),
eddNextSteps: buildNextSteps(scenarioObject, scenarioString, 'edd-next-steps'),
}
Copy link
Contributor

Choose a reason for hiding this comment

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

github mangled this file's diff so much that I had an excuse to use vimdiff for the first time in ages!

Really like this return refactor. 👨🏼‍🍳👌🏼

utils/getClaimStatus.tsx Outdated Show resolved Hide resolved
Copy link
Contributor

@kalvinwang kalvinwang left a comment

Choose a reason for hiding this comment

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

lgtm, left a bunch of comments!

tsconfig.json Outdated Show resolved Hide resolved
public/locales/es/claim-status.json Outdated Show resolved Hide resolved
utils/getClaimStatus.tsx Outdated Show resolved Hide resolved
utils/getClaimStatus.tsx Show resolved Hide resolved
utils/getClaimStatus.tsx Outdated Show resolved Hide resolved
utils/getClaimStatus.tsx Outdated Show resolved Hide resolved
utils/getClaimStatus.tsx Outdated Show resolved Hide resolved
@rocketnova rocketnova merged commit 02752b6 into main Jul 19, 2021
@rocketnova rocketnova deleted the rocket/314-next-steps branch July 19, 2021 22:51
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.

Implement claim status next steps
3 participants