langflow icon indicating copy to clipboard operation
langflow copied to clipboard

fix: make icons display correctly in composio dialog

Open deon-sanchez opened this issue 8 months ago • 0 comments

This pull request introduces several changes to enhance icon handling, improve frontend components, and update the build configuration. The most significant updates include adding support for FontAwesome icons, refining the rendering logic for icons, and making minor adjustments to the backend and package versions.

Icon Handling Enhancements:

  • src/frontend/src/icons/fontAwesomeIcons.ts: Added support for FontAwesome icons by importing react-icons/fa and react-icons/fa6, creating a fontAwesomeIcons map, and introducing the isFontAwesomeIcon helper function to identify FontAwesome icons.
  • src/frontend/src/utils/styleUtils.ts: Updated utility functions to integrate FontAwesome icons. Adjusted getNodeIcon and iconExists to handle FontAwesome icons and removed hardcoded imports of specific FontAwesome icons. [1] [2] [3]

Frontend Component Improvements:

  • src/frontend/src/components/common/genericIconComponent/index.tsx: Enhanced the ForwardedIconComponent to handle cases where the TargetIcon is not rendered or is a payload, adding fallback rendering logic.
  • src/frontend/src/CustomNodes/helpers/check-lucide-icons.ts: Updated the checkLucideIcons function to return false for FontAwesome icons by incorporating the isFontAwesomeIcon check.

Backend and Configuration Updates:

  • src/backend/base/langflow/components/composio/composio_api.py: Updated the update_build_config function to capitalize app icons for consistency.
  • src/frontend/package-lock.json: Incremented the version of the langflow package from 1.3.3 to 1.3.4.

Miscellaneous:

  • src/frontend/src/CustomNodes/GenericNode/components/RenderInputParameters/index.tsx: Removed an unused console.log statement to clean up the code.

BUG

Screenshot 2025-04-17 at 11 36 58 AM

FIX

Screenshot 2025-04-18 at 9 50 19 AM

deon-sanchez avatar Apr 18 '25 15:04 deon-sanchez