snowballtools-base/packages/frontend/src/components/shared
Vivian Phung f2e59c11fd
Refactor: VerifyCodeInput Component and Modify Access Code Validation (#212)
### TL;DR

Implemented the new `VerifyCodeInput` component and updated the access code validation logic.

### What changed?

1. Added a new reusable `VerifyCodeInput` component for verifying codes in a user-friendly way. This component handles paste events, input changes, and keyboard navigation.
2. Updated the backend route `/accesscode` to accept an arbitrary code for now. 
3. Incorporated the `VerifyCodeInput` component into the `AccessCode` page, replacing the generic `Input` component.
4. Updated the access code validation logic to check for a trimmed length of 5 characters instead of 6.
5. Added a slight pause for UX purposes when validating the access code on the frontend.

### How to test?

1. Go to the Access Code page.
2. Try entering an access code with various inputs (keyboard, paste, etc.) to see if it works seamlessly.
3. Verify that only a 5-digit code is considered valid.
4. Check the backend logs to ensure the validation endpoint is working as expected.

### Why make this change?

This change improves the user experience by providing a custom input component for access code verification and ensures that the access code validation meets the new requirements.

---
2024-06-21 21:13:32 -04:00
..
Avatar Lint using tsc; fix type errors 2024-04-11 21:49:14 -05:00
Badge Button strories lint 2024-05-14 19:23:29 +00:00
Button Lint using tsc; fix type errors 2024-04-11 21:49:14 -05:00
Calendar fix duplicate styling (#67) 2024-05-16 20:16:31 -04:00
Checkbox Lint using tsc; fix type errors 2024-04-11 21:49:14 -05:00
CustomIcon Refactor: Rename SVG Properties for React Standard (#194) 2024-05-22 14:46:53 -04:00
DatePicker Lint using tsc; fix type errors 2024-04-11 21:49:14 -05:00
DotBorder Signup with sdk 2024-04-23 21:21:58 -05:00
Heading Lint using tsc; fix type errors 2024-04-11 21:49:14 -05:00
IconWithFrame Lint using tsc; fix type errors 2024-04-11 21:49:14 -05:00
InlineNotification [9/n][Storybook] InlineNotification update argTypes and use theme variants 2024-05-14 21:20:45 +00:00
Input Refactor Input and SearchBar (#199) 2024-05-22 15:06:50 -04:00
Modal Lint using tsc; fix type errors 2024-04-11 21:49:14 -05:00
OverflownText Lint using tsc; fix type errors 2024-04-11 21:49:14 -05:00
Radio [3/n][Storybook] Radio 2024-05-14 19:29:48 +00:00
SegmentedControls [5/n][Storybook] SegmentedControls update argTypes and use typed themes 2024-05-14 21:40:17 +00:00
Select [12/n][Storybook] Select argTypes and typed variants 2024-05-14 21:42:33 +00:00
Sidebar Refactor: Env to utils/constants (#210) 2024-06-21 21:07:41 -04:00
Steps [16/n][Storybook] Steps argTypes and typed variants 2024-05-14 21:46:42 +00:00
Switch Lint using tsc; fix type errors 2024-04-11 21:49:14 -05:00
Table [19/n][Storybook] basic Table uses themes 2024-05-14 23:13:33 +00:00
Tabs Tabs component export TabsTheme 2024-05-14 23:20:39 +00:00
Tag Lint using tsc; fix type errors 2024-04-11 21:49:14 -05:00
Toast Lint using tsc; fix type errors 2024-04-11 21:49:14 -05:00
Tooltip [1/n] storybook components start 2024-05-14 19:32:47 +00:00
UserSelect correct suppressRefError (#198) 2024-05-22 15:02:51 -04:00
VerifyCodeInput Refactor: VerifyCodeInput Component and Modify Access Code Validation (#212) 2024-06-21 21:13:32 -04:00
WavyBorder Lint using tsc; fix type errors 2024-04-11 21:49:14 -05:00
AsyncSelect.tsx Lint using tsc; fix type errors 2024-04-11 21:49:14 -05:00
ConfirmDialog.tsx Lint using tsc; fix type errors 2024-04-11 21:49:14 -05:00