Skip to content

🐛 Fix: isFocused devtools warning#285

Merged
tyler-dane merged 3 commits intomainfrom
feat/icon-provider
Mar 2, 2025
Merged

🐛 Fix: isFocused devtools warning#285
tyler-dane merged 3 commits intomainfrom
feat/icon-provider

Conversation

@tyler-dane
Copy link
Contributor

Closes #284

This pull request introduces several changes to the packages/web project, focusing on the addition of an IconProvider component, refactoring of icon-related code, and minor improvements to the event form's date pickers.

Icon Provider and Related Refactoring:

  • Added a new IconProvider component to manage icon context and size (packages/web/src/components/IconProvider/IconProvider.tsx).
  • Wrapped RootRouter with IconProvider in the App component (packages/web/src/App.tsx). [1] [2]
  • Simplified iconStyles by removing the isFocused prop and using IconProps instead (packages/web/src/components/Icons/styled.ts).
  • Updated various icon usages to remove the size and isFocused props, utilizing the new IconProvider for consistent icon sizing and color management (packages/web/src/views/Calendar/components/Dedication/Dedication.tsx, packages/web/src/views/Calendar/components/Header/Header.tsx, packages/web/src/views/Calendar/components/Sidebar/SidebarIconRow/SidebarIconRow.tsx). [1] [2] [3] [4]

Minor Improvements:

  • Improved readability by refactoring conditional statements in DatePickers component (packages/web/src/views/Forms/EventForm/DateTimeSection/DatePickers/DatePickers.tsx). [1] [2]
  • Removed unused useRef import from DateTimeSection component (packages/web/src/views/Forms/EventForm/DateTimeSection/DateTimeSection.tsx).

These changes enhance the consistency and maintainability of the icon usage across the application and improve the code quality in the event form components.

@tyler-dane tyler-dane marked this pull request as ready for review March 2, 2025 00:39
@tyler-dane tyler-dane merged commit bbc68ea into main Mar 2, 2025
3 checks passed
@tyler-dane tyler-dane deleted the feat/icon-provider branch March 2, 2025 00:41
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.

Devtools warning: React does not recognize the isFocused prop on a DOM element

1 participant