Files
Schero D. 919000fb3c feat(content-manager): add relationOpenMode setting (modal/page/newTab) (#25433)
* feat(content-manager): add relationOpenMode setting (modal/page/newTab)

Allow configuring how relation entries open when clicked in the edit view.
Three modes are available per content-type: modal (default), navigate to
page (same tab), or open in new tab. The setting is accessible via
"Configure the view" in the Content Manager.

* fix(content-manager): align relationOpenMode with Strapi conventions

- Fix admin base path to match getBasename() pattern (ADMIN_PATH fallback)
- Remove duplicated admin path logic in Relations.tsx, reuse getAdminBasePath
- Move translation keys under editSettings.* namespace for consistency
- Alphabetize translation keys per Strapi convention

* test(content-manager): update tests for relationOpenMode default setting

Add relationOpenMode: 'modal' to expected default settings in unit and
frontend tests to match the new setting added in the feature.

* fix(content-manager): address review feedback for relationOpenMode

- Import RelationOpenMode from shared contracts instead of local definition
- Remove duplicated getAdminBasePath(), use React Router Link with
  target="_blank" instead of window.open()
- Replace imperative navigation with styled RouterLink for page/newTab modes
- Always use modal for "Create new entry" to preserve fieldToConnect context
- Split Grid.Root so gap only applies to settings inputs above divider
- Default relationOpenMode to 'modal' in form initialValues for unconfigured
  content types

* fix(content-manager): make relationOpenMode optional in Settings type

Make relationOpenMode optional on the Settings interface since existing
code (e.g. i18n plugin tests) creates Settings objects without it.
The value is already defaulted to 'modal' wherever it's consumed.
2026-03-02 13:36:48 +00:00
..