langflow
langflow copied to clipboard
fix: make icons display correctly in composio dialog
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 importingreact-icons/faandreact-icons/fa6, creating afontAwesomeIconsmap, and introducing theisFontAwesomeIconhelper function to identify FontAwesome icons.src/frontend/src/utils/styleUtils.ts: Updated utility functions to integrate FontAwesome icons. AdjustedgetNodeIconandiconExiststo 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 theForwardedIconComponentto handle cases where theTargetIconis not rendered or is a payload, adding fallback rendering logic.src/frontend/src/CustomNodes/helpers/check-lucide-icons.ts: Updated thecheckLucideIconsfunction to returnfalsefor FontAwesome icons by incorporating theisFontAwesomeIconcheck.
Backend and Configuration Updates:
src/backend/base/langflow/components/composio/composio_api.py: Updated theupdate_build_configfunction to capitalize app icons for consistency.src/frontend/package-lock.json: Incremented the version of thelangflowpackage from1.3.3to1.3.4.
Miscellaneous:
src/frontend/src/CustomNodes/GenericNode/components/RenderInputParameters/index.tsx: Removed an unusedconsole.logstatement to clean up the code.