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

Feat/form management config #1409

Merged
merged 54 commits into from
Apr 26, 2024
Merged

Feat/form management config #1409

merged 54 commits into from
Apr 26, 2024

Conversation

mrcuriosity-tw
Copy link

Summary

Refactor config step page to make the page states controled by RHF.

Before

Description

Screenshots
If applicable, add screenshots to help explain behavior of your code.

After

Description

Screenshots
If applicable, add screenshots to help explain behavior of your code.

Note

Null

Copy link

Hi @mrcuriosity-tw! 👋
Thank you for submitting a pull request! We appreciate your contribution and will review your changes as soon as possible.

Copy link

codacy-production bot commented Apr 25, 2024

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.00% 100.00%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (87705ba) 6995 6995 100.00%
Head commit (68566b8) 7044 (+49) 7044 (+49) 100.00% (+0.00%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#1409) 343 343 100.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Codacy will stop sending the deprecated coverage status from June 5th, 2024. Learn more

Copy link

@PengxiWPix PengxiWPix left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

sonarcloud bot commented Apr 26, 2024

Quality Gate Passed Quality Gate passed for 'heartbeat-backend'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Copy link

sonarcloud bot commented Apr 26, 2024

Quality Gate Passed Quality Gate passed for 'au-heartbeat-heartbeat-frontend'

Issues
13 New issues
0 Accepted issues

Measures
0 Security Hotspots
100.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

@mrcuriosity-tw mrcuriosity-tw merged commit dca98d2 into main Apr 26, 2024
30 checks passed
@mrcuriosity-tw mrcuriosity-tw deleted the feat/form-management-config branch April 26, 2024 05:53
PengxiWPix pushed a commit that referenced this pull request Apr 28, 2024
* [ADM-887][frontend]: chore: roughly build up the form context.

* [ADM-887][frontend]: feat: reconstruct the config step forms.

* [ADM-887][frontend]: feat: make <ProjectName /> controlled.

* [ADM-887][frontend]: feat: useDefaultValues to make projectName accept imports.

* [ADM-887][frontend]: chore: refine code.

* [ADM-887][frontend]: feat: integrate <CalendarType /> & <RequiredMetrics />.

* [ADM-887][frontend]: feat: integrate <BoardConfig /> form with pre-submit validations.

* [ADM-887][frontend]: feat: apply `verify` disabled state with form centralized `isValid`.

* [ADM-887][frontend]: feat: refactor the useVerifyBaordEffect

* [ADM-887][frontend]: chore: refine code.

* [ADM-887][frontend]: feat: integrate <PipelineTool /> with RHF.

* [ADM-887][frontend]: feat: integrate <SourceControl /> with RHF.

* [ADM-887][frontend]: feat: reset form's validation state when submittion succeeds.

* [ADM-887][frontend]: feat: roughly integrate the `next` button state with RHF.

* [ADM-887][frontend]: feat: make form re-submit anytime when user change fields.

* [ADM-887][frontend]: feat: correct Labels && fix some test.

* [ADM-887][frontend]: feat: add <RHFFormProvider /> to facilitate testing.

* [ADM-887][frontend]: test: fix <PipelineTool /> test because of aria-label change.

* i[ADM-887][frontend]: chore: refine code.

* [ADM-887][frontend]: chore: refine code.

* [ADM-887][frontend]: feat: refine naming.

* [ADM-887][frontend]: test: fix broken test.

* [ADM-887][frontend]: test: fix the test of useVerifyBoardEffect.

* [ADM-887][frontend]: test: fix the test of useVerifyPipelineToolEffect.

* [ADM-887][frontend]: test: refine test.

* [ADM-887][frontend]: test: add FormProvider for <BasicInfo />

* [ADM-887][frontend]: feat: remove sourceControl.isVerified since no longer use it to compute the `next` state.

* [ADM-887][frontend]: feat: remove board.isVerified since no longer use it to compute the `next` state.

* [ADM-887][frontend]: feat: remove `isVerified`, use `isValid` & `isSubmitSuccessful` instead.

* [ADM-887][frontend]: feat: complete the schemas of basicInfo except for `dateRange`

* [ADM-887][frontend]: feat: manually control the error state when date-range error detected.

* [ADM-887][frontend]: feat: integrate the date range with RHF.

* [ADM-887][frontend]: feat: persist token in redux when onchange.

* [ADM-887][frontend]: feat: persist sourceControl token in redux when onchange.

* [ADM-887][frontend]: feat: persist board config in redux when onchange.

* [ADM-887][frontend]: feat: customize validation rule for date ranges to synchronise form & UI.

* [ADM-887][frontend]: test: fix test.

* [ADM-887][frontend]: chore: restore fixture consts.

* [ADM-887][frontend]: test: improve testing coverage.

* [ADM-887][frontend]: test: improve coverage.

* [ADM-887][frontend]: test: cover every scenario to match 100% coverage for date range.

* [ADM-887][frontend]: feat: fix lint errors.

* [ADM-887][frontend]: feat: no need to give default sort type in useState.

* [ADM-887][frontend]: chore: refine code.

* [ADM-887][frontend]: feat: move form initialization to MetricsStepper to persist the form submition state while jumping pages.

* [ADM-887][frontend]: feat: trigger form validation while adding & removing range.

* [ADM-887][frontend]: test: fix ConfigStep test and reduce duplicates of test runner.

* [ADM-887][frontend]: chore: abstract CONST for reused labels.
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.

4 participants