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

CADENZA-36955 CADENZA-37861 feat: Added setCustomValidity() and `Va… #47

Conversation

sebastianbarth-disy
Copy link
Contributor

The customer is enabled to implement additional custom validation of geometries in reaction of a geometry:update postMessage event sent when the user changes the geometry in a geometry editor dialog (started via createGeometry() or editGeometry() calls).

In this situation the customer can use the new setCustomValidity(message, type) function to add an additional error, warn, info, success state:

  /**
   * Set custom validity state of the geometry editor in addition to the default validation state (including errors and
   * warnings). When set to error the dialog submission is blocked.
   * If there already is a custom state set it will override it.
   * Passing '' will reset the custom state to undefined, meaning no custom state is displayed.
   * If no geometry editing is started, the method call has no effect.
   * @param message {string} The message to show in the dialog
   * @param [type] {CustomValidityType} The type of message (defaults to 'error')
   */
  setCustomValidity(message, type = 'error') {
    ...
  }
  
  /** @typedef {'error'|'warning'|'info'|'success'} CustomValidityType - The type of custom validity used for disclosing custom validity state */

image

JensLuebke and others added 2 commits September 30, 2024 10:27
* CADENZA-37395 Add Simplified switch to Create/Edit/SelectGeometry

---------

Co-authored-by: Andreas W. Bartels <[email protected]>
Co-authored-by: luebke <[email protected]>
@sebastianbarth-disy
Copy link
Contributor Author

Pull request is meant for both, 10.1 and 10.2-planned. Since current master already contains changes meant for 10.2-planned only, we first need to branch off a version for 10.1 and release the 10.2-planned-only changes with a higher minor version (e.g. 2.14.0).

sandbox.html Outdated Show resolved Hide resolved
sandbox.html Outdated Show resolved Hide resolved
sandbox.html Outdated Show resolved Hide resolved
src/cadenza.js Outdated Show resolved Hide resolved
@sebastianbarth-disy sebastianbarth-disy force-pushed the slb/sba/CADENZA-36955_custom_message_for_geometry_editing branch from a697796 to d08d0be Compare October 8, 2024 14:30
…lidationMessageType` to control geometry editor validation state and allow additional validation
@sebastianbarth-disy sebastianbarth-disy force-pushed the slb/sba/CADENZA-36955_custom_message_for_geometry_editing branch from d08d0be to a798a52 Compare October 8, 2024 14:32
@sebastianbarth-disy sebastianbarth-disy changed the base branch from main to v2.14.x October 11, 2024 14:04
@sebastianbarth-disy sebastianbarth-disy merged commit 8d953e8 into v2.14.x Oct 11, 2024
1 check passed
@sebastianbarth-disy sebastianbarth-disy deleted the slb/sba/CADENZA-36955_custom_message_for_geometry_editing branch October 11, 2024 14:05
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.

4 participants