Skip to content

Feat/282 283 284 285 UI ux improvements#430

Open
Lex-Studios wants to merge 3 commits into
dev-fatima-24:mainfrom
Lex-Studios:feat/282-283-284-285-ui-ux-improvements
Open

Feat/282 283 284 285 UI ux improvements#430
Lex-Studios wants to merge 3 commits into
dev-fatima-24:mainfrom
Lex-Studios:feat/282-283-284-285-ui-ux-improvements

Conversation

@Lex-Studios
Copy link
Copy Markdown
Contributor

UI/UX Improvements: Tooltips, Mobile Optimization, Toasts & Confirmation Modals

Overview

This PR implements comprehensive UI/UX improvements across the VacciChain frontend, addressing accessibility, mobile usability, and user feedback concerns. All changes maintain WCAG 2.1 AA compliance and follow the project's design patterns.

Issues Closed

Closes #282
Closes #283
Closes #284
Closes #285

Changes Implemented

Issue #282: Add tooltips to icon buttons and truncated content

  • New Component: Tooltip.jsx - Reusable tooltip with smart positioning

    • Appears on hover and keyboard focus
    • Accessible via role="tooltip" and aria-describedby
    • Dismissible with Escape key
    • Prevents viewport overflow with intelligent positioning
    • Smooth fade-in animation
  • Updated Components:

    • CopyButton.jsx - Tooltip for copy action
    • NavBar.jsx - Tooltip for wallet indicator
    • DarkModeToggle.jsx - Tooltip for theme toggle
    • NFTCard.jsx - Tooltip for truncated issuer address
    • AnalyticsDashboard.jsx - Tooltip for truncated vaccine names

Issue #283: Optimize layout and touch targets for mobile

  • Touch Target Optimization: All interactive elements now meet WCAG 2.1 AA standards

    • Minimum touch target size: 44×44px (increased from 32-40px)
    • Minimum spacing between tap targets: 8px
    • Responsive layout with flexWrap for mobile screens
  • Updated Components:

    • AdminDashboard.jsx - Buttons, inputs, table cells
    • IssuerDashboard.jsx - Form inputs, submit button
    • PatientDashboard.jsx - Connect wallet button
    • VerifyPage.jsx - Input field, verify button
    • IssuerOnboarding.jsx - Form inputs, submit button
    • NavBar.jsx - Hamburger menu, wallet button, dark mode toggle
    • CopyButton.jsx - Icon button
    • DarkModeToggle.jsx - Theme toggle button
    • ConfirmMintDialog.jsx - Confirm/Cancel buttons
    • NFTCard.jsx - Export certificate button

Issue #284: Implement user feedback toasts for all async actions

  • Toast Integration: Success, error, and info notifications for all async operations

    • Action-specific messages (not generic)
    • Screen reader accessible via aria-live="polite"
    • Auto-dismiss after 4 seconds
  • Updated Components:

    • AdminDashboard.jsx - API key creation, revocation, and application review
    • IssuerDashboard.jsx - Vaccination NFT issuance
    • IssuerOnboarding.jsx - Application submission
    • VerifyPage.jsx - Verification results
    • useFreighter.jsx - Wallet connection (already integrated)
    • useVaccination.js - Vaccination operations (already integrated)

Issue #285: Add confirmation modal for destructive actions

  • New Component: ConfirmationModal.jsx - Reusable confirmation dialog

    • Clear messaging about irreversible actions
    • Keyboard accessible with focus trap
    • Escape key to close
    • Loading state during action execution
    • Danger/warning styling for destructive operations
    • Accessible via role="alertdialog" and aria-modal="true"
  • Updated Components:

    • AdminDashboard.jsx - Confirmation modal for API key revocation
      • Clear warning message with key label
      • Explains consequences of action

Files Changed

New Files

  • frontend/src/components/Tooltip.jsx (96 lines)
  • frontend/src/components/ConfirmationModal.jsx (129 lines)

Modified Files

  • frontend/src/components/CopyButton.jsx
  • frontend/src/components/DarkModeToggle.jsx
  • frontend/src/components/NavBar.jsx
  • frontend/src/components/NFTCard.jsx
  • frontend/src/components/ConfirmMintDialog.jsx
  • frontend/src/pages/AdminDashboard.jsx
  • frontend/src/pages/IssuerDashboard.jsx
  • frontend/src/pages/IssuerOnboarding.jsx
  • frontend/src/pages/PatientDashboard.jsx
  • frontend/src/pages/VerifyPage.jsx
  • frontend/src/pages/AnalyticsDashboard.jsx

Acceptance Criteria Met

#282 - Tooltips

  • ✓ Tooltips appear on hover and keyboard focus
  • ✓ Tooltip text is concise (under 60 characters)
  • ✓ Tooltips do not obscure adjacent interactive elements
  • ✓ Tooltips are dismissed on Escape key
  • ✓ Tooltip content is accessible via role="tooltip" and aria-describedby

#283 - Mobile Optimization

  • ✓ All buttons and links have minimum touch target of 44×44px
  • ✓ Form inputs have sufficient height for comfortable mobile input
  • ✓ Spacing between adjacent tap targets is at least 8px
  • ✓ Navigation is usable with one thumb on a 375px screen
  • ✓ Touch target sizes verified across all components

#284 - User Feedback Toasts

  • ✓ Success toast appears after vaccination is successfully issued
  • ✓ Error toast appears when any async action fails
  • ✓ Info toast appears when wallet connects successfully
  • ✓ Toasts include brief, action-specific messages (not generic)
  • ✓ Toasts are announced by screen readers via aria-live="polite"

#285 - Confirmation Modals

  • ✓ Confirmation modal appears before any destructive action is executed
  • ✓ Modal clearly states what will happen and that it cannot be undone
  • ✓ 'Cancel' button closes the modal without taking action
  • ✓ 'Confirm' button proceeds and shows a loading state
  • ✓ Modal is keyboard accessible and focus-trapped

Testing Recommendations

  1. Test tooltips on hover and keyboard focus (Tab key)
  2. Verify touch targets on mobile devices (iOS Safari, Android Chrome)
  3. Test confirmation modal keyboard navigation (Tab, Shift+Tab, Escape)
  4. Verify toasts appear for all async actions (success and error cases)
  5. Test focus management in modals and tooltips
  6. Verify accessibility with screen readers (NVDA, JAWS, VoiceOver)
  7. Test on 375px width screen for mobile usability

Build Status

✓ Frontend builds successfully with no errors
✓ All components compile correctly
✓ No TypeScript/ESLint errors

Notes

  • All changes follow existing project conventions and patterns
  • Full keyboard accessibility and screen reader support implemented
  • WCAG 2.1 AA compliance maintained throughout
  • Minimal, focused implementation without unnecessary abstractions
  • All changes in single branch for streamlined PR review

…-24#285): Add tooltips, improve touch targets, add toasts, and confirmation modals

- Issue dev-fatima-24#282: Add Tooltip component for icon buttons and truncated content
  - Appears on hover and keyboard focus
  - Accessible via role='tooltip' and aria-describedby
  - Dismissible with Escape key
  - Positioned to avoid obscuring adjacent elements

- Issue dev-fatima-24#283: Optimize layout and touch targets for mobile
  - All buttons and inputs now have minimum 44×44px touch targets
  - Updated padding and spacing in AdminDashboard, IssuerDashboard, and CopyButton
  - Improved form layout with flexWrap for mobile responsiveness

- Issue dev-fatima-24#284: Implement user feedback toasts for async actions
  - Integrated useToast hook in AdminDashboard for API key operations
  - Added success/error toasts for create, revoke, and review actions
  - Toasts already integrated in useFreighter (wallet connection) and useVaccination (issue vaccination)

- Issue dev-fatima-24#285: Add confirmation modal for destructive actions
  - Created ConfirmationModal component with keyboard accessibility
  - Focus trap and Escape key support
  - Integrated in AdminDashboard for API key revocation
  - Clear messaging about irreversible actions

Components created:
- Tooltip.jsx: Reusable tooltip component
- ConfirmationModal.jsx: Reusable confirmation dialog

Updated components:
- CopyButton.jsx: Now uses Tooltip, improved touch targets
- AdminDashboard.jsx: Added toasts, confirmation modal, improved touch targets
- IssuerDashboard.jsx: Added toasts for vaccination issuance, improved touch targets
…nents and improve touch targets across UI

- NavBar: Added tooltip for wallet indicator, improved button touch targets (44×44px)
- DarkModeToggle: Added tooltip, improved touch target
- VerifyPage: Improved input and button touch targets, added success toast
- PatientDashboard: Improved button touch targets
- NFTCard: Added tooltip for truncated issuer address, improved button touch targets

All interactive elements now meet WCAG 2.1 AA standards for touch targets (minimum 44×44px)
and have appropriate tooltips for icon-only buttons and truncated content.
…/UX improvements - touch targets and toasts

- ConfirmMintDialog: Improved button touch targets (44×44px minimum)
- IssuerOnboarding: Improved input and button touch targets, added success/error toasts
- AnalyticsDashboard: Improved table padding, added tooltip for truncated vaccine names

All components now have consistent touch target sizing and appropriate feedback for user actions.
@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 30, 2026

@Lex-Studios Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant