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

Add say-content styling to all treatment content (Fixes sub/superscript) #585

Conversation

x-m-el
Copy link
Contributor

@x-m-el x-m-el commented Oct 2, 2023

Overview

Some preview content in GN did not show the same as content on other places. The problem comes from a missing class say-content.
This adds the same styling of say-content to c-template-content--treatment, which contains this content where the styling was missing.

connected issues and PRs:

https://binnenland.atlassian.net/browse/GN-4210
lblod/ember-rdfa-editor#989

Setup

npm link the editor
npm link @lblod/ember-rdfa-editor in this repo

How to test/reproduce

See ticket for a specific example. The easiest is to add some superscript/subscript to an agenda item and see that this is rendered correctly on any place an agenda item is rendered.

Challenges/uncertainties

I wanted to avoid this solution as it is a bit hacky (and needs an editor change)
However:

  • changing the preview means changing the notulen-prepublish-service template, which is something we don't want to touch. It might also mean that this extra class would be added to a published document. In principle c-template-content--treatment is enough as a class to identify the treatment part in the template. No need to add another class.
  • could also add the class say-content in the frontend somehow.
    • add say-content via queries in components, but there are many components showing this preview.
    • add say-content class via queries in a special getter for treatment (e.g. previewContent). But this means parsing the html before it is rendered. This might be better, but for big documents this could take some time and the css fix is quite easy to understand.

@x-m-el x-m-el requested review from dkozickis and elpoelma October 2, 2023 14:41
…superscript-isnt-applied-in-preview-published-view
@elpoelma elpoelma changed the base branch from master to internal/update-editor October 5, 2023 08:58
Base automatically changed from internal/update-editor to master October 5, 2023 09:01
@elpoelma elpoelma merged commit 175d8d0 into master Oct 5, 2023
@elpoelma elpoelma deleted the GN-4210-styling-subscript-superscript-isnt-applied-in-preview-published-view branch October 5, 2023 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants