-
Notifications
You must be signed in to change notification settings - Fork 98
Introduce attributes on PdmUiItem instead of defineEditorAttributes #13397
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
Merged
Conversation
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
kriben
requested changes
Jan 7, 2026
Collaborator
kriben
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great stuff! Requested some changes, but most are debatable.
Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/cafPdmOptionItemInfo.cpp
Outdated
Show resolved
Hide resolved
kriben
approved these changes
Jan 7, 2026
Collaborator
kriben
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Refactors PdmUiItem and moves PdmUiItemInfo and PdmOptionItemInfo classes. Adds attribute support as a replacement for defineEditorAttributes
Migrates UI editor attribute definitions from direct member access in `defineEditorAttribute` to a map-based system using `setAttribute`.
Explains the migration from the old `defineEditorAttribute` pattern to the new `setAttribute` pattern using type-safe Keys structs in the PDM UI editor. Highlights the benefits of the new pattern, including type safety, IDE support, self-documentation, maintainability, and validation. Provides examples of common attribute usage for different editor types. Clarifies backward compatibility, noting the coexistence of both patterns during migration.
Updates the way UI label positions are set for PDM fields.
398876b to
99bef20
Compare
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.
Modernization of UI Attribute Handling:
setAttributeinPdmUiItem. This can be used as a replacement fordefineEditorAttribute. In a transition period, both concepts can be used.CLAUDE.mdfor the newsetAttributepattern using type-safeKeysstructs, replacing the olderdefineEditorAttributemethod.Moving of classes:
cafPdmUiItemInfo.cpp,cafPdmUiItemInfo.h,cafPdmOptionItemInfo.cpp, andcafPdmOptionItemInfo.h.