continue icon indicating copy to clipboard operation
continue copied to clipboard

feat: Add custom icon support for context providers

Open GarvanD opened this issue 1 year ago • 3 comments

Description

This PR adds support for custom icons in context providers. It introduces a new IconName type and extends the ContextProviderDescription and CustomContextProvider interfaces to include an optional icon property. The changes allow for more flexible and visually appealing context provider representations in the UI.

Key Changes

  • Added IconName type in core/config/types.ts and core/index.d.ts
  • Extended ContextProviderDescription and CustomContextProvider interfaces to include icon property
  • Updated CustomContextProviderClass to use the new icon property
  • Modified MentionList.tsx to handle custom icons in the dropdown

Checklist

  • [x] The base branch of this PR is dev, rather than main
  • [x] The relevant docs, if any, have been updated or created

Testing

To test this change:

  1. Create a custom context provider with an icon property
  2. Verify that the specified icon appears correctly in the UI dropdown
  3. Test with both built-in icon names and custom icon URLs
  4. Ensure fallback behavior works as expected when an invalid icon is specified

Screenshots

image

GarvanD avatar Sep 04 '24 15:09 GarvanD