fix(frontend): Surface grader validation errors in test workspace#151
Merged
Conversation
Saving a test without graders failed silently — the save button showed an x but no feedback indicated where the validation rule lived. The grader builder now renders an invalid state with the required message when the user attempts to save, and the Grading workspace tab shows a red badge so users on a different tab know which view to visit. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ss tabs The custom in-component validation message duplicated the one already rendered by umb-property-layout's umb-form-validation-message. Additionally, the form-control binding only registered when the Grading view was mounted, so saving from the Settings tab never produced a hint badge on Grading. Drops the redundant message div and adds a workspace-level UmbValueValidator that always runs against the model's graders, so the tab hint reflects validity regardless of which view is open. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Prefix the workspace-level grader validation message with `#` so it is resolved through the Umbraco localization system rather than stored as a literal string in the validation context. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
uai-grader-config-buildernow renders an invalid placeholder color and validation message once the user has submitted (driven bypristine === false && validity.valid === false).!hint badge when the$.gradersvalidation message is present, so users land on the right tab even if they were elsewhere when they hit save.Changes
grader-config-builder.element.ts: render invalid styling + message text when invalid and not pristine.test-grading-workspace-view.element.ts: drop unusedUmbFormControlMixinplumbing; bind builder viaumbBindToValidation(this, "$.graders", value).test-workspace.context.ts: observemessagesOfPathAndDescendant("$.graders")and mirror messages intoview.hintsfor the Grading tab; cleared automatically when the message list shrinks.constants.ts/manifests.ts: lift Grading view alias intoUAI_TEST_WORKSPACE_VIEW_GRADING_ALIASso the context and the manifest share the same source.Test plan
!badge.invalidcolor and the required message ("At least one grader is required" / localized) is shown beneath it.Fixes: #145
🤖 Generated with Claude Code