Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter elements shown in summary of subforms #782

Open
kentare opened this issue Sep 23, 2024 · 0 comments
Open

Filter elements shown in summary of subforms #782

kentare opened this issue Sep 23, 2024 · 0 comments
Labels
kind/feature-request New feature or request org/brg Issues relevant for Brønnøysundregistrene. status/triage

Comments

@kentare
Copy link

kentare commented Sep 23, 2024

Description

Context

In a given subform, we can have up to 400 fields. As the number of subforms increases, the visual clutter also increases. We need a way to prioritize the information shown to the user initially, minimizing visual clutter while still offering a way for users to view the full summary. The PDF is still required to contain all the fields and the generation will not be affected by eventual filtering in the summary.

Proposed solution 1

Altinn/app-frontend-react#2471

Propsed solution 2

Current Example of Summary Component:

{ 
  "id": "summary",
  "type": "Summary2",
  "target": {
    "id": "Hovedskjema",
    "type": "layoutSet"
  }
}

Current Example of a Standard Input Component:

{ 
  "id": "input",
  "type": "Input",
  "dataModelBindings": {
    "simpleBinding": "my.input.value"
  }
}

Expected Behavior

  • By default, all components will be shown
  • Optionally tag components with includeInSummary: true (or similar) that will be shown in the summary if filtered by "included".
  • Optionally add filters to Summary2 component
  • If filter is added, users can toggle an option to switch between the filters, overriding the default filter. (In the example below, default is included but can be overridden by hideEmpty or all.

Example of Updated Summary Component:

{ 
  "id": "summary",
  "type": "Summary2",
  "target": {
    "id": "Hovedskjema",
    "type": "layoutSet"
  },
  "filters": {
    "options": ["all", "included", "hideEmpty"],
    "default": "included"
  }
}

Example of Updated Standard Input Component:

{ 
  "id": "input",
  "type": "Input",
  "dataModelBindings": {
    "simpleBinding": "my.input.value"
  },
  "includeInSummary": true
}

Proposed solution 3

Specify a layoutSet to be used in the summary that is different from the layoutSet used in the subform. Similar to specifying the layoutSet for PDF generation.

Should include a way for user to toggle between subform layoutSet (full information) and the custom layoutset (part of the information)

Additional Information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature-request New feature or request org/brg Issues relevant for Brønnøysundregistrene. status/triage
Projects
Status: No status
Status: No status
Development

No branches or pull requests

2 participants