Altinn / Altinn/app-frontend-react
Add metadata field to serverActions for CustomButton-component
- Dominant language
- TypeScript
- Stars
- 21
- Forks
- 33
- Avg merge
- 6d 23h
- Merged PRs (30d)
- 3
Description
### Description
The Custombutton-component supports adding custom actions through server actions, by sending data about itself and the action id to the backend server. The button can send metadata to the backend which can be accesed through the action context. Currently the only action that supports adding metadata in the app config is the NavigateToPageAction, which is a predefined client-action.
Adding the metadata property to the config of custom server-actions, would allow more freedom and configurability for custom server actions than is currently possible. The metadata for a server-action can currently be only sent through the datamodel, but this way requires more complexity and components to work, instead of just the custombutton-component
### Additional Information
_No response_
Contributor guide
Research direction
Start by locating the CustomButton-component and the configuration path for custom server-actions, then compare it with the existing NavigateToPageAction metadata handling. Done means custom server-action configuration can provide metadata that is available through the action context without requiring the datamodel.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100