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

Ediorial workflow creates unreachable changes #179

Open
alexdryden opened this issue Oct 12, 2021 · 2 comments
Open

Ediorial workflow creates unreachable changes #179

alexdryden opened this issue Oct 12, 2021 · 2 comments

Comments

@alexdryden
Copy link
Contributor

Issue
We are using the editorial workflow in a publication for the first time and came across a behavior where an edit produces two edits over the same target text, and only one of them is visible to the author. As a result, the author can not push the page to a clean state without using the "accept all" or "reject all" buttons.

Details
The problem emerged when the author had produced a scalar link that they had made bold with the WYSIWYG and with an extra space as part of the (bold) anchor text. Then the editor deleted the extra space. That deletion shows up in the Edit Review panel as a two edits, a delete of the space and an insert of nothing:

First the deletion:

<span data-diff="chunk" id="chunk_1" data-original-title="" title="">
    <span data-diff="del"> </span>
    <span data-diff="placeholder"></span>
</span>

And then:

<span data-diff="chunk" id="chunk_2" data-original-title="" title="">
    <span data-diff="placeholder"></span>
    <span data-diff="ins"></span>
</span>

The insert however is a 0 x 0 span, so it isn't visible or clickable. Here are some screen shots to illustrate:

Deletion of space
good_edit_span-delete

Insertion of nothing
bad_edit_span-insert

Steps to reproduce

  1. Make a new page as an author with some links that follow this basic pattern:
<strong>
    <a href="https://<your-scalar-instal>/<book-name>/page">Scalar Link Bold </a>
</strong>: Some Content 
  1. Enable Editorial Workflow and push the page to Edit stage
  2. As editor, delete the extra space in the link
  3. Push to Edit Review stage
  4. As author, resolve all of the edits you see
  5. Expected behavior: author can then save and move to clean state
  6. Error: save and move to clean state button remains disabled

Environment
Scalar v 2.5.17

@eloyer
Copy link
Collaborator

eloyer commented Oct 12, 2021

Thanks for the detailed report. So far I've been unable to duplicate the issue under Scalar 2.6 in either Chrome or Safari -- you may want to try updating and see if that resolves it.

@alexdryden
Copy link
Contributor Author

Thanks for testing it out @eloyer. Yeah, I was having a really hard time getting it to reproduce as well. I'll give it a shot with 2.6.

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

No branches or pull requests

2 participants