Skip to content

Conversation

nielslyngsoe
Copy link
Member

@nielslyngsoe nielslyngsoe commented Aug 21, 2025

Extending the work of #19255 (Should be reviewed first)

By adding a Validator that checks the validity of root properties(username, email, etc.) of the Member Workspace, to then report to the validation system and navigate the user to the info tab.

As well, this uses the Hints Context to display the existence of validation issues on the info Tab.

Fixes #16079

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 implements root property validation for the member workspace, extending previous work to provide real-time validation feedback for member properties like username, email, and password. The implementation introduces a hint system that displays validation issues as badges on workspace view tabs and enables automatic navigation to the problematic fields.

Key changes:

  • Adds validation binding for username, email, and password fields in member workspace
  • Implements a hint system for displaying validation badges on workspace view tabs
  • Creates workspace view contexts and navigation management for better validation UX
  • Extends the validation system with value validators for root properties

Reviewed Changes

Copilot reviewed 51 out of 52 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/Umbraco.Web.UI.Client/src/packages/members/member/workspace/member/member-workspace.context.ts Adds root property validation setup and hint management for member workspace
src/Umbraco.Web.UI.Client/src/packages/members/member/workspace/member/views/member/member-workspace-view-member.element.ts Binds validation to username, email, and password input fields
src/Umbraco.Web.UI.Client/src/packages/core/workspace/components/workspace-editor/workspace-editor.element.ts Implements hint display system for workspace view tabs with badges
src/Umbraco.Web.UI.Client/src/packages/core/validation/controllers/value-validator/valueValidator.controller.ts Creates new value validator controller for handling property-level validation
src/Umbraco.Web.UI.Client/src/packages/core/hint/ Introduces new hint system for managing validation status indicators
src/Umbraco.Web.UI.Client/src/packages/core/view/ Adds view context system for managing workspace view state and hints
Comments suppressed due to low confidence (1)

src/Umbraco.Web.UI.Client/src/packages/content/content-type/structure/content-type-structure-manager.class.ts:313

  • The variable name missingThis is unclear and doesn't describe what it represents. Consider renaming to something more descriptive like hasExistingContext or contextExists.
	getOwnerContentType() {

return {
path: UMB_WORKSPACE_VIEW_PATH_PATTERN.generateLocal({ viewPathname: manifest.meta.pathname }),
component: () => createExtensionElement(manifest),
setup: (component) => {
setup: (component?: any) => {
Copy link
Preview

Copilot AI Aug 21, 2025

Choose a reason for hiding this comment

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

The parameter type any should be replaced with a more specific type. Consider using Element | undefined or creating a proper interface for the component.

Suggested change
setup: (component?: any) => {
setup: (component?: (Element & { manifest?: unknown }) | undefined) => {

Copilot uses AI. Check for mistakes.


async validate(): Promise<void> {
this.#validationMode = true;
// Validate is called when the validation state of this validator is asked to be fully resolved. Like when user clicks Save & Publish.
Copy link
Preview

Copilot AI Aug 21, 2025

Choose a reason for hiding this comment

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

[nitpick] The comment should end with a period for consistency with documentation standards.

Copilot uses AI. Check for mistakes.

nielslyngsoe and others added 3 commits August 21, 2025 21:50
…/feature/implement-validation-hints-for-member-workspace
…lers/value-validator/valueValidator.controller.ts

Co-authored-by: Copilot <[email protected]>
@iOvergaard
Copy link
Contributor

@nielslyngsoe there are a few merge conflicts after the base PR has been merged. Would you take a look, please?

…ember-workspace

# Conflicts:
#	src/Umbraco.Web.UI.Client/src/packages/content/content/workspace/content-validation-to-hints.manager.ts
#	src/Umbraco.Web.UI.Client/src/packages/content/content/workspace/views/edit/content-editor.element.ts
#	src/Umbraco.Web.UI.Client/src/packages/core/hint/context/index.ts
#	src/Umbraco.Web.UI.Client/src/packages/core/view/context/view.context.ts
Copy link
Contributor

@iOvergaard iOvergaard left a comment

Choose a reason for hiding this comment

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

It works, but eslint is complaining about missing .js endings, and the test suite has encountered a couple of constants that are not exported. When those are fixed, this should be good to go.

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.

Umbraco 14 Create Member No Validation Messages
2 participants