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

Add review page accordions #96

Merged
merged 11 commits into from
Jan 5, 2021
Merged

Conversation

jasalisbury
Copy link

@jasalisbury jasalisbury commented Dec 21, 2020

Description of change

The review page now has an accordion with an item for each page that matches the desired design. The report still needs to be marked as Submitted in the backend after saving of a report (HHS#98) is closed.

  • Each page defines sections that are used in the review accordion
  • Simplified how the activity report imports the pages for the report
  • Date picker now accepts a string MM/DD/YYYY and spits out the same
  • Activity report page file names are no longer capitalized because they are no longer react components

How to test

Sandbox:

Test on https://tta-smarthub-sandbox.app.cloud.gov/activity-reports/review. Note the "approvers" section isn't working correctly because the seed files aren't being loaded in for this branch. Once #78 is merged the approvers select box will work.

Local:

  1. Pull down
  2. Run migrations and seeders
  3. Go to Activity report and fill out a report
  4. Click the accordion in the review page, verify form values are correctly shown

Issue(s)

Checklist

  • Meets issue criteria
  • Code tested
  • Meets accessibility standards (WCAG 2.1 Levels A, AA)
  • [n/a] Documentation updated

 * Date picker now accepts a string MM/DD/YYYY and spits out the same
 * Each page defines sections that are used in the review accordion
 * Simplified how the activity report imports the pages for the report
<Button className="stepper-button" type="submit" disabled={!formState.isValid}>Continue</Button>
<Button type="submit" disabled={!formState.isValid}>Continue</Button>
Copy link
Author

Choose a reason for hiding this comment

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

Removing CSS class that was doing nothing, missed it in a previous PR

Comment on lines +84 to +90
.smart-hub--navigator-item:first-child .smart-hub--navigator-link-active {
border-top-right-radius: 4px;
}

.smart-hub--navigator-item:last-child .smart-hub--navigator-link-active {
border-bottom-right-radius: 4px;
}
Copy link
Author

Choose a reason for hiding this comment

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

Fixing slight style issue on the navigator's side nav where the border radius is squared when the first or last element is selected

@@ -307,4 +311,73 @@ ActivitySummary.propTypes = {
control: PropTypes.object.isRequired,
};

export default ActivitySummary;
const sections = [
Copy link
Author

Choose a reason for hiding this comment

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

There appears to be the potential for defining the whole form in an object similar to this one and simplifying the ~300 lines of code above, but that would be a bigger project then we have the capacity to tackle at this point.

@kryswisnaskas
Copy link
Collaborator

kryswisnaskas commented Dec 23, 2020

The accordion and the summary look great! 🚀

At some point (for a different PR) I can see a request to preserve the expanded state on the accordion when navigating away and coming back.

Minor item on this PR. Can we add a bit more space between the label and the multiselect for the managers?
image

Copy link
Collaborator

@kryswisnaskas kryswisnaskas left a comment

Choose a reason for hiding this comment

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

👍

@jasalisbury jasalisbury merged commit 233a3d2 into main Jan 5, 2021
@jasalisbury jasalisbury deleted the js-135-review-page-no-saving branch January 5, 2021 20:20
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.

2 participants