Skip to content

[2325] Add default and initial options to expressions popup#2337

Open
AxelRICHARD wants to merge 3 commits into
mainfrom
ari/enh/2325
Open

[2325] Add default and initial options to expressions popup#2337
AxelRICHARD wants to merge 3 commits into
mainfrom
ari/enh/2325

Conversation

@AxelRICHARD

@AxelRICHARD AxelRICHARD commented Jul 3, 2026

Copy link
Copy Markdown
Member

PLEASE READ ALL ITEMS AND CHECK ONLY RELEVANT CHECKBOXES BELOW

Auto review

  • Have you reviewed this PR? Please do a first quick review, It is very useful to detect typos and missing copyrights, check comments, check your code... The reviewer will thank you for that :)

Project management

  • Has the pull request been added to the relevant milestone?
  • Have the priority: and pr: labels been added to the pull request? (In case of doubt, start with the labels priority: low and pr: to review later)
  • Have the relevant issues been added to the pull request?
  • Have the relevant labels been added to the issues? (area:, type:)
  • Have the relevant issues been added to the same project milestone as the pull request?

Changelog and release notes

  • Has the CHANGELOG.adoc + doc/content/modules/user-manual/pages/release-notes/YYYY.MM.0.adoc been updated to reference the relevant issues?
  • Have the relevant API breaks been described in the CHANGELOG.adoc?
  • Are the new / upgraded dependencies mentioned in the relevant section of the CHANGELOG.adoc?
  • In case of a change with a visual impact, are there any screenshots in the doc/content/modules/user-manual/pages/release-notes/YYYY.MM.0.adoc?
  • In case of a key change, has the change been added to Key highlights section in doc/content/modules/user-manual/pages/release-notes/YYYY.MM.0.adoc?

Documentation

  • Have you included an update of the documentation in your pull request? Please ask yourself if an update (installation manual, user manual, developer manual...) is needed and add one accordingly.

Tests

  • Is the code properly tested? Any pull request (fix, enhancement or new feature) should come with a test (or several). It could be unit tests, integration tests or cypress tests depending on the context. Only doc and releng pull request do not need for tests.

Bug: #2325
Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
Bug: #2325
Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
Bug: #2325
Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
* @param supportsFeatureValueProperties
* whether the effective expression is owned by a {@code FeatureValue}.
* @param featureValueProperties
* the current feature value properties when supported.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Given that the featureValueProperties is optional/nullable, is there a reason to have an explicit separate flag to indicate if it's supported?

editingContextId: string,
elementId: string,
newExpressionText: string,
properties?: GQLEditExpressionInput['properties']

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Here the type is properties?: GQLEditExpressionInput['properties'], but in useEditExpression.types.ts it is defined as properties?: ExpressionProperties | null. They're probably equivalent, but why two different forms?

editingContextId: string,
parentElementId: string,
expressionText: string,
properties?: GQLCreateExpressionInput['properties']

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Here the type is properties?: GQLCreateExpressionInput['properties'], but in useCrateExpression.types.tsit is defined asproperties?: ExpressionProperties | null`. They're probably equivalent, but why two different forms?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nitpick: is it voluntary to use a lower-case 'e' here? Except for hook types files, all other types.ts start with an upper-case letter.

elementId,
mode,
onClose,
expressionPropertiesContext,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm probably missing something, but I'm not sure I get the purpose of this parameter. It's called "context" but is not a React context, and I don't seem to find any place where EditSysMLExpressionModal is invoked and it is actually passed (e.g. NewExpressionDiagramToolOverriddenContribution).

featureValue: FeatureValueExpressionProperties;
}

export interface ExpressionPropertiesContext {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Strange to call this a "context" as it does not seem to have anything to do with React (use)Context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"default" keyword and initial value (:=) can no longer be used on direct edit

2 participants