Skip to content

Conversation

@TorstenGoerg
Copy link
Collaborator

@TorstenGoerg TorstenGoerg commented Dec 18, 2025

  • Editor improvements for feature model root constraints.
  • Added repositioning of feature model root constraints on constraint group assignment changes.

This solves #1552.

@TorstenGoerg TorstenGoerg requested a review from kbirken December 18, 2025 08:33
@TorstenGoerg TorstenGoerg self-assigned this Dec 18, 2025
@kbirken
Copy link
Member

kbirken commented Dec 18, 2025

Starting review. Functional testing looks good so far. First finding:

In the merge editor the editor for a constraint should be more compact. Currently it looks like this:

image

A more compact editor would be:

group1: feature1 && feature2

I.e., the group name (colored), colon, space, constraint

@kbirken
Copy link
Member

kbirken commented Dec 18, 2025

UX finding: Placing the cursor at the end of a constraint in a group and pressing return will create a new constraint line directly below. However, this does not work for the last constraint in the group.

@TorstenGoerg
Copy link
Collaborator Author

Starting review. Functional testing looks good so far. First finding:

In the merge editor the editor for a constraint should be more compact. Currently it looks like this:

image A more compact editor would be:
group1: feature1 && feature2

I.e., the group name (colored), colon, space, constraint

If it is not needed to make ot that explicit we can remove the keywords "Constraint group".

But the simplified syntax that you suggest collides with the extensions or default "c:" prefix of the expression constraints. So we would end up with group1: c: feature1 && feature2 which does not look good. What about the syntax group1 { c: feature1 && feature2 } ?

@TorstenGoerg
Copy link
Collaborator Author

UX finding: Placing the cursor at the end of a constraint in a group and pressing return will create a new constraint line directly below. However, this does not work for the last constraint in the group.

This is one of the UX findings that I already pointed out in our discussion a few days ago. It is probably not easy to fix as this behavior originates from the underlying query lists. I.e., this UX issue is not caused by the updates of this PR.

@TorstenGoerg
Copy link
Collaborator Author

But the simplified syntax that you suggest collides with the extensions or default "c:" prefix of the expression constraints. So we would end up with group1: c: feature1 && feature2 which does not look good. What about the syntax group1 { c: feature1 && feature2 } ?

Further possibilities would be [group1] c: feature1 && feature2 or just group1 c: feature1 && feature2.

@kbirken
Copy link
Member

kbirken commented Dec 18, 2025

Further possibilities would be [group1] c: feature1 && feature2

I like this one best.

@kbirken
Copy link
Member

kbirken commented Dec 18, 2025

This is one of the UX findings that I already pointed out in our discussion a few days ago.
Yes, I know.

It is probably not easy to fix as this behavior originates from the underlying query lists. I.e., this UX issue is not caused by the updates of this PR.
You're right. If it's not easy to fix, this should not block the PR. But we should improve it in a later step.

@kbirken
Copy link
Member

kbirken commented Dec 18, 2025

Pls. remember to update CHANGELOG.md.

@kbirken
Copy link
Member

kbirken commented Dec 18, 2025

Minor code finding: In intention AddConstraintGroup the expression constraint.@constraintGroup.groupRef.group.index could be extracted into an "additional method" (at the bottom of the intention).

).

Details:
- Editor improvements for feature model root constraints.
- Added repositioning of feature model root constraints on constraint group assignment changes.
- Improved the the root constraints editor according to the review comments.
- Updated CHANGELOG.md.
@kbirken kbirken force-pushed the 1552-variability-improve-handling-of-root-constraints-with-grouping branch from 8628245 to f8083ac Compare December 18, 2025 12:54
Copy link
Member

@kbirken kbirken left a comment

Choose a reason for hiding this comment

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

Looks good, thanks for the improvements for grouped root constraints. This will help the users by avoiding merge conflicts.

The code finding and the tests in preparation should be provided in a follow-up PR.

@TorstenGoerg TorstenGoerg marked this pull request as ready for review December 18, 2025 13:07
@arimer
Copy link
Member

arimer commented Dec 18, 2025

You need to run a gradlew migrate remigrate to make the build happy :)

@kbirken kbirken merged commit aaed633 into maintenance/mps20241 Dec 18, 2025
2 of 3 checks passed
@kbirken kbirken deleted the 1552-variability-improve-handling-of-root-constraints-with-grouping branch December 18, 2025 15:07
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

Successfully merging this pull request may close these issues.

4 participants