Reporting Emission allocation form: refactor complex and redundant logic
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
#### Description of the Tech Debt
There are a few things that can be improved on this form:
- Duplicate code on the state initialization method, we can refactor that
- The reset logic is just so that we don't submit information / show the right things to the user. I think we can make this better either with RJSF, or with a more succinct useEffect just on the allocation methodology selection.
- Form data allocation that has some transformation/mapping logic, there should be a way of baking this logic into the RJSF schema
Comments originally on https://github.com/bcgov/cas-registration/pull/3222
#### Tech Debt Triage
The purpose of our technical debt triage process is to analyze technical debt to determine risk level of the technical debt and the value in tackling that technical debt.
#### Risk Value Scoring:
| Level | Value |
| ------ | --------------------- |
| High |
| Medium |
| Low |
| Technical Debt - Risk Types | Level | Value |
| ----------------------------------------------------------------------------------------------------------------------------- | ----- | ----- |
| Business Area Risk - Risk of business area visibility / damage to user experience | 0 | 0 |
| Developer Fault Risk - How likely will this tech debt cause a future error related to coding on top of it | 0 | 0 |
| System Fault Risk - Risk of system errors or application downtime | 0 | 0 |
| Time Scale Risk - Compound risk effect if left alone. How much more difficult to fix or dangerous will this become over time? | 0 | 0 |
| Time Sink Risk - How much will this tech debt slow the development process down | 0 | 0 |
|
#### Development Checklist:
- [ ] Checklist item
- [ ] Checklist item
- [ ] Checklist item
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the Reporting Emission allocation form and inspect its state initialization, reset logic, allocation-methodology selection, and RJSF schema. Done means removing duplicated initialization, simplifying the reset behavior, and moving the allocation data transformation into the schema where feasible.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react
- Domain
- frontend
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100