OpenSlides / OpenSlides/openslides-client

motion diff: amendment and nested list (dot in text)

Open
#5,863 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Describe the bug
The motion diff of a motion with a nested list and a dot and an amendment with a change to second level of the
nested list is an all deleted (red) and everything new added (green).

and the amendment hasn't got a title.

How to Reproduce

  1. Go the motion list in a meeting
  2. Create a new motion with following text: <ul><li>Ebene 1<ul><li>Ebene 2.1</li><li>Ebene 2.2</li></ul></li></ul>
  3. Create an amendment to this motion with <ul><li>Ebene 1<ul><li>Ebene 2.1 foo</li><li>Ebene 2.2</li></ul></li></ul>. The foo is the only change
  4. Look at the motion detail view

Expected behavior
It should work like:
motion text: <ul><li>Ebene 1<ul><li>Ebene 2A</li><li>Ebene 2B</li></ul></li></ul>
amendment text: <ul><li>Ebene 1<ul><li>Ebene 2A foo</li><li>Ebene 2B</li></ul></li></ul>
So it should only show the foo in green (as change).

Additional context
I think it is a problem with the HTML Diff stuff

motion-txt:

<ul><li>Ebene 1<ul><li>Ebene 2.1</li><li>Ebene 2.2</li></ul></li></ul>

amendment-text

<ul><li>Ebene 1<ul><li>Ebene 2.1 foo</li><li>Ebene 2.2</li></ul></li></ul>

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

Start in the motion detail view and trace the HTML diff implementation used for motion amendments. Reproduce the nested-list case with a dot in the list text, then compare it with the simpler Ebene 2A/B example. Done means unchanged content remains unhighlighted, with only “foo” shown as an addition and the amendment title behavior checked.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.