Skip to content

[Add] feature to delete a parameter via the model editor#775

Merged
samatstariongroup merged 2 commits into
developmentfrom
model-editor-delete-parameter
May 3, 2026
Merged

[Add] feature to delete a parameter via the model editor#775
samatstariongroup merged 2 commits into
developmentfrom
model-editor-delete-parameter

Conversation

@samatstariongroup
Copy link
Copy Markdown
Member

Prerequisites

  • I have written a descriptive pull-request title
  • I have verified that there are no overlapping pull-requests open
  • I have verified that I am following the COMET-WEB code style guidelines
  • I have provided test coverage for my change (where applicable)

Description

add a delete button the parameter cards in the model editor such that a user can delete a parameter. Confirmation is asked via a confirmation dialog

@samatstariongroup samatstariongroup requested a review from joao4all May 1, 2026 15:58
Copy link
Copy Markdown
Contributor

@joao4all joao4all left a comment

Choose a reason for hiding this comment

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

LGTM, small things concerning null values


if (result.IsSuccess)
{
this.ElementDefinitionDetailsViewModel.Rows = this.SelectedElementDefinition?.Parameter
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.

In this case, if the SelectedElementDefinition is null, the rows from ElementDefinitionDetailsViewModel are null. Is it possible that we get a null exception from Rows being null?

}
catch (Exception exception)
{
this.logger?.LogError(exception, "An error occurred while deleting the Parameter with iid {Iid}", parameter.Iid);
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.

Is there any case where logger is null? If not, pls remove the "?" here

@samatstariongroup samatstariongroup merged commit f3df20c into development May 3, 2026
7 of 8 checks passed
@samatstariongroup samatstariongroup deleted the model-editor-delete-parameter branch May 3, 2026 13:11
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.

2 participants