updated the filter in plugin manager to include description

pull/5312/head
lianahus 1 month ago committed by Aniket
parent bbe2bff066
commit 6ef6113cd1
  1. 3
      apps/remix-ide/src/app/components/plugin-manager-component.js
  2. 7
      libs/remix-ui/plugin-manager/src/lib/components/InactivePluginCardContainer.tsx
  3. 22
      libs/remix-ui/plugin-manager/src/types.d.ts

@ -105,8 +105,7 @@ class PluginManagerComponent extends ViewPlugin {
getAndFilterPlugins = (filter) => { getAndFilterPlugins = (filter) => {
this.filter = typeof filter === 'string' ? filter.toLowerCase() : this.filter this.filter = typeof filter === 'string' ? filter.toLowerCase() : this.filter
const isFiltered = (profile) => (profile.displayName + profile.name + profile.description).toLowerCase().includes(this.filter)
const isFiltered = (profile) => (profile.displayName ? profile.displayName : profile.name).toLowerCase().includes(this.filter)
const isNotRequired = (profile) => !this.appManager.isRequired(profile.name) const isNotRequired = (profile) => !this.appManager.isRequired(profile.name)
const isNotDependent = (profile) => !this.appManager.isDependent(profile.name) const isNotDependent = (profile) => !this.appManager.isDependent(profile.name)
const isNotHome = (profile) => profile.name !== 'home' const isNotHome = (profile) => profile.name !== 'home'

@ -29,7 +29,12 @@ function InactivePluginCardContainer({ pluginComponent }: InactivePluginCardCont
) : null} ) : null}
{pluginComponent.inactivePlugins && {pluginComponent.inactivePlugins &&
pluginComponent.inactivePlugins.map((profile, idx) => { pluginComponent.inactivePlugins.map((profile, idx) => {
return <InactivePluginCard buttonText={intl.formatMessage({ id: 'pluginManager.activate' })} profile={profile} key={idx} activatePlugin={activatePlugin} /> return <InactivePluginCard
buttonText={intl.formatMessage({ id: 'pluginManager.activate' })}
profile={profile}
key={idx}
activatePlugin={activatePlugin}
/>
})} })}
</React.Fragment> </React.Fragment>
) )

@ -103,9 +103,9 @@ declare class LocalPlugin {
* @returns {Promise<{api: any, profile: any}>} A promise with the new plugin profile * @returns {Promise<{api: any, profile: any}>} A promise with the new plugin profile
*/ */
open(plugins: any[]): Promise<{ open(plugins: any[]): Promise<{
api: any api: any
profile: any profile: any
}> }>
profile: any profile: any
/** /**
@ -113,21 +113,21 @@ declare class LocalPlugin {
*/ */
create(): any create(): any
updateName({ target }: { updateName({ target }: {
target: any target: any
}): void }): void
updateUrl({ target }: { updateUrl({ target }: {
target: any target: any
}): void }): void
updateDisplayName({ target }: { updateDisplayName({ target }: {
target: any target: any
}): void }): void
updateProfile(key: any, e: any): void updateProfile(key: any, e: any): void
updateMethods({ target }: { updateMethods({ target }: {
target: any target: any
}): void }): void
/** The form to create a local plugin */ /** The form to create a local plugin */
form(): any form(): any

Loading…
Cancel
Save