Skip to content

[7418] Uuid control#4819

Merged
sumerjabri merged 1 commit intocraftercms:developfrom
jvega190:feature/7418-uuid
Mar 16, 2026
Merged

[7418] Uuid control#4819
sumerjabri merged 1 commit intocraftercms:developfrom
jvega190:feature/7418-uuid

Conversation

@jvega190
Copy link
Copy Markdown
Member

@jvega190 jvega190 commented Mar 2, 2026

craftercms/craftercms#7418

Summary by CodeRabbit

Release Notes

New Features

  • UUID form fields now support configurable default values, read-only display modes, and conditional visibility options
  • Automatic UUID generation for empty field values is now enabled
  • Enhanced UUID field control with improved form integration

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 2, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7bafec1 and 44b83d0.

📒 Files selected for processing (4)
  • ui/app/src/components/ContentTypeManagement/descriptors/controls/uuid.ts
  • ui/app/src/components/FormsEngine/controls/Uuid.tsx
  • ui/app/src/components/FormsEngine/lib/controlMap.ts
  • ui/app/src/components/FormsEngine/lib/valueRetrievers.ts

Walkthrough

This PR adds UUID form control support to the FormsEngine system by creating a new Uuid component, registering it in the control map, implementing value extraction logic with UUID generation, and augmenting the uuid descriptor with a defaultValue field.

Changes

Cohort / File(s) Summary
UUID Descriptor Configuration
ui/app/src/components/ContentTypeManagement/descriptors/controls/uuid.ts
Added a defaultValue field to uuidDescriptor.fields with textarea type, undefined default, and a readonly property set to true.
UUID Form Control Component
ui/app/src/components/FormsEngine/controls/Uuid.tsx
Created new Uuid component that conditionally renders a readonly Text control based on the hidden field property, with UuidProps interface extending ControlProps.
FormsEngine Integration
ui/app/src/components/FormsEngine/lib/controlMap.ts, ui/app/src/components/FormsEngine/lib/valueRetrievers.ts
Registered Uuid component in controlMap via lazy import; added uuidExtractor function to handle value retrieval with UUID generation fallback, and updated valueRetrieverLookup mapping for 'uuid' control type.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • rart
  • sumerjabri
🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description only provides a link to the related issue without following the template structure or providing meaningful context about the changes. Add a detailed description of the changes made, the motivation for the UUID control implementation, and how it addresses the referenced issue #7418.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title '[7418] Uuid control' directly references the issue number and clearly describes the main change: adding a UUID control component.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@jvega190 jvega190 marked this pull request as ready for review March 2, 2026 20:17
@jvega190 jvega190 requested a review from rart as a code owner March 2, 2026 20:17
@sumerjabri sumerjabri merged commit a00ae8a into craftercms:develop Mar 16, 2026
3 of 4 checks passed
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.

3 participants