BharatSeva / Client-Interface

A client-facing portal where client can access their records, make appointments, and avail other healthcare services.
http://20.51.184.243/client/login?health_id=HID5dd1c870-6308-4713-8&pass=12345
MIT License
9 stars 13 forks source link

Improved State Management and Accessibility in dashboard #22

Closed Amansingh0807 closed 1 month ago

Amansingh0807 commented 1 month ago

Current Implementation:

Proposed Solution:

  1. State Management:

    • Use leftSidebarOpen, rightSidebarOpen, accountPopoverOpen, and notificationPopoverOpen to control visibility with React state.
  2. Toggle Functions: -Use dedicated functions (toggleSidebar, toggleMessage, etc.) to handle sidebars, hidden messages, and popovers.

  3. Conditional Class Names:

    • Dynamically set className for components based on state, avoiding direct DOM manipulation.
  4. DOM Access:

    • Use useRef (e.g., innerMessageRef) to access DOM elements instead of document.querySelector.
  5. Accessibility:

    • Wrap interactive icons in accessible elements (
      or buttons) to improve usability.
vaibhavyadav-dev commented 1 month ago

@Amansingh0807 don't you read contribution guidelines, it's clearly stated issued must be assigned, before making any PR.

Amansingh0807 commented 1 month ago

@Amansingh0807 don't you read contribution guidelines, it's clearly stated issued must be assigned, before making any PR.

ohh sorry, i just forget to check it though, next time it won't happen thank you for guiding me 🙏