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

"Hide" HTML support from API #894

Closed
1 of 3 tasks
oskogstad opened this issue Jul 5, 2024 · 1 comment
Closed
1 of 3 tasks

"Hide" HTML support from API #894

oskogstad opened this issue Jul 5, 2024 · 1 comment
Assignees

Comments

@oskogstad
Copy link
Collaborator

oskogstad commented Jul 5, 2024

Introduction

This removes the support for HTML in additionalInfo and other content properties

Description

In order to support rich content, a subset of HTML has been allowed in additionalInfo. Frontchannel embeds, which should be used for most content payloads/text bodies, will only support markdown (CommonMark flavour).

HTML is intrinsically a markup language that allows for definition of layout, not just rich content. This is in contrast to markdown, which is designed to allow for definition of rich content only. Supporting HTML has challenges related to eg. nesting of tags, which makes it harder to control how rich content is placed within a layout.

Supporting only markdown makes it easier to preserve desired layout, whilst providing fairly rich facilities for text formatting. Note that CommonMark specification will not be supported in full; some features might not be supported or in other ways constrained in order to maintain layout/responsitivy, eg. tables.

For migration purposes however, HTML support will have to be supported. Use of HTML for these scenarios will require an additional oauth scope to be present.

See also #329

Implementation

If there are guidelines on architecture or other implementation choices, they are added here. Different approaches can also be discussed here.

Tasks

@oskogstad oskogstad added the needs consideration Requires additional consideration label Jul 5, 2024
@TheKnarf
Copy link
Contributor

TheKnarf commented Jul 12, 2024

  • Altinn 2 migration team should get their own scope
  • Drop html support in additionalInfo
  • Only support html for alltinn 2 scope in embaddable content
  • Name the media type for embeddable content something like "altinn2-migration-legacy-html"
  • Create a PDF with documentation specifically for the Altinn 2 migration team (they requested some additional documentation, and this doesn't need to be public, but only for their team)

elsand pushed a commit that referenced this issue Aug 12, 2024
Planning to only allow HTML for legacy imports #894 
Other minor grammar fixes
@elsand elsand removed the needs consideration Requires additional consideration label Sep 1, 2024
@oskogstad oskogstad self-assigned this Sep 2, 2024
@knuhau knuhau self-assigned this Sep 3, 2024
oskogstad added a commit that referenced this issue Sep 3, 2024
<!--- Provide a general summary of your changes in the Title above -->

## Description

This "hides" HTML support from the API, only allowed with legacy scope.
Scope is to be used when importing old stuff from Altinn2/3 to
Dialogporten

## Related Issue(s)

- #894 

## Verification

- [ ] **Your** code builds clean without any errors or warnings
- [ ] Manual testing done (required)
- [ ] Relevant automated test added (if you find this hard, leave it and
we'll help out)

## Documentation

- [ ] Documentation is updated (either in `docs`-directory, Altinnpedia
or a separate linked PR in
[altinn-studio-docs.](https://github.com/Altinn/altinn-studio-docs), if
applicable)

Co-authored-by: Knut Haug <knut.espen.haug@digdir.no>
Co-authored-by: Magnus Sandgren <5285192+MagnusSandgren@users.noreply.github.com>
@elsand elsand closed this as completed Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

4 participants