Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create ad-hoc sub process via replace menu #2276

Merged
merged 2 commits into from
Jan 23, 2025
Merged

Conversation

jarekdanielak
Copy link
Contributor

Related to camunda/camunda-modeler#4801

Proposed Changes

Make ad-hoc subprocess available as a replace menu entry.

Screen.Recording.2025-01-23.at.14.15.05.mov

Checklist

To ensure you provided everything we need to look at your PR:

  • Brief textual description of the changes present
  • Visual demo attached
  • Steps to try out present, i.e. using the @bpmn-io/sr tool
  • Related issue linked via Closes {LINK_TO_ISSUE} or Related to {LINK_TO_ISSUE}

@jarekdanielak jarekdanielak added modeling enhancement New feature or request ux labels Jan 23, 2025
@jarekdanielak jarekdanielak requested review from nikku and barmac January 23, 2025 13:17
@jarekdanielak jarekdanielak self-assigned this Jan 23, 2025
@bpmn-io-tasks bpmn-io-tasks bot added the needs review Review pending label Jan 23, 2025
@jarekdanielak
Copy link
Contributor Author

I marked ReplaceMenuProvider#_getAdHocHeaderEntries as deprecated, but since it's internal and not used anywhere else, can I just remove it?

@nikku
Copy link
Member

nikku commented Jan 23, 2025

but since it's internal and not used anywhere else, can I just remove it?

Yes. What starts with _ is internal and can be removed at any time.

var isTargetExpanded = target.isExpanded === true;

return isDifferentType(target, target) && (!isTargetSubProcess || isTargetExpanded);
// Collapsed subprocess cannot be replaced with itself or expanded subprocess of different type.
Copy link
Member

Choose a reason for hiding this comment

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

This is useful for our future selves.

Copy link
Member

@barmac barmac left a comment

Choose a reason for hiding this comment

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

The code looks good, and the solution works great from the user perspective. I wonder why we have not implemented it this way in the first place :D

@jarekdanielak jarekdanielak changed the base branch from main to develop January 23, 2025 14:31
@jarekdanielak jarekdanielak merged commit d9b908b into develop Jan 23, 2025
11 checks passed
@jarekdanielak jarekdanielak deleted the ad-hoc-subprocess branch January 23, 2025 14:31
@bpmn-io-tasks bpmn-io-tasks bot removed the needs review Review pending label Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request modeling ux
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants