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

Split up the Group component into different components #1486

Closed
Tracked by #339 ...
olemartinorg opened this issue Sep 25, 2023 · 1 comment · Fixed by #1713
Closed
Tracked by #339 ...

Split up the Group component into different components #1486

olemartinorg opened this issue Sep 25, 2023 · 1 comment · Fixed by #1713
Assignees
Labels
fe-v4 Issues to be solved before v4 goes gold kind/breaking-change Issue/pull request containing a breaking change quality/debt

Comments

@olemartinorg
Copy link
Contributor

Description

After #1406, we've come a bit further on the quest to split up the Group component. With different types for each sub-component, it is obvious that we should do the rest of the job and separate these components altogether.

My suggestion:

  • RepeatingGroup replaces a repeating Group
  • LikertGroup replaces a repeating Group with edit-mode set to likert
  • Group stays as-is, or is renamed to Collection or similar. If it is not renamed, we should make sure app developers are given ample warnings if they re-use old configuration.
  • Group with Panel styling should be moved to the Panel component, using children, if possible
  • Panels with group-reference should be separated into a distinct component (RepeatingGroupReference?)

Additional Information

@Magnusrm
Copy link
Contributor

Relevant slack discussion: https://altinndevops.slack.com/archives/C045EB3JA9X/p1701786089111159
For info: @lassopicasso @olemartinorg @Febakke @RonnyB71

After fetching all altinn apps currently in production and tt02 using the fetch script i have found these uses of the "Panel" and "Panelgroup" components:

I am disregarding our own e2e test apps.

Panel-group with repeating group reference

No one is using this

Panel-group

"Group" component with "panel" property set.

There are 27 instances of this configuration being used.

  • Every instance has "showIcon": false. (Not using icon)
  • 25 instances use the "info" color
  • 2 instances in the same app use the "success" color

The app using "success" is the signing app "KRT-1185 Forsikringsforetakets behandling av klientmidler"
It is used to group a button-group used to sign with the tekst reading in the lines of "I am confirming that the form is correct".
Screenshot 2023-12-13 at 13 46 52

Alternatives after removing "panel" property:

  1. with "groupingIndicator" set to panel (will allways be "info" color)
  • sidenote: alert is being used instead of panel for the top message
Screenshot 2023-12-13 at 13 55 13
  1. using "showGroupingIndicator" and changing the "Paragraph" component to "Alert".
Screenshot 2023-12-13 at 13 53 13
  1. using using "showGroupingIndicator" and changing the "Paragraph" component to "Alert" as info.
Screenshot 2023-12-13 at 13 52 51
  1. We could also not group the text and button group at all and just have the text as an info Alert say "By signing this form I am confirming ..."

Other examples of PanelGroup and an alternative solution:
Screenshot 2023-12-13 at 15 10 15
Screenshot 2023-12-13 at 15 12 29

Screenshot 2023-12-13 at 15 01 46 Screenshot 2023-12-13 at 15 15 35

Panel

"Panel" component with title and body.

There are about 1000 instances of "Panel" being used in this way throughout our apps. Whereas "Alert" is used about 160 times.

Some before and after examples of using "Alert" instead of "Panel":
Screenshot 2023-12-13 at 12 33 56
Screenshot 2023-12-13 at 12 35 03

Screenshot 2023-12-13 at 13 18 48 Screenshot 2023-12-13 at 13 19 05 Screenshot 2023-12-13 at 12 24 44 Screenshot 2023-12-13 at 12 23 54 Screenshot 2023-12-13 at 13 14 06 Screenshot 2023-12-13 at 13 15 19 Screenshot 2023-12-13 at 12 31 29 Screenshot 2023-12-13 at 12 31 46 Screenshot 2023-12-13 at 12 25 54 Screenshot 2023-12-13 at 12 27 24 Screenshot 2023-12-13 at 12 30 21 Screenshot 2023-12-13 at 12 30 51 Screenshot 2023-12-13 at 15 28 45 Screenshot 2023-12-13 at 15 28 34

@Magnusrm Magnusrm moved this from 👷 In Progress to 🔎 Review in Team Apps Jan 19, 2024
@Magnusrm Magnusrm moved this from 🔎 Review to 🧪 Test in Team Apps Jan 19, 2024
@RonnyB71 RonnyB71 moved this from 🧪 Test to ✅ Done in Team Apps Jan 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fe-v4 Issues to be solved before v4 goes gold kind/breaking-change Issue/pull request containing a breaking change quality/debt
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants