Skip to content

[7472] Replace the term dependency with reference throughout the product #4900

Open
jvega190 wants to merge 2 commits into
craftercms:developfrom
jvega190:enhancement/7472
Open

[7472] Replace the term dependency with reference throughout the product #4900
jvega190 wants to merge 2 commits into
craftercms:developfrom
jvega190:enhancement/7472

Conversation

@jvega190

@jvega190 jvega190 commented Jun 23, 2026

Copy link
Copy Markdown
Member

craftercms/craftercms#7472

Summary by CodeRabbit

  • Style
    • Updated terminology throughout the UI to consistently use “references” instead of “dependencies.”
    • Refreshed tooltip, aria-label, and button copy (e.g., add/remove reference wording).
    • Adjusted dialog and menu text for dependency/reference views, including titles, empty states, and warning/subtitle messaging.
    • Updated related internationalized strings so messages like “dependent items” now read as “items that reference the selected item,” improving consistency across rename, delete, uninstall, and publish flows.

@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 6e0e913a-5be7-417c-be06-97c4dff00db9

📥 Commits

Reviewing files that changed from the base of the PR and between 2f57715 and e3cfae4.

📒 Files selected for processing (1)
  • ui/app/src/components/DependenciesDialog/DependenciesDialogUI.tsx
💤 Files with no reviewable changes (1)
  • ui/app/src/components/DependenciesDialog/DependenciesDialogUI.tsx

Walkthrough

Replaces all user-facing "dependencies", "dependants", and "dependent items" terminology with "references" across the UI. Changes affect tooltip labels, dialog titles and body text, context menu entries, translation keys, and i18n defaultMessage strings in 17 files. No component logic, data flow, or API contracts are modified.

Changes

Terminology rename: dependencies → references

Layer / File(s) Summary
Translation key swap
ui/app/src/components/ItemActionsMenu/translations.ts, ui/app/src/utils/itemActions.ts
Removes translations.dependencies entry, adds translations.references (words.references / "References"), and updates the context menu label to use the new key.
DependenciesDialog text
ui/app/src/components/DependenciesDialog/DependenciesDialog.tsx, ui/app/src/components/DependenciesDialog/DependenciesDialogUI.tsx, ui/app/src/components/DependenciesDialog/utils.tsx
Updates dialog title to "Content Item References", renames selector menu items and empty-state messages to "references" wording, changes context menu entry label, and relabels the asset type filter to "Show all references".
Delete/Uninstall dialog text
ui/app/src/components/DeleteDialog/DeleteDialog.tsx, ui/app/src/components/DeleteDialog/DeleteDialogUIBody.tsx, ui/app/src/components/DeleteContentTypeDialog/DeleteContentTypeDialogBody.tsx, ui/app/src/components/DeletePluginDialog/UninstallPluginDialogBody.tsx
Updates subtitle, section header, empty state, warning messages, and password prompt to use "references" wording; removes explicit i18n id props in favor of inline defaultMessage.
ContentType management controls and descriptors
ui/app/src/components/ContentTypeManagement/controls/CopyDependencies.tsx, ui/app/src/components/ContentTypeManagement/controls/DeleteDependencies.tsx, ui/app/src/components/ContentTypeManagement/descriptors/controls/commonDescriptors.ts
Renames tooltips, aria-label strings, and field descriptor labels from "Add/Remove/Delete/Copy Dependency/Dependencies" to "Add/Remove/Delete/Copy Reference/References".
Remaining component and global string updates
ui/app/src/components/DependencySelection/DependencySelection.tsx, ui/app/src/components/RenameDialogBody/RenameItemView.tsx, ui/app/src/components/CreateFileDialog/translations.ts, ui/app/src/components/PublishOnDemandWidget/PublishOnDemandWidget.tsx, ui/app/src/components/SiteConfigurationManagement/translations.ts, ui/app/src/env/i18n-legacy.ts
Updates remaining "references" wording across DependencySelection section labels, RenameItemView states, CreateFileDialog translation, PublishOnDemandWidget warning copy, SiteConfigurationManagement resolver config description, and legacy i18n message.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Suggested reviewers

  • rart
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description only contains a GitHub issue link without providing context, summary, or explanation of the changes. Expand the description to include a summary of the terminology changes, list affected components, and explain the rationale for this terminology shift to help reviewers understand the scope and purpose.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the main objective of the PR: replacing 'dependency' terminology with 'reference' across the product UI.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 8

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
ui/app/src/components/DeletePluginDialog/UninstallPluginDialogBody.tsx (1)

85-89: 📐 Maintainability & Code Quality | 🟠 Major

I18n regression: Non-English translations will be lost.

The FormattedMessage component on line 85 uses only defaultMessage and values props, but lacks an id prop. Translation catalogs for Korean, Spanish, and German still define uninstallPluginDialog.reviewDependenciesMessage, creating orphaned translations. Non-English users will see the English defaultMessage instead of their localized text.

Restore the id prop to reference the catalog entry, or remove the orphaned keys from all translation files.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@ui/app/src/components/DeletePluginDialog/UninstallPluginDialogBody.tsx`
around lines 85 - 89, The FormattedMessage component in
UninstallPluginDialogBody.tsx that displays "Please review the items that
reference the plugin..." is missing the id prop required to link it to the
translation catalog. Add the id prop with value
uninstallPluginDialog.reviewDependenciesMessage to the FormattedMessage
component to ensure that the existing Korean, Spanish, and German translations
are properly referenced instead of falling back to the English defaultMessage.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@ui/app/src/components/DeleteContentTypeDialog/DeleteContentTypeDialogBody.tsx`:
- Line 85: The FormattedMessage components in DeleteContentTypeDialogBody.tsx at
line 85 and lines 97-100 have had their id attributes removed, but the
translation catalogs still contain the corresponding keys
(deleteContentTypeDialog.reviewDependenciesMessage and
deleteContentTypeDialog.typeConfirmPassword). Without the id prop, react-intl
cannot match the components to their translations, causing non-English users to
see only the English defaultMessage. Restore the id attributes to both
FormattedMessage components with their original translation key names, or
alternatively remove these obsolete keys from the translation catalogs (de.json,
es.json, ko.json) if the ids were intentionally removed.

In `@ui/app/src/components/DeleteDialog/DeleteDialog.tsx`:
- Line 30: The FormattedMessage component in DeleteDialog.tsx that displays the
subtitle message (containing the text about selected items being deleted) is
missing the id attribute. This id attribute is required by react-intl to look up
translated messages from the translation catalogs. Restore the
id="deleteDialog.subtitle" attribute to the FormattedMessage component so that
non-English users will see their localized translations instead of only the
English defaultMessage.

In `@ui/app/src/components/DeleteDialog/DeleteDialogUIBody.tsx`:
- Around line 74-75: The FormattedMessage element displaying "Items that
reference the selected item" is missing its id attribute, which prevents the
i18n system from looking up translations in language catalogs and causes
non-English users to see only the English defaultMessage. Add back the id
attribute to this FormattedMessage element, using either the original
translation key deleteDialog.dependentItems if that key exists in all language
catalogs (ko.json, de.json, es.json, etc.), or create a new translation key for
the updated terminology and add corresponding translations to all language
catalog files to ensure the new phrasing is properly localized.

In `@ui/app/src/components/DependenciesDialog/DependenciesDialog.tsx`:
- Line 26: The FormattedMessage component used in the EnhancedDialog title prop
is missing the required id prop needed for react-intl translation lookup. Add
the id prop with value "dependenciesDialog.title" to the FormattedMessage
component alongside the existing defaultMessage prop. This will enable the
translation system to load the locale-specific translation key (such as the
German translation "Abhängigkeiten von Inhaltselementen" from de.json) instead
of always displaying the English default message. Ensure the id attribute
follows the same naming pattern as other FormattedMessage instances in the
component like dependenciesDialog.contentItems and dependenciesDialog.assets.

In `@ui/app/src/components/DependenciesDialog/DependenciesDialogUI.tsx`:
- Around line 115-122: The FormattedMessage components in
DependenciesDialogUI.tsx have commented-out id properties for the messages with
defaultMessage values "has no references" and "Nothing is referenced by". Remove
the commented-out ids and either add new appropriate id props (such as
"dependenciesDialog.noReferences" and "dependenciesDialog.noReferencedItems")
and update the corresponding locale files with translations, or restore the
original ids and update the locale file entries to use the new "references"
terminology instead of "dependants" and "dependencies". Ensure that the id
property is uncommented and active for both FormattedMessage components so that
internationalization works correctly for non-English users.
- Around line 96-99: The FormattedMessage components in the MenuItem elements
are missing explicit id props required for react-intl to perform locale-specific
translations. Add id props to each FormattedMessage component (e.g.,
id="dependenciesDialog.referencesOfSelectedItem" for the "References of selected
item" message and id="dependenciesDialog.referencedBySelectedItem" for the
"Items that are referenced by the selected item" message) to enable proper i18n
functionality, then update all locale translation files to include these new
message ids with appropriate translations for each language.
- Line 167: The FormattedMessage component in DependenciesDialogUI.tsx uses the
id "dependenciesDialog.references" which is missing from all locale translation
files. Add the key "dependenciesDialog.references" to each locale file (de.json,
es.json, and ko.json) with appropriate translations for each language. The
German translation should be something like "Verweise", Spanish should be
"Referencias", and Korean should be "참조" or similar localized equivalents. This
ensures non-English users see proper localized text instead of falling back to
the English "References" message.

In `@ui/app/src/components/DependenciesDialog/utils.tsx`:
- Line 82: The FormattedMessage component for the "Show all references" label is
missing the required id prop, which prevents react-intl from looking up
locale-specific translations for different languages. Add an id prop to the
FormattedMessage component (e.g., id="dependenciesDialog.showAllReferences") to
enable proper translation lookup, then update all locale files (such as de.json)
to include entries for this new id with appropriate translated text to replace
the outdated "dependenciesDialog.allDeps" entry.

---

Outside diff comments:
In `@ui/app/src/components/DeletePluginDialog/UninstallPluginDialogBody.tsx`:
- Around line 85-89: The FormattedMessage component in
UninstallPluginDialogBody.tsx that displays "Please review the items that
reference the plugin..." is missing the id prop required to link it to the
translation catalog. Add the id prop with value
uninstallPluginDialog.reviewDependenciesMessage to the FormattedMessage
component to ensure that the existing Korean, Spanish, and German translations
are properly referenced instead of falling back to the English defaultMessage.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 59c5874c-073a-45cf-b09f-906ee2acb94b

📥 Commits

Reviewing files that changed from the base of the PR and between 9990ce9 and 2f57715.

📒 Files selected for processing (18)
  • ui/app/src/components/ContentTypeManagement/controls/CopyDependencies.tsx
  • ui/app/src/components/ContentTypeManagement/controls/DeleteDependencies.tsx
  • ui/app/src/components/ContentTypeManagement/descriptors/controls/commonDescriptors.ts
  • ui/app/src/components/CreateFileDialog/translations.ts
  • ui/app/src/components/DeleteContentTypeDialog/DeleteContentTypeDialogBody.tsx
  • ui/app/src/components/DeleteDialog/DeleteDialog.tsx
  • ui/app/src/components/DeleteDialog/DeleteDialogUIBody.tsx
  • ui/app/src/components/DeletePluginDialog/UninstallPluginDialogBody.tsx
  • ui/app/src/components/DependenciesDialog/DependenciesDialog.tsx
  • ui/app/src/components/DependenciesDialog/DependenciesDialogUI.tsx
  • ui/app/src/components/DependenciesDialog/utils.tsx
  • ui/app/src/components/DependencySelection/DependencySelection.tsx
  • ui/app/src/components/ItemActionsMenu/translations.ts
  • ui/app/src/components/PublishOnDemandWidget/PublishOnDemandWidget.tsx
  • ui/app/src/components/RenameDialogBody/RenameItemView.tsx
  • ui/app/src/components/SiteConfigurationManagement/translations.ts
  • ui/app/src/env/i18n-legacy.ts
  • ui/app/src/utils/itemActions.ts

Comment thread ui/app/src/components/DeleteDialog/DeleteDialog.tsx
Comment thread ui/app/src/components/DeleteDialog/DeleteDialogUIBody.tsx
Comment thread ui/app/src/components/DependenciesDialog/DependenciesDialog.tsx
Comment thread ui/app/src/components/DependenciesDialog/DependenciesDialogUI.tsx
Comment thread ui/app/src/components/DependenciesDialog/DependenciesDialogUI.tsx Outdated
Comment thread ui/app/src/components/DependenciesDialog/DependenciesDialogUI.tsx
Comment thread ui/app/src/components/DependenciesDialog/utils.tsx
@jvega190

Copy link
Copy Markdown
Member Author

@coderabbitai can you check if everything looks good? Please give it a final review before I hand over for human review

@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
echo "=== 1. Check for old i18n IDs that were removed but may still be referenced ==="
rg -n "dependenciesDialog\.title|deleteContentTypeDialog\.reviewDependenciesMessage|deleteContentTypeDialog\.typeConfirmPassword|uninstallPluginDialog\.reviewDependenciesMessage|words\.dependencies|dependentItems|renameAsset\.dependentItems|dependenciesDialog\.allDeps" --type ts --type tsx -g "*.tsx" -g "*.ts" .

echo ""
echo "=== 2. Check for remaining usages of translations.dependencies ==="
rg -n "translations\.dependencies" --type ts -g "*.ts" -g "*.tsx" .

echo ""
echo "=== 3. Check for any remaining 'Dependent Items' or 'dependent items' text ==="
rg -n "Dependent [Ii]tems|dependent items|dependant items|dependant" --type ts -g "*.ts" -g "*.tsx" -g "*.json" .

echo ""
echo "=== 4. Check for any remaining 'dependencies' in defaultMessage strings ==="
rg -n 'defaultMessage.*[Dd]ependenc' --type ts -g "*.ts" -g "*.tsx" .

echo ""
echo "=== 5. Check for any remaining menu option label for 'dependencies' action ==="
rg -n '"dependencies"' --type ts -g "*.ts" -g "*.tsx" -C2 .

echo ""
echo "=== 6. Check DependenciesDialog component name still uses old naming ==="
rg -n "DependenciesDialog" --type ts -g "*.ts" -g "*.tsx" -l .

echo ""
echo "=== 7. Check for any remaining word 'Dependencies' in UI label context ==="
rg -n '"Dependencies"' --type ts -g "*.ts" -g "*.tsx" .

echo ""
echo "=== 8. Check DeleteDialog translations file for any leftover entries ==="
fd "translations.ts" --full-path -e ts | xargs grep -l "deleteDialog\|DeleteDialog" | head -5

echo ""
echo "=== 9. Check for the fetchingDependentItems ID usage ==="
rg -n "fetchingDependentItems" --type ts -g "*.ts" -g "*.tsx" .

echo ""
echo "=== 10. Check DependencySelection component for remaining old IDs ==="
rg -n "dependencySelection\." --type ts -g "*.ts" -g "*.tsx" .

Length of output: 8323



@jvega190 The UI-text changes look clean and consistent overall. Here's a summary of what the review found:


✅ What looks good

  • No broken i18n references — All the message ids that were removed (e.g. dependenciesDialog.title, deleteContentTypeDialog.reviewDependenciesMessage, uninstallPluginDialog.reviewDependenciesMessage, etc.) are no longer referenced anywhere else in the codebase.
  • translations.references fully wired uptranslations.dependencies has zero remaining usages; itemActions.ts correctly uses translations.references now.
  • No stray "Dependencies" string literals remaining in UI label contexts.
  • {dependency} in i18n-legacy.ts — This is a message template variable/placeholder (This property references "{dependency}"), not user-facing terminology, so it's fine as-is.

⚠️ Minor observations (non-blocking, but worth noting for a follow-up)

  1. Internal variable/prop names still use old terminologydependantItems, fetchingDependantItems, fetchRenameAssetDependantsComplete, dependantItems props, etc. These are internal JS identifiers (not user-visible), so they're outside this PR's scope, but could be tracked as a follow-up.

  2. Component/file names retain old namingDependenciesDialog, CopyDependencies, DeleteDependencies still have "Dependencies" in their names. Renaming these would be a breaking change to public exports (they appear in index.ts / studioUI.ts), so a separate PR makes sense.

  3. fetchingDependentItems i18n key name — The key identifier itself wasn't renamed (only its defaultMessage was updated). Minor inconsistency but has no user impact.

  4. Code comments in DeleteDialogContainer.tsx (lines 159, 181) still reference dependant items / dependency in developer comments.


Summary

The PR is ready for human review — all user-visible text changes are complete and consistent. The remaining uses of "dependency/dependant" are exclusively internal code identifiers, component names, and developer comments, which are reasonable to address as a follow-up.

@jvega190

Copy link
Copy Markdown
Member Author

@CodeRabbit internally, we'll keep the old naming, so variables, components and comments may stay the same. Only user-facing text is going to be updated. Considering that, can you check if everything looks good? Please give it a final review before I hand over for human review

@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
echo "=== 1. Remaining 'dependenc/dependant/dependent' in defaultMessage strings ==="
rg -n 'defaultMessage.*[Dd]ependenc|defaultMessage.*[Dd]ependant|defaultMessage.*[Dd]ependent' --type ts -g "*.ts" -g "*.tsx" .

echo ""
echo "=== 2. Remaining old terminology in aria-label strings ==="
rg -n 'aria-label.*[Dd]ependenc|aria-label.*[Dd]ependant|aria-label.*[Dd]ependent' --type ts -g "*.ts" -g "*.tsx" .

echo ""
echo "=== 3. Remaining old terminology in title/tooltip strings (JSX props) ==="
rg -n 'title=.*[Dd]ependenc|tooltip.*[Dd]ependenc' --type ts -g "*.ts" -g "*.tsx" .

echo ""
echo "=== 4. Check translations.ts files for any remaining 'dependency/dependencies' in defaultMessage ==="
fd "translations.ts" --full-path -e ts | xargs grep -n "ependenc\|ependant\|ependent" 2>/dev/null

echo ""
echo "=== 5. Check JSON locale/i18n files for any remaining old terminology ==="
fd -e json | xargs grep -l "ependenc\|ependant\|ependent" 2>/dev/null | head -20

echo ""
echo "=== 6. Check all FormattedMessage defaultMessage for remaining old text ==="
rg -n 'defaultMessage=.*[Dd]ependenc' --type ts -g "*.ts" -g "*.tsx" .

echo ""
echo "=== 7. Check for any label/button/menu text with old terminology ==="
rg -n '"[Dd]ependenc[a-z]* [A-Za-z]|[A-Za-z]* [Dd]ependenc' --type ts -g "*.ts" -g "*.tsx" .

echo ""
echo "=== 8. Check for 'Dependency Resolver' remaining in user-facing text ==="
rg -n "Dependency Resolver" --type ts -g "*.ts" -g "*.tsx" .

echo ""
echo "=== 9. Check i18n-legacy.ts for any remaining user-facing 'dependencies' ==="
fd "i18n-legacy.ts" --full-path | xargs grep -n "ependenc" 2>/dev/null

Length of output: 16125



@jvega190 With that clarification in mind — everything looks good for user-facing text. Here's the focused final assessment:


✅ All clear on user-facing text

Check Result
defaultMessage strings containing old "dependency/dependant/dependent" ✅ None remaining
aria-label strings DeleteDependencies.tsx reads "Add Reference" — the grep hit was a false positive from the filename
title/tooltip JSX props ✅ None with old terminology
translations.ts defaultMessage values ✅ Key names like fetchingDependentItems and confTabDependencyResolverConf are internal identifiers only — their defaultMessage values have already been updated
i18n-legacy.ts{dependency} in template ✅ This is a React-Intl interpolation placeholder inside "This property references '{dependency}'" — the user-visible word is "references"
translations.dependencies usages ✅ Zero remaining; translations.references fully wired

📝 One minor follow-up to track (out of scope for this PR)

The locale JSON files (locale-en.json, es.json, de.json, ko.json) still contain old strings matching "dependency/dependent". However, since this PR removes the id prop from most FormattedMessage usages (relying on inline defaultMessage instead), those locale entries are now orphaned and won't be displayed to users. The remaining keyed entries could be cleaned up in a translation-file follow-up PR.


The PR is ready for human review. All user-visible text changes are complete and consistent. 🐇


✏️ Learnings added
Learnt from: jvega190
URL: https://github.com/craftercms/studio-ui/pull/4900

Timestamp: 2026-06-23T20:19:39.928Z
Learning: In the Crafter CMS Studio UI (studio-ui) repository, the team is standardizing terminology by replacing "dependency/dependencies/dependant/dependent" with "reference/references" only in user-facing text (defaultMessage, aria-label, tooltip/title strings). Internal variable names, component names (e.g. DependenciesDialog, CopyDependencies, DeleteDependencies), and code comments intentionally retain the old "dependency" naming and should NOT be flagged during code review.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

@jvega190 jvega190 marked this pull request as ready for review June 23, 2026 20:20
@jvega190 jvega190 requested a review from rart as a code owner June 23, 2026 20:20
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.

1 participant