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

Remove AccordionContainer wrapper component #317

Open
5 tasks
jakewheeler opened this issue Feb 14, 2025 · 0 comments · May be fixed by #318
Open
5 tasks

Remove AccordionContainer wrapper component #317

jakewheeler opened this issue Feb 14, 2025 · 0 comments · May be fixed by #318
Assignees
Labels
streamline eCR Issues for the Streamline eCR team

Comments

@jakewheeler
Copy link
Collaborator

jakewheeler commented Feb 14, 2025

What needs to be done

Currently, the only usage of AccordionContainer is within the AccordionContent component. AccordionContent passes along its AccordionItems to AccordionContainer, which modifies them, and finally passes them to the USWDS Accordion component where the items are rendered.

We should remove the middle step of passing the items to the AccordionContainer and instead have AccordionContent pass its items directly to the USWDS Accordion component.

Why it needs to be done

As you can probably tell from the description, we have a lot of accordion-related component nesting that can be simplified. This change should help to reduce the cognitive complexity when dealing with the primary accordion layout used by the /view-data page.

Acceptance Criteria

  • AccordionContainer.tsx is deleted
  • AccordionContainer.test.tsx is deleted
  • Functionality of AccordionContainer should be moved into AccordionContent (if keeping it is desired)
  • AccordionContainer tests should be moved into AccordionContent.test.tsx and should continue to pass (if functionality remains)
  • Accordion related types are cleaned up, if needed

Technical Notes

N/A

@jakewheeler jakewheeler added the streamline eCR Issues for the Streamline eCR team label Feb 14, 2025
@jakewheeler jakewheeler self-assigned this Feb 14, 2025
@jakewheeler jakewheeler linked a pull request Feb 14, 2025 that will close this issue
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
streamline eCR Issues for the Streamline eCR team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant