OpenSlides / OpenSlides/openslides-client

Diff issue in amendments with ordered/unordered lists

Open
#5,856 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug high
Dominant language
TypeScript
Stars
35
Forks
52
Avg merge
1d 9h
Merged PRs (30d)
52

Description

Describe the bug
Amendments in an ordered/unordered list result in an incorrect diff. If new content is entered at a lower level, the diff generates a new line. This is incorrect.

Amendment text:
Image

Amendment output with wrong diff:
Image

How to Reproduce

  1. open motions
  2. create a new motion with code 1 linked below.
  3. create an amendment to it in line 1-5 with Code 2 linked below.
  4. --> Error with wrong new line will appear.

Code 1:

	<li>Testzeile 1<ol>
	<li>Testzeile 2<ol>
	<li>Testzeile 3</li>
	<li>Testzeile 4</li>
</ol>
</li>
<li>Testzeile 5</li>
</ol>
</li>
<li>Testzeile 6</li>
</ol>

Code 2:

	<li>Testzeile 1<ol>
	<li>Testzeile 2<ol>
	<li>Testzeile 3 Mehr Inhalt</li>
	<li>Testzeile 4</li>
</ol>
</li>
<li>Testzeile 5</li>
</ol>
</li>
</ol>

Expected behavior
If an amendment if done to a lower level list point, the diff should work correctly.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue in Motions by creating a motion with Code 1 and an amendment using Code 2, focusing on the nested ordered-list item. Inspect the amendment diff flow from that reproduction; done means adding lower-level list content produces the correct diff without an erroneous new line.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.