Skip to content

extend / shorten line range in change reco dialog#5519

Merged
MSoeb merged 10 commits intoOpenSlides:mainfrom
reiterl:5419-extend-shorten-change-reco
Nov 7, 2025
Merged

extend / shorten line range in change reco dialog#5519
MSoeb merged 10 commits intoOpenSlides:mainfrom
reiterl:5419-extend-shorten-change-reco

Conversation

@reiterl
Copy link
Copy Markdown
Member

@reiterl reiterl commented Oct 22, 2025

Resolve #5419

Without validators for line_from and line_to.

Needs: OpenSlides/openslides-backend#3170

Without validators for line_from and line_to.
@reiterl reiterl added this to the 4.3 milestone Oct 22, 2025
@reiterl reiterl self-assigned this Oct 22, 2025
@reiterl reiterl added feature Zeeman projectname Röntgen projectname labels Oct 22, 2025
@reiterl
Copy link
Copy Markdown
Member Author

reiterl commented Oct 22, 2025

The following validators need to be added to the line_from and line_to field in the dialog.

  1. line_from <= line_to
  2. line_to <= max line of the motion
  3. [line_from, line_to] doesn't intersect with another reco.

@reiterl
Copy link
Copy Markdown
Member Author

reiterl commented Oct 23, 2025

Added a validator for collides and max line range.

@reiterl reiterl marked this pull request as ready for review October 23, 2025 11:22
@reiterl reiterl assigned bastianjoel and Elblinator and unassigned reiterl Oct 23, 2025
Copy link
Copy Markdown
Member

@Elblinator Elblinator left a comment

Choose a reason for hiding this comment

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

If I try to create a change ercomendation no dialog and following Error in console:

motion-change-recommendation-dialog.service.ts:33 ERROR TypeError: Cannot read properties of null (reading 'motion')
    at _MotionChangeRecommendationControllerService.checkLineRanges 

@Elblinator Elblinator assigned reiterl and unassigned bastianjoel and Elblinator Oct 24, 2025
@reiterl reiterl requested a review from Elblinator October 24, 2025 08:34
@reiterl reiterl assigned bastianjoel and Elblinator and unassigned reiterl Oct 24, 2025
@reiterl
Copy link
Copy Markdown
Member Author

reiterl commented Oct 24, 2025

Yes, I could repro it. Only show edit buttons in editReco mode and fixed the validator for newReco mode.

@reiterl
Copy link
Copy Markdown
Member Author

reiterl commented Oct 24, 2025

Creating and editing a ch reco should work now.

@Elblinator Elblinator requested review from MSoeb and removed request for Elblinator October 28, 2025 12:38
@Elblinator Elblinator assigned MSoeb and unassigned Elblinator Oct 28, 2025
Copy link
Copy Markdown
Member

@Elblinator Elblinator left a comment

Choose a reason for hiding this comment

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

I will assign @MSoeb for beauty testing etc.

/**
* Check if can use new line_from and line_to for recoId
*/

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done.

Comment on lines +105 to +107
} else {
return !intersect;
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
} else {
return !intersect;
}
}
return !intersect;

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done.

<mat-error>{{ 'Line range is not allowed to collide.' }}</mat-error>
}
</mat-form-field>
<mat-form-field [style.width.px]="300">
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Add a css class instead

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done.

@bastianjoel bastianjoel removed their assignment Oct 29, 2025
@reiterl reiterl removed their assignment Nov 3, 2025
Copy link
Copy Markdown

@MSoeb MSoeb left a comment

Choose a reason for hiding this comment

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

Tested. Works as intended.

@MSoeb MSoeb merged commit c38f9fc into OpenSlides:main Nov 7, 2025
3 checks passed
@MSoeb MSoeb removed their assignment Nov 7, 2025
@reiterl reiterl deleted the 5419-extend-shorten-change-reco branch November 7, 2025 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Röntgen projectname Zeeman projectname

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extend/shorten change recommendation

4 participants