module.exports.requestGroupActions doesn't seem to work
- Dominant language
- TypeScript
- Stars
- 40k
- Forks
- 2.4k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 61
Description
### Expected Behavior
"Plugins" section will show up when opening requestGroup
### Actual Behavior
There's no "Plugins" section and buttons in requestGroup
### Reproduction Steps
1. Create a new plugin
2. Insert a "module.exports.requestGroupActions" hook
3. Try to see custom button created by plugin
### Is there an existing issue for this?
- [x] I have searched the [issue tracker](https://www.github.com/Kong/insomnia/issues) for this problem.
### Which sync method do you use?
- [ ] Git sync.
- [ ] Insomnia Cloud sync.
- [x] Local only
### Additional Information
Hi everyone,
I've been working with my small Insomnia plugin on different versions. Firstly I created it on elder version 2021.5.0, then I have upgraded to 11.4.0 (also reproduced it in 12.0.0 later)
There's a hook to send all requests (there's some reasons not to use default Runner) in folder. When I imported this plugin on new version my custom button "Send all requests" have disappeared
```js
module.exports.requestGroupActions = [
{
label: 'Send All Requests',
icon: 'fa-star',
action: async (context, data) => {
const { requests } = data;
}
}
```
I've investigated this problem in [insomnia](https://github.com/Kong/insomnia/tree/develop)/[packages](https://github.com/Kong/insomnia/tree/develop/packages)/[insomnia](https://github.com/Kong/insomnia/tree/develop/packages/insomnia)/[src](https://github.com/Kong/insomnia/tree/develop/packages/insomnia/src)/[ui](https://github.com/Kong/insomnia/tree/develop/packages/insomnia/src/ui)/[components](https://github.com/Kong/insomnia/tree/develop/packages/insomnia/src/ui/components)/[dropdowns](https://github.com/Kong/insomnia/tree/develop/packages/insomnia/src/ui/components/dropdowns)
/request-group-actions-dropdown.tsx
For some reason this code doesn't seem to execute at all (tested on breakpoints in DevTools)
```js
const onOpen = async () => {
const actionPlugins = await getRequestGroupActions();
setActionPlugins(actionPlugins);
};
```
And then **activePlugins** will always be empty, so It won't show any plugin buttons
### Insomnia Version
11.4.0
### What operating system are you using?
Windows
### Operating System Version
Windows 10 25H2 build 26200.7171
### Installation method
insomnia.rest
### Last Known Working Insomnia version
2021.5.0
Contributor guide
Research direction
Start with packages/insomnia/src/ui/components/dropdowns/request-group-actions-dropdown.tsx and reproduce the plugin workflow described in the issue. Trace getRequestGroupActions from onOpen and compare the plugin's requestGroupActions data with the empty activePlugins result; done means the Plugins section and custom button appear for a request group.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100