Skip to content

Conversation

@Muppasanipraneeth
Copy link
Contributor

I'll help you prepare a comprehensive Pull Request description based on the template you provided. I'll draft this for the Queue Service Form refactoring:

Requirements

  • PR title includes ticket number and conventional commit label
  • Conforms to OpenMRS 3.0 Styleguide
  • Includes validated tests

Summary

Refactored the Queue Service Form to use React Hook Form and Zod schema for improved form management and validation. This change addresses the following improvements:

  • Replaced manual state-based form handling with React Hook Form
  • Implemented Zod schema for type-safe and declarative form validation
  • Simplified error handling and form submission logic
  • Maintained existing UI and user experience
  • Improved type safety and form state management

Technical Changes

  • Integrated react-hook-form for form state management
  • Added Zod schema validation
  • Updated form components to use Controller from React Hook Form
  • Modified test suite to support new form implementation

Screenshots

No UI changes were made; functionality remains the same with improved internal implementation.

Related Issue

https://issues.openmrs.org/browse/O3-4221

Other

  • Added dependencies: zod, @hookform/resolvers
  • Minimal impact on existing functionality
  • Enhanced developer experience with type-safe form handling

Would you like me to modify anything in this PR description?

denniskigen and others added 15 commits November 18, 2024 15:46
* (fix) Fix react hooks exhaustive deps warnings

This PR fixes exhaustive deps warnings for React hooks flagged by the React hooks ESLint plugin.

* Fixup
* (chore) O3-3996 - Ward app - workspace styling changes

* fix workspace action menu icons
Co-authored-by: Dennis Kigen <kigen.work@gmail.com>
Co-authored-by: OpenMRS Bot <infrastructure@openmrs.org>
…ge header (openmrs#1382)

* feat: use PageHeader component instead of custom header component

* replace Header route prop with title prop

* Tweaks

---------

Co-authored-by: Dennis Kigen <kigen.work@gmail.com>
@Muppasanipraneeth Muppasanipraneeth force-pushed the O3-4221-Refactor-the-queue-service-form-to-use-react-hook-form-and-a-zod-schema branch from 08a8632 to c9365ca Compare December 4, 2024 15:29
@Muppasanipraneeth Muppasanipraneeth deleted the O3-4221-Refactor-the-queue-service-form-to-use-react-hook-form-and-a-zod-schema branch December 11, 2024 10:28
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.

6 participants