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

Create a management form component #2291

Merged
merged 3 commits into from
Jan 20, 2025
Merged

Create a management form component #2291

merged 3 commits into from
Jan 20, 2025

Conversation

tomodwyer
Copy link
Member

@tomodwyer tomodwyer commented Jan 9, 2025

Linked to #2249 as part of a tidying up process before conversion to TypeScript.

This PR moves the management form out of the main CodelistBuilder class, and creates it as it's own functional component. This allows the form to use React hooks for state management, and moves the calculation of the codelist completion inside the component.

This simplifies the logic for showing the discard modal, and removes the need for the top-level renderConfirmDiscardModal component.

@tomodwyer tomodwyer self-assigned this Jan 9, 2025
Base automatically changed from search-component to main January 10, 2025 09:20
@tomodwyer tomodwyer changed the title Managment form Create a management form component Jan 10, 2025
@tomodwyer tomodwyer marked this pull request as ready for review January 10, 2025 10:17
@tomodwyer tomodwyer force-pushed the managment-form branch 4 times, most recently from cfaa59b to ca775b6 Compare January 16, 2025 15:48
Copy link
Contributor

@Jongmassey Jongmassey left a comment

Choose a reason for hiding this comment

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

Pull the branch
Rebuild the assets (assets-rebuild)
Log in and build/save/discard a codelist to prove all the functionality remains

seems fine by these measures and an inexpert read of the code

@tomodwyer tomodwyer enabled auto-merge January 20, 2025 10:15
@tomodwyer tomodwyer merged commit 019066f into main Jan 20, 2025
5 checks passed
@tomodwyer tomodwyer deleted the managment-form branch January 20, 2025 10:18
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