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

Refactor ListGroup open close handling #369

Merged
merged 3 commits into from
Jun 20, 2024

Conversation

nikku
Copy link
Member

@nikku nikku commented Jun 19, 2024

Proposed Changes

This PR puts list group, on stable foundations, without magic ™️ ®️

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}

Related to camunda/camunda-modeler#4382

nikku added 3 commits June 19, 2024 18:57
Use helpers to reduce duplication.
This simplifies the existing open handling:

* There is no need to compute `newlyAddedItemIds` (and cache it),
  instead we can just compute it from available data and use it
  immediately.
* Removes most of the magic in this file (tm) (r)

Related to camunda/camunda-modeler#4382
@bpmn-io-tasks bpmn-io-tasks bot added the needs review Review pending label Jun 19, 2024
@nikku nikku changed the title Refactor listgroup open close handling Refactor ListGroup open close handling Jun 19, 2024
@nikku nikku requested review from marstamm and barmac June 19, 2024 19:01
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.

I tested this with bpmn-js-element-templates, and could not break it. Great improvement.

@barmac
Copy link
Member

barmac commented Jun 20, 2024

There's one thing which I don't get. After I link it, the placeholder tests in the bpmn-js-element-templates start to fail:

Chrome Headless 121.0.6167.85 (Mac OS 10.15.7) provider/cloud-element-templates - CustomProperties placeholder should display placeholder (FEEL, String) FAILED
	AssertionError: expected '' to deeply equal 'Placeholder'
	    at Context.eval (webpack-internal:///./test/spec/cloud-element-templates/properties/CustomProperties.spec.js:1662:36)
Chrome Headless 121.0.6167.85 (Mac OS 10.15.7) provider/cloud-element-templates - CustomProperties placeholder should display placeholder (FEEL, Text) FAILED
	AssertionError: expected '' to deeply equal 'Placeholder'
	    at Context.eval (webpack-internal:///./test/spec/cloud-element-templates/properties/CustomProperties.spec.js:1673:36)

It looks unrelated though.

@barmac
Copy link
Member

barmac commented Jun 20, 2024

This was due to an outdated @bpmn-io/feel-editor on my machine. This is good now.

@barmac barmac merged commit 0e0a966 into main Jun 20, 2024
14 checks passed
@barmac barmac deleted the refactor-listgroup-open-close-handling branch June 20, 2024 07:48
@bpmn-io-tasks bpmn-io-tasks bot removed the needs review Review pending label Jun 20, 2024
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