Skip to content

Improve UX: Add loading states, form validation, and better feedback - #41

Open
hasnainDevX wants to merge 1 commit into
yasir13001:mainfrom
hasnainDevX:frontend-enhancement
Open

Improve UX: Add loading states, form validation, and better feedback#41
hasnainDevX wants to merge 1 commit into
yasir13001:mainfrom
hasnainDevX:frontend-enhancement

Conversation

@hasnainDevX

Copy link
Copy Markdown

Changes Made

UX Improvements

  • Added loading state with message "Generating report, please wait..."
  • Buttons are disabled during API calls to prevent double-clicks
  • Form validation for date format (DD-MM-YYYY) before submission
  • Better visual feedback with color-coded messages:
    • Blue for loading
    • Green for success
    • Red for errors
  • Added placeholder text to date input
  • Added cursor pointer to select dropdown for better affordance

Technical Improvements

  • Added setLoading() function for consistent state management
  • Added validateForm() function with regex validation
  • Improved error handling with user-friendly messages
  • Cleaner message handling with proper color states

These changes improve the overall user experience, especially when dealing with slow backend responses or input errors.

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.

1 participant