Skip to content

Allow saving blueprints with validation errors #19748

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lauraneto
Copy link
Contributor

Fixes #19506

The style changes were based on UmbDocumentWorkspaceContext._handleSave().
Since we only want to show warnings, and never errors, the document-blueprint-workspace-editor host element styles was adjusted instead.

In order to test, create a blueprint from a document type with a required field and attempt to save the blueprint without filling in that field.

@Copilot Copilot AI review requested due to automatic review settings July 17, 2025 15:48
Copy link
Contributor

@Copilot 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 enables saving document blueprints even when they contain validation errors, addressing issue #19506. The changes allow blueprints to be saved with required fields left empty, while displaying validation issues as warnings rather than blocking errors.

  • Adds ignoreValidationResultOnSubmit: true to the blueprint workspace context configuration
  • Updates CSS custom properties to display validation errors as warnings using warning colors instead of error colors

Reviewed Changes

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

File Description
document-blueprint-workspace.context.ts Configures the workspace to ignore validation results during submission
document-blueprint-workspace-editor.element.ts Updates CSS variables to display validation errors as warnings with warning colors

Comment on lines +135 to +138
--uui-color-invalid: var(--uui-color-warning);
--uui-color-invalid-emphasis: var(--uui-color-warning-emphasis);
--uui-color-invalid-standalone: var(--uui-color-warning-standalone);
--uui-color-invalid-contrast: var(--uui-color-warning-contrast);
Copy link
Preview

Copilot AI Jul 17, 2025

Choose a reason for hiding this comment

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

Overriding the semantic meaning of 'invalid' colors to use warning colors could be confusing for developers and users. Consider creating blueprint-specific CSS custom properties (e.g., --uui-color-blueprint-validation) to maintain semantic clarity while achieving the desired visual styling.

Suggested change
--uui-color-invalid: var(--uui-color-warning);
--uui-color-invalid-emphasis: var(--uui-color-warning-emphasis);
--uui-color-invalid-standalone: var(--uui-color-warning-standalone);
--uui-color-invalid-contrast: var(--uui-color-warning-contrast);
--uui-color-blueprint-validation: var(--uui-color-warning);
--uui-color-blueprint-validation-emphasis: var(--uui-color-warning-emphasis);
--uui-color-blueprint-validation-standalone: var(--uui-color-warning-standalone);
--uui-color-blueprint-validation-contrast: var(--uui-color-warning-contrast);

Copilot uses AI. Check for mistakes.

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.

Can't have blank properties in Document Blueprints
1 participant