Altinn / Altinn/app-frontend-react

Optional feature: Automatically trigger navigation to next page

Open
#700 0 comments 0 reactions 0 assignees View on GitHub
kind/feature-request ux
Dominant language
TypeScript
Stars
21
Forks
33
Avg merge
6d 23h
Merged PRs (30d)
3

Description

### Description

An excellent example of a simple form with multiple pages, with implicit navigation between them can be found here: https://drdropin.no/bestill-time

Clicking a button (a choice) automatically moves you forward to the next page. The input components in this form are quite unlike what we have in Altinn, but for some components (i.e. a simple checkbox, radio groups), it could be possible to navigate the user forwards as soon as a choice/input has been made.

We could solve this by adding a new `trigger` option:
```json
"triggers": ["navigateToNextPage"]
```

Meaning, page navigation is automatically triggered whenever data is changed for that component.

### Considerations
Just because we could, doesn't mean we should. However, in some forms (especially branching questionnaires), it's very relevant. Clicking the 'next' button every time you've made a choice will just double the amount of clicks needed to complete the form, and might even be a bit annoying on mobile devices.

- How will this affect the experience for less technically savvy users? Will they understand what's going on?

### Additional Information

- https://drdropin.no/bestill-time
- #698 (sort-of makes this possible using dynamics to hide the page, but that also blocks moving back to the previous page)
- #117
- #586

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the linked example and related issues #698, #117, and #586 to understand the proposed navigation behavior and its constraints. The issue does not name implementation files or tests; the work is ready to proceed only after the supported components, trigger semantics, and user experience are agreed.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.