Skip to content

feat: activate direct editing for new activities and events#2408

Open
ev-codes wants to merge 3 commits intodevelopfrom
748-activate-direct-editing-on-create
Open

feat: activate direct editing for new activities and events#2408
ev-codes wants to merge 3 commits intodevelopfrom
748-activate-direct-editing-on-create

Conversation

@ev-codes
Copy link
Copy Markdown

@ev-codes ev-codes commented Mar 31, 2026

Proposed Changes

closes #748

Immediately open the name editor after creating any new activity (not just tasks) or any new event.

Activate-Direct-Editing.mov

Checklist

Ensure you provide everything we need to review your contribution:

  • Contribution meets our definition of done
  • Pull request establishes context
    • Link to related issue(s), i.e. Closes {LINK_TO_ISSUE} or Related to {LINK_TO_ISSUE}
    • Brief textual description of the changes
    • Screenshots or short videos showing UI/UX changes
    • Steps to try out, i.e. using the @bpmn-io/sr tool

@bpmn-io-tasks bpmn-io-tasks bot added the in progress Currently worked on label Mar 31, 2026
@ev-codes ev-codes marked this pull request as ready for review March 31, 2026 14:47
@ev-codes ev-codes requested review from a team, Buckwich, barinali and Copilot March 31, 2026 14:47
@bpmn-io-tasks bpmn-io-tasks bot added needs review Review pending and removed in progress Currently worked on labels Mar 31, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR expands the “activate direct editing on create” behavior so that newly created BPMN activities and events immediately open the label editor, aligning modeling behavior with #748.

Changes:

  • Broaden direct-edit activation on create/auto-place from specific element types (Task, TextAnnotation, etc.) to all bpmn:Activity and bpmn:Event elements (while keeping existing behavior for TextAnnotation and Participant).
  • Extend label-editing creation tests to cover additional activity and event types, and explicitly verify that gateways do not trigger direct editing.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
lib/features/label-editing/LabelEditingProvider.js Expands the element-type whitelist for direct editing activation to include all activities and events.
test/spec/features/label-editing/LabelEditingProviderSpec.js Adds/adjusts tests to verify direct editing activation for more activities/events and non-activation for gateways.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

expect(directEditing.isActive()).to.be.true;
});

it('on subProcess creation', function() {
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

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

Test description uses inconsistent capitalization: "subProcess" should match the BPMN type name ("SubProcess") like the other test cases (e.g., "StartEvent", "EndEvent"). This improves readability and keeps test names consistent.

Suggested change
it('on subProcess creation', function() {
it('on SubProcess creation', function() {

Copilot uses AI. Check for mistakes.
expect(directEditing.isActive()).to.be.true;
});

it('on adHocSubProcess creation', function() {
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

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

Test description uses inconsistent capitalization: "adHocSubProcess" should match the BPMN type name ("AdHocSubProcess") like the other test cases. Keeping test titles consistent makes failures easier to scan.

Suggested change
it('on adHocSubProcess creation', function() {
it('on AdHocSubProcess creation', function() {

Copilot uses AI. Check for mistakes.
ev-codes and others added 2 commits April 1, 2026 14:33
Match BPMN type names (SubProcess, AdHocSubProcess) in test titles for consistency with other tests (StartEvent, EndEvent).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs review Review pending

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Activate direct editing on create for all activities and events

2 participants