Altinn / Altinn/app-frontend-react

Add metadata field to serverActions for CustomButton-component

Open
#2,728 0 comments 0 reactions 0 assignees View on GitHub
kind/feature-request
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.