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

chore(ui): move breadcrumbs from labelMappers to ActionForm #797

Merged
merged 10 commits into from
Sep 27, 2024

Conversation

asharonbaltazar
Copy link
Collaborator

Purpose

To further consolidate form logic into ActionForm, we should control more aspects of the form's appearance in the component. Previously, the breadcrumb text was determined by an object. This PR moves that logic into ActionForm.

Approach

  • remove the submission labels map and use existing logic to map labels and paths
  • add breadcrumb prop to ActionForm and a test as well
  • add origins to routes and determine redirect with formOrigin

Copy link
Contributor

github-actions bot commented Sep 26, 2024

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 61.95% 4487 / 7242
🔵 Statements 61.6% 4755 / 7718
🔵 Functions 54.28% 1223 / 2253
🔵 Branches 33.3% 853 / 2561
File Coverage
File Stmts % Branch % Funcs % Lines Uncovered Lines
Changed Files
react-app/src/router.tsx 100% 100% 100% 100%
react-app/src/components/ActionForm/ActionForm.test.tsx 68.75% 100% 51.8% 68.75% 25-27, 26, 47-48, 65-66, 90-91, 113-114, 139-140, 162-163, 200-201, 242, 276, 326-327, 350-351, 368-369, 393-394, 412-413, 437-438, 460-461, 478-479, 501-502, 529-530, 554-555
react-app/src/components/ActionForm/ActionFormAttachments.tsx 100% 100% 100% 100%
react-app/src/components/ActionForm/index.tsx 51.72% 75% 75% 50% 125-156, 126-128, 130, 133-135, 137-138, 140-144, 146, 148-155, 243-244
react-app/src/components/BreadCrumb/create-breadcrumbs.ts 83.33% 50% 100% 83.33% 64-67
react-app/src/components/Cards/OptionCard.test.tsx 100% 100% 100% 100%
react-app/src/components/Cards/OptionCard.tsx 100% 66.66% 100% 100%
react-app/src/components/Footer/FAQFooter.tsx 0% 100% 0% 0% 4-18
react-app/src/components/Footer/index.tsx 100% 100% 50% 100%
react-app/src/components/Form/old-content.tsx 80% 16.66% 60% 80% 30-40, 61-98
react-app/src/components/Layout/index.tsx 13.04% 0% 7.14% 13.95% 24-25, 27-29, 28, 32-55, 55, 57, 61, 63-65, 64, 67-69, 68, 71, 71, 125-127, 185-188, 190-197, 191, 193-196, 199-202, 200-201, 204, 204, 206-209, 207-213, 211-212, 215-256, 303, 303
react-app/src/features/dashboard/index.tsx 21.05% 0% 14.28% 21.05% 23-28, 24-27, 26, 30, 33-35, 34, 37, 44-46, 48-50, 49, 52-54, 85-92, 86-91
react-app/src/features/dashboard/Lists/renderCells/index.tsx 25% 0% 0% 30% 9-12, 10, 10-11, 20-26, 29-74, 30, 30, 32
react-app/src/features/forms/new-submission/Chip.tsx 80% 100% 75% 80% 84
react-app/src/features/forms/new-submission/Medicaid.tsx 80% 100% 75% 80% 89
react-app/src/features/forms/waiver/app-k/WaiverIdField.tsx 6.06% 0% 0% 6.25% 38-132, 39-41, 43-84, 45-47, 46, 49, 51-52, 54-58, 56, 60-64, 61-63, 66, 68-71, 69-70, 73, 75-80, 76-79, 82, 87-89, 88, 88, 105-107, 141-145, 147-149, 148, 206, 217
react-app/src/features/forms/waiver/app-k/index.tsx 25% 0% 0% 25% 18-104, 96, 98
react-app/src/features/forms/waiver/capitated/Amendment.tsx 83.33% 100% 80% 83.33% 127
react-app/src/features/forms/waiver/capitated/Initial.tsx 80% 100% 75% 80% 97
react-app/src/features/forms/waiver/capitated/Renewal.tsx 83.33% 100% 80% 83.33% 128
react-app/src/features/forms/waiver/contracting/Amendment.tsx 80% 100% 80% 80% 128
react-app/src/features/forms/waiver/contracting/Initial.tsx 75% 100% 75% 75% 104
react-app/src/features/forms/waiver/contracting/Renewal.tsx 80% 100% 80% 80% 133
react-app/src/features/forms/waiver/temporary-extension/index.tsx 75% 100% 75% 75% 136-137
react-app/src/features/package-actions/lib/modules/temporary-extension/legacy-components.tsx 22.22% 0% 0% 22.22% 23-25, 27-30, 28-29, 69, 100-102, 101, 114, 146, 169-172, 171
react-app/src/features/package-actions/lib/modules/temporary-extension/legacy-page.tsx 0% 100% 0% 0% 34-58, 35-57, 36-39, 41-46, 48, 48, 50-53, 55-56, 60-85, 61-66, 87-147, 88-89, 91-93
react-app/src/features/package/package-actions/index.tsx 20% 0% 0% 20% 9-10, 12-14, 17-27
react-app/src/features/selection-flow/options.tsx 100% 100% 100% 100%
react-app/src/features/selection-flow/external-landing/ExternalAppLandingPage.tsx 55.55% 100% 20% 55.55% 59, 80-112, 115-146, 149-178
react-app/src/features/welcome/index.tsx 78.57% 66.66% 75% 78.57% 19-20, 28
react-app/src/utils/crumbs.ts 42.85% 11.11% 20% 41.66% 15-24, 18, 21, 23, 32-35, 37-39, 54-58, 60-64
react-app/src/utils/formOrigin.ts 42.85% 0% 0% 42.85% 32, 34-40, 35-39, 42-49, 43-48, 51-58, 52-57, 60-62
react-app/src/utils/labelMappers.ts 9.09% 0% 0% 9.09% 4-23, 6, 8, 10, 12, 14, 16, 18, 20, 22
Generated in workflow #303

Copy link

codeclimate bot commented Sep 27, 2024

Code Climate has analyzed commit 91f4697 and detected 1 issue on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 1

The test coverage on the diff in this pull request is 60.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 61.9% (0.1% change).

View more on Code Climate.

Copy link
Collaborator

@13bfrancis 13bfrancis left a comment

Choose a reason for hiding this comment

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

Ship it

@asharonbaltazar
Copy link
Collaborator Author

🚢

@asharonbaltazar asharonbaltazar merged commit 921066c into main Sep 27, 2024
16 checks passed
@asharonbaltazar asharonbaltazar deleted the move-breadcrumbs-form branch September 27, 2024 18:05
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