feat: add drawer available plugins
2 unresolved threads
2 unresolved threads
Closes MIN-230
Objective:
Implement drawer available plugins with public plugins list
What has been done:
- redux state for plugins list
- init loading of all plugins list
- available plugins drawer
- components for loading individual plugins (from state or by url)
- unit tests
Important:
- Implementation of plugins loading (for use inside the app) is not part of this PR
Merge request reports
Activity
Filter activity
assigned to @AdrianOrlow
- src/redux/plugins/plugins.thunks.ts 0 → 100644
1 import { pluginSchema } from '@/models/pluginSchema'; 2 import { axiosInstance } from '@/services/api/utils/axiosInstance'; 3 import { MinervaPlugin } from '@/types/models'; 4 import { validateDataUsingZodSchema } from '@/utils/validateDataUsingZodSchema'; 5 import { createAsyncThunk } from '@reduxjs/toolkit'; 6 import { z } from 'zod'; 7 import { apiPath } from '../apiPath'; 8 9 export const getAllPlugins = createAsyncThunk( 1 import { publicPluginsListSelector } from '@/redux/plugins/plugins.selectors'; 2 import { DrawerHeading } from '@/shared/DrawerHeading'; 3 import { useSelector } from 'react-redux'; 4 import { LoadPlugin } from './LoadPlugin'; 5 import { LoadPluginFromUrl } from './LoadPluginFromUrl'; 6 7 export const AvailablePluginsDrawer = (): JSX.Element => { 8 const publicPlugins = useSelector(publicPluginsListSelector); 9 10 return ( 11 <div className="h-full max-h-full" data-testid="available-plugins-drawer"> 12 <DrawerHeading title="Available plugins" /> 13 <div className="flex flex-col gap-6 p-6"> 14 <LoadPluginFromUrl /> 15 {publicPlugins.map(plugin => ( I think it would be nice to extract
publicPlugins
into a separate component like "PublicPlugins" because we will have publicPlugins and non-public plugins which are loaded from the url from the input. It's not important, I might as well extract it when merging your changes to plugin management
mentioned in merge request !122 (merged)
mentioned in commit 23f26911
Please register or sign in to reply