Skip to content

[Versions] Add the Properties section (#3627) - #3912

Merged
ValeriaMaltseva merged 7 commits into
2026.xfrom
feature/versions-properties-section-3627
Jul 24, 2026
Merged

[Versions] Add the Properties section (#3627)#3912
ValeriaMaltseva merged 7 commits into
2026.xfrom
feature/versions-properties-section-3627

Conversation

@ValeriaMaltseva

Copy link
Copy Markdown
Contributor

What

Adds a Properties section to the Data Object Versions view (single and comparison), so versioned object properties are visible and diffable.

Closes #3627. Follow-up to #2822 and follows its approach.

How

  • getPropertiesData synthesizes a properties section (ordered after System Data). textinput, boolcheckbox render through the existing DataComponent; element references (asset/document/object) render as a clickable manyToOneRelation-style element tag inside a read-only input via the new PropertyElementLink component.
  • Properties participate in version comparison / diff highlighting for free through the existing isEqual-based pipeline.
  • Introduces a shared PropertyType enum (+ ELEMENT_REFERENCE_PROPERTY_TYPES) in the properties tab constants, used by the properties type select and the version view instead of duplicated magic strings.
  • Adds the version.category.title.properties translation key for all locales (en, de, es, fr, it, no, sv).

Scope

Data objects only — AssetVersion / DocumentVersion don't expose properties over the API, so assets/documents are out of scope here (would require a backend change).

Testing

  • tsc --noEmit: clean
  • ESLint: clean

🤖 Generated with Claude Code

ValeriaMaltseva and others added 2 commits July 20, 2026 17:06
Show versioned data-object properties in the Versions view (single and
comparison), following the approach from PR #2822:

- Add a `properties` section synthesized in getPropertiesData, ordered
  after system data. Text -> input, bool -> checkbox rendered through the
  existing DataComponent; element references (asset/document/object) keep
  their type and render as a clickable manyToOneRelation-style element tag
  inside a read-only input via the new PropertyElementLink component.
- Properties participate in version comparison/diff highlighting for free
  via the existing isEqual-based pipeline.
- Introduce a shared PropertyType enum (and ELEMENT_REFERENCE_PROPERTY_TYPES)
  in the properties tab constants, used by the properties type select and
  the version view instead of duplicated magic strings.
- Add the version.category.title.properties translation key.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add version.category.title.properties for de, es, fr, it, no and sv.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 21, 2026 08:11
@ValeriaMaltseva ValeriaMaltseva added this to the 2026.3.0 milestone Jul 21, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Verdict: Needs changes. Adds versioned data-object properties to single and comparison views.

Changes:

  • Synthesizes a Properties version section with type-specific rendering.
  • Adds read-only element-reference links and shared property types.
  • Localizes the new section across supported locales.

Assessment:

  • Both single and comparison views use the updated formatter (details-functions.ts:98-121).
  • Changes are additive and located in the owning version/property modules.
  • Three correctness issues remain: translated custom keys, duplicate inherited/own keys being collapsed, and incomplete metadata diffing.
  • No regression tests were added for the formatting or rendering behavior.

Reviewed changes

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

Show a summary per file
File Description
translations/studio.sv.yaml Adds Swedish title.
translations/studio.no.yaml Adds Norwegian title.
translations/studio.it.yaml Adds Italian title.
translations/studio.fr.yaml Adds French title.
translations/studio.es.yaml Adds Spanish title.
translations/studio.en.yaml Adds English title.
translations/studio.de.yaml Adds German title.
properties-container.tsx Uses shared property types.
property-types.ts Defines property type constants.
details-functions.ts Adds properties to version data.
property-element-link.tsx Renders element-reference properties.
object-versions-fields-view.tsx Displays the Properties section.
versionConstants.ts Adds the Properties category.

ValeriaMaltseva and others added 2 commits July 21, 2026 08:15
Own and inherited properties that share a key no longer collapse into a
single row: getUniqFieldKey now folds ownership into the field identity,
so neither entry is dropped when the entries are keyed into a Map.

Property change detection compares the versioned attributes (type,
inheritable, inherited, config, description) via a dedicated
comparisonValue instead of only the data value, so attribute-only
changes are detected. The shared version-data hook prefers this
precomputed isModifiedValue flag; assets keep the rendered-value
fallback.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 15 out of 16 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (2)

assets/js/src/core/modules/data-object/editor/shared-tab-manager/tabs/versions/components/object-versions-fields-view/object-versions-fields-view.tsx:70

  • Custom property keys must be shown literally. Calling t(key) means a valid key such as open or name is replaced by the locale's UI translation, so the version view no longer identifies the actual property. Keep translation for class-field titles, but bypass it for the Properties breadcrumb.
    const isSystemDataField = breadcrumbKey === VersionCategoryName.SYSTEM_DATA
    const textValue = isSystemDataField ? t(`version.${key}`) : t(key)

assets/js/src/core/modules/data-object/editor/shared-tab-manager/tabs/versions/details-functions.ts:110

  • A property's type can differ between the compared snapshots (for example, after deleting and recreating the same key). Although the type is compared, the table row retains only the main version's fieldData, so both values are rendered with this one fieldtype; an asset-to-text change can therefore render the text side as an empty element link, and the inverse renders the relation object as text. Preserve the field type per version and select it while rendering each version value.
    } else if (ELEMENT_REFERENCE_PROPERTY_TYPES.includes(property.type)) {
      fieldtype = property.type

When a property row differs in comparison mode, show a tooltip icon next
to its name listing the non-value attributes that changed (type,
inheritable, config, description, ...). The attribute list is derived
dynamically from comparisonValue, so a difference caused by an attribute
rather than the rendered value is explained instead of looking like an
unexplained highlight.

Adds the version.changed-attributes translation key to all locales.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ValeriaMaltseva
ValeriaMaltseva requested a review from vin0401 July 21, 2026 13:51
@sonarqubecloud

Copy link
Copy Markdown

@ValeriaMaltseva
ValeriaMaltseva merged commit ac79c5f into 2026.x Jul 24, 2026
16 checks passed
@ValeriaMaltseva
ValeriaMaltseva deleted the feature/versions-properties-section-3627 branch July 24, 2026 10:17
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Versions][DataObjects] Add the Properties section

4 participants