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

GN-4441 Remove template comments from anything requested #105

Conversation

x-m-el
Copy link
Contributor

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

Overview

Remove template from every editor document that is requested. This is the desired function: template comments are only needed when filling in a document and should be hidden when viewing a preview and signing/publishing a document.

connected issues and PRs:

https://binnenland.atlassian.net/browse/GN-4441
frontend-gelinkt-notuleren PR #545

Setup

  1. checkout frontend GN GN-4441: Hide template comments via CSS in all previews frontend-gelinkt-notuleren#545
  2. use the dev version of this service in your app-gelinkt-notuleren backend. Do this by changing the preimporter in e.g. docker-compose.override.yml. See https://github.com/lblod/notulen-prepublish-service#development-and-testing
  3. run the backend and connect frontend...

How to test/reproduce

Template comments should not be shown anywhere in GN, except when actually editing a document. Check if any places in GN still show them where they shouldn't.
Note: the frontend change will hide them via CSS. The service change removes them. Template comments should not exist anymore on documents that can't be edited anymore.

Challenges/uncertainties

The change was done in the editorDocument class instead of in the places where an editorDocument was created. This to avoid having to remember to add it when adding new functionality. In essence the template comment should never be part of anything in the prepublish service.
Not 100% certain if this is the best place though.

Copy link
Collaborator

@elpoelma elpoelma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good and clean enough :). Still need to test it in combination with the frontend PR.

support/editor-document.js Show resolved Hide resolved
@x-m-el
Copy link
Contributor Author

x-m-el commented Aug 17, 2023

@elpoelma small re-review requested for the comment you gave :)

@elpoelma
Copy link
Collaborator

@elpoelma small re-review requested for the comment you gave :)

I tested the frontend in combination with the latest version of this service and it works as expected, so approved :)

@x-m-el x-m-el merged commit 13005ed into master Aug 17, 2023
@x-m-el x-m-el deleted the GN-4441-remove-template-comments-on-previewing-signing-and-publishing-in-the-publishing-service branch August 17, 2023 14:17
@x-m-el x-m-el added the enhancement New feature or request label Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants