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

Handle summary2 for custom components #2879

Open
Magnusrm opened this issue Jan 8, 2025 · 0 comments
Open

Handle summary2 for custom components #2879

Magnusrm opened this issue Jan 8, 2025 · 0 comments
Labels

Comments

@Magnusrm
Copy link
Contributor

Magnusrm commented Jan 8, 2025

Description

We need a way of rendering custom components in PDF / summary2.

PR: #2840

These are the options for handling summary for custom components:

  1. Just rendering a simple summary component using displayData (the same as old summary)
    • Not all custom components use formdata so it will not work for those cases
    • Also for DIBK they data from several fields and need a specific format with linebreaks and commas
  2. Simply render the custom component summary2 the same as in the app
    • This might cause custom components in existing apps to now appear in summaries and PDFs in apps using summary2
  3. Render the custom component summary2 the same as the app, but introduce a property that you need to set in order for the component to render in summary.
  4. Simply render custom component summary2 the same as in the app, but programmatically give the component a property telling it it is now rendered using summary2. The App developer will have to check the property and change the layout of the component if they wish. (Ex: removing input field)
  5. combo of 3 and 4 to prevent breaking change

Option 2 and 4 is a breaking change, but might be fine as not many apps are using custom components and summary2 is somewhat open for making breaking changes.

Option 3 prevents making a breaking change, but the extra property for explicitly showing the component in summary might be a bit confusing.

We have decided to go for option 4

Additional Information

No response

@Magnusrm Magnusrm added the kind/feature-request New feature or request label Jan 8, 2025
@Magnusrm Magnusrm changed the title Hanlde summary2 for custom components Handle summary2 for custom components Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

No branches or pull requests

1 participant