Skip to content

Conversation

@shubhmjain30
Copy link
Collaborator

Description

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation Update (if none of the other choices apply)

🚨 Checklist:

  • Make sure you are requesting to pull your topic/feature/bugfix branch (right side). Don't request your master!
  • Make sure you are making a pull request against our dev branch (left side). Also, you should start your branch off our dev branch.
  • Your code follows the code style of this project.
  • Your change requires a change to the documentation.
  • You have updated the documentation accordingly.
  • You have read the Contributing Guide.
  • You have self-reviewed your code.
  • You have added unit-tests that prove my fix is effective or that my feature works.
  • Lint and unit-tests pass locally with your changes.
  • You have added necessary comments for complex logic.
  • Any dependent changes have been merged and published in downstream modules.

Further comments

🙏 Thank you!

Thank you for contributing to this project. We appreciate your time and effort. 🎉

- Upgrade @testing-library/jest-dom to version 6.6.3 for improved
  functionality and bug fixes.
- Add @testing-library/react-hooks at version 8.0.1 to support
  testing of custom hooks.
- Deleted the InputPintwin component along with its associated test files.
- This cleanup is part of the effort to streamline the codebase and remove
  unused components.
- Simplify the Pintwin component by removing unnecessary props and
  logic, enhancing clarity and maintainability.
- Introduce a new PIN input mechanism with better user experience
  and accessibility features.
- Update the export statement in the index file for consistency.
- Add a custom hook to manage PinTwin key operations, including fetching,
  encoding, and retry logic for loading the key. This enhances the
  functionality of the application by providing a reusable and efficient
  way to handle PinTwin keys.

- Introduce tests for the usePinTwin hook to ensure reliability and
  correctness of the key management logic.
- Introduce a rotating animation for the PIN input field during loading
  states to enhance user experience and provide visual feedback.
- This change improves the overall interactivity of the Pintwin component
  by indicating when the key is being loaded.
- Re-enable the transform configuration for JavaScript and TypeScript files
  using babel-jest, ensuring compatibility with the latest module imports.
- Adjust transformIgnorePatterns to include additional modules, enhancing
  test coverage and preventing issues with certain dependencies.
- Introduce a new OtpInput component that supports customizable input
  length, placeholder text, and various styling options. The component
  features automatic focus management, keyboard navigation, and
  callbacks for value changes and completion.
- This enhances user experience by providing a flexible and user-friendly
  interface for entering OTPs.

chore: remove legacy OtpInput component
- Refactor tests to mock OtpInput component and verify its props.
- Adjust assertions to ensure correct behavior when interacting with
  the OtpInput, including handling of disabled state and PIN changes.
- This enhances test coverage and ensures the Pintwin component
  integrates correctly with the new OtpInput functionality.
- Removed the auto-load option from the UsePinTwinOptions interface to
  simplify the hook's configuration.
- Adjusted the loading state management to ensure loading is set to true
  at the start of the retry process and only set to false upon successful
  key loading or after all retries are exhausted.
- This change simplifies the loading logic by eliminating the auto-load
  feature, allowing for more explicit control over when the key is loaded.
- Update font size to 2em for better visibility and user experience.
- Center align text and adjust display properties for improved layout.
- Removed the useToast mock and related assertions to streamline
  the test suite for the usePinTwin hook. This simplifies the
  tests and focuses on the core functionality of the hook.
- Adjusted initial state expectations and ensured proper handling
  of sessionStorage mock.
- Update the isDisabled prop to include keyLoadError, ensuring that
  the component correctly reflects the loading state when there is
  an error in loading the key.
- Implemented a tooltip for the IcoButton to provide contextual
  information based on the loading state and key loading errors.
- This enhances the user experience by informing users about the
  current status of the security key loading process.
- Add tests to verify that background colors are managed through React
  state instead of direct DOM manipulation.
- Ensure that input value changes trigger the appropriate onChange
  callbacks and that state remains consistent between React and the DOM.
- This improves the reliability of the OtpInput component by ensuring
  that its behavior aligns with React's state-driven architecture.
- Introduce SonarQube workflow to automate code quality checks on
  push and pull request events for the dev branch.
- This enhances the CI/CD pipeline by ensuring code quality metrics
  are evaluated consistently.
- Replace the SonarSource action with a direct sonar-scanner command.
- This change allows for more control over the scanning process and
  ensures compatibility with the latest scanner features.
- Adjust the indentation and formatting of the SonarQube scan step in
  the CI workflow to enhance clarity and maintainability.
- This change ensures that environment variables are clearly defined
  and the sonar-scanner command is properly formatted.
- Clarify the example for custom configuration by specifying the use of
  mock data and including the retry delay parameter. This enhances
  understanding for users implementing the hook.
- The SonarQube scan workflow has been removed from the CI configuration.
- This change is made to streamline the CI process and reduce unnecessary
  complexity in the workflow setup.
@@ -0,0 +1,6 @@
sonar.projectKey=eloka-webapp
Copy link
Member

Choose a reason for hiding this comment

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

Remove secrets from this file

shubhmjain30 and others added 7 commits August 19, 2025 17:29
- The sonar-project.properties file has been deleted as part of the
  decision to remove the SonarQube scan workflow from the CI process.
  This simplifies the project configuration and reduces maintenance
  overhead.
- The maxLength prop has been removed from the Pintwin component to
  simplify its usage. The PIN input length is now fixed at 4 digits,
  ensuring consistency across the application.
- Implemented the Pintwin component for parameter type handling in the
  Form component. This allows for enhanced input management with
  validation rules ensuring a minimum length of 4 characters.
- Updated the rendering logic to include error handling and helper text
  display for better user feedback.
- Replace the manual PIN handling logic with the Form component to
  streamline the PIN entry process.
- This change enhances code readability and maintainability by
  utilizing existing form management capabilities.
- Adjust the margin bottom for the ActionButtonGroup to improve
  spacing and layout consistency across different screen sizes.
…rameters

- Cleaned up the payment parameter list by removing unnecessary comments
  regarding additional required fields. This enhances code readability
  and maintainability.
@vercel
Copy link

vercel bot commented Aug 25, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
wlc-webapp Ignored Ignored Preview Nov 3, 2025 6:20am

parameter_type_id: ParamType.PINTWIN,
required: true,
meta: {
useMockData,
Copy link
Member

Choose a reason for hiding this comment

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

Remove mockData from here and any constants

Copy link
Member

Choose a reason for hiding this comment

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

Move all mocking logic to pinTwin component and check based on env" development, test, etc

- Replace the deprecated reloadKey function with refreshPinTwinKey
  to handle key loading errors more effectively.
- This change ensures that the component correctly refreshes the
  PIN key when an error occurs, improving reliability.
- Removed unused state variables and consolidated key loading functions
  for better clarity and maintainability.
- Updated function names for consistency and improved readability.
- This refactor enhances the overall structure of the hook while
  maintaining existing functionality.
- Updated the naming of the PinTwin key variable across the usePinTwin
  hook and Pintwin component to improve clarity and maintain consistency
  in the codebase.
- This change enhances readability and aligns with the naming conventions
  used in the rest of the application.
…ment

- Replace individual loading state flags with a single pinTwinKeyLoadStatus
  to streamline the state management in the usePinTwin hook.
- Update related tests to reflect changes in state properties.
- Adjust Pintwin component to derive loading and error states from the
  new pinTwinKeyLoadStatus for better clarity and maintainability.
- Update comments and documentation in the usePinTwin hook to clarify
  its functionality, including automatic key fetching, manual refresh,
  and consolidated loading state management.
- Improve readability and maintainability by refining status handling
  logic in the Pintwin component, ensuring clearer integration with the
  updated hook interface.
- Simplified the usePinTwin hook by removing the pinTwinKey from its
  return value, streamlining the interface for better clarity.
- Adjusted the Pintwin component to reflect this change, enhancing
  readability and maintainability.
- Eliminated the useMockData property from the Form component to
  streamline the code and reduce unnecessary complexity. This change
  enhances the clarity of the component's API and focuses on essential
  properties for better maintainability.
- Simplified the usePinTwin hook by removing the useMockData option,
  streamlining the API for better clarity and usability.
- Updated Pintwin component to reflect the changes in the usePinTwin
  hook, ensuring consistent behavior without mock data handling.
- Enhanced code readability by adding comments to clarify the purpose
  of the maxRetries and retryDelay constants in the usePinTwin hook.
- Removed redundant examples and descriptions from the Pintwin component
  documentation to enhance clarity and focus on essential usage patterns.
- This change improves the readability of the documentation and reduces
  potential confusion for users.
- The label prop was defined twice in the PintwinProps interface, which
  could lead to confusion and potential bugs. This change consolidates
  the definition to maintain clarity and improve code quality.
- Simplified and clarified the documentation for the Pintwin component.
- Removed redundant descriptions and improved the example usage for better
  understanding of the component's functionality.
- Add tests to verify encoding behavior when the key is loaded and
  when it is empty.
- Implement error handling tests for API failures during manual
  refresh, ensuring the component correctly updates its load status.
- Refactor mock responses for clarity and consistency across tests.
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.

3 participants