-
Notifications
You must be signed in to change notification settings - Fork 0
Feat/pintwin #389
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
base: dev
Are you sure you want to change the base?
Feat/pintwin #389
Conversation
- 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.
…ring PinInputField
…ansformIgnorePatterns
…into feat/pintwin
… and focus handling
- 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.
sonar-project.properties
Outdated
| @@ -0,0 +1,6 @@ | |||
| sonar.projectKey=eloka-webapp | |||
There was a problem hiding this comment.
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
- 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.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
| parameter_type_id: ParamType.PINTWIN, | ||
| required: true, | ||
| meta: { | ||
| useMockData, |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
…into feat/pintwin
- 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.
Description
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
🚨 Checklist:
Further comments
🙏 Thank you!
Thank you for contributing to this project. We appreciate your time and effort. 🎉