Use migration name or group name as page title

Created on 11 January 2024, 6 months ago
Updated 21 January 2024, 5 months ago

Problem/Motivation

Currently, page titles in the UI of migrate_tools are replicating the task link title, e.g. "Delete migration", "Destination" etc.
It is hard to find the actual migration name on the page.

Back in Drupal 7, we used to have the page title showing the entity title, and then the tab/task link show the sub-page.

I propose to restore this behavior.

Steps to reproduce

Visit e.g. `/admin/structure/migrate/manage/GROUP_NAME/migrations/MIGRATION_NAME/process`.

Current behavior:

Home / Administration / Structure / Migrations / Edit migration group / Migrations / Migration overview
Process
[[View]] [Execute] [Edit] [Messages] [Delete]
[Overview] [Source] [[Process]] [Map] [Destination]

Proposed behavior:

Home / Administration / Structure / Migration groups / GROUP_LABEL / Migrations / MIGRATION_LABEL
MIGRATION_LABEL
[[View]] [Execute] [Edit] [Messages] [Delete]
[Overview] [Source] [[Process]] [Map] [Destination]

Proposed resolution

Use migration label and migration group label for the route title.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ“Œ Task
Status

Active

Version

6.0

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany donquixote

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @donquixote
  • Pipeline finished with Failed
    6 months ago
    Total: 622s
    #75948
  • πŸ‡©πŸ‡ͺGermany donquixote

    This is failing because of PHP 7.4.
    Time to ditch this php version?

  • Pipeline finished with Failed
    6 months ago
    Total: 311s
    #75950
  • First commit to issue fork.
  • πŸ‡©πŸ‡ͺGermany donquixote

    My latest PR still has some problems.
    The group argument in some cases is just a string, so the title callback expecting an object as parameter won't work.
    We should do different title callbacks for different routes.

    Also, we get distinct items in the breadcrumb for:
    - /admin/structure/migrate/manage/GROUP
    - /admin/structure/migrate/manage/GROUP/migrations

    We should put a different title into the breadcrumb than the page title.

  • πŸ‡©πŸ‡ͺGermany donquixote

    There should be a distinct route setting for "breadcrumb title callback" or perhaps "navigation title callback".

  • πŸ‡©πŸ‡ͺGermany donquixote

    We can set the title directly in a controller like:

    return [
      '#title' => $migration->label(),
      'content' => $build,
    ];
    

    But this does not work that easily for entity form pages where we don't own the controller.

  • Pipeline finished with Failed
    5 months ago
    Total: 253s
    #90499
  • Pipeline finished with Failed
    5 months ago
    Total: 211s
    #90605
Production build 0.69.0 2024