Problem/Motivation

The Mapillary admin listings (Sequences, Images, Organizations, Map Features, Detections) live under /admin/content/mapillary, but on a site without admin_toolbar there is no link to them anywhere in the admin UI. They can only be opened by typing the URL.

The only way in today is the menu link mapillary.content (parent system.admin_content) and its children in mapillary_entity.links.menu.yml and the submodules. That works with admin_toolbar, which renders the children of Content as a dropdown. It does not work with the core admin UIs:

  • The Navigation module removes system.admin_content and everything under it from the admin menu tree (NavigationHooks::navigationMenuLinkTreeAlter()) and shows its own Content links instead. The Mapillary links disappear with it.
  • /admin/content shows its sibling listings (Blocks, Comments, Files, Media) as local tasks with base_route: system.admin_content. The module defines no such local task, and every Views page display (views.view.mapillary_*, page_1) has menu: type: none.
  • The overview page /admin/content/mapillary (mapillary_entity.content.overview) is reachable only through the same menu link.

The listing pages also have no action button. The entity types have no add-form link template on purpose: entities are imported from the Mapillary API, not created by hand (see the Permissions section of the README). But the listings offer no import either:

  • Sequences and Images can only be imported through the reference field widgets on a host entity (MapillaryImageImporter::import() and importSequence()).
  • The Detection import form exists (mapillary_detection.import, /admin/content/mapillary/detections/import, which also imports Map Features by ID), but nothing links to it: no local action, no menu link.

So an editor who opens a listing sees an empty table and no way to fill it from there.

Steps to reproduce

  1. Install Drupal 11.4 with the Standard profile (Navigation enabled, admin_toolbar not installed).
  2. Enable mapillary_entity and mapillary_organization.
  3. Open /admin/content: the tabs are Content, Blocks and Files; there is no Mapillary tab. The Navigation sidebar has no Mapillary entry either.
  4. Open /admin/content/mapillary/sequences by URL: the View renders, with no tabs and no action button. The same holds for /admin/content/mapillary/images and /admin/content/mapillary/organizations.
  5. With mapillary_detection enabled, /admin/content/mapillary/detections has no link to the import form.

Proposed resolution

Follow the core pattern for listings under Content (Blocks, Comments, Files, Media): local tasks and local actions, independent of the toolbar in use. Keep the existing menu links for admin_toolbar users.

Local tasks

  • In mapillary_entity.links.task.yml: a primary tab "Mapillary" on /admin/content (base_route: system.admin_content), pointing to view.mapillary_sequences.page_1.
  • Secondary tabs under it (parent_id), one per listing: Sequences and Images in mapillary_entity, Organizations in mapillary_organization, Map Features in mapillary_map_feature, Detections in mapillary_detection, each pointing to its view.mapillary_*.page_1 route. Core comment.links.task.yml uses the same primary/secondary layout under system.admin_content.

Local actions

  • "Import detections" on the Detections and Map Features listings, pointing to the existing mapillary_detection.import route (mapillary_detection.links.action.yml).
  • "Import sequence" and "Import image" forms in mapillary_field, which already holds MapillaryImageImporter: a single Mapillary ID field, calling importSequence() (cascade disabled, images queued as the field widget does) or import(), then redirecting to the imported entity. Linked as local actions on the Sequences and Images listings, and shown only when mapillary_field is enabled.
  • Access as the listings: the admin permission of the entity type.

Out of scope

  • An add form for manual entity creation. The entity types stay import-only.
  • Organizations: there is no importer to link to.
  • The parallel entity list builder routes (entity.mapillary_*.collection, /admin/content/mapillary/sequence etc.).

Remaining tasks

  • Add the local tasks in each module's links.task.yml.
  • Add the Detection import local actions.
  • Add the Sequence and Image import forms, their routes and local actions.
  • Functional tests, with Navigation enabled and admin_toolbar absent: the Mapillary tab on /admin/content, the secondary tabs of each enabled submodule, each local action and its access.
  • Kernel or Functional tests for the import forms: a valid ID imports and redirects, an unknown ID shows the existing error and creates nothing.
  • README and CHANGELOG.

User interface changes

  • New "Mapillary" tab on /admin/content, with secondary tabs for each listing.
  • New import buttons on the Sequences, Images, Map Features and Detections listings.
  • New Sequence and Image import forms.

API changes

  • None. New routes and form classes only.

Data model changes

  • None.

Issue fork mapillary-3629073

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

orkutmuratyilmaz created an issue. See original summary.

  • orkutmuratyilmaz committed 8201fda0 on 1.0.x
    bug: #3629073: Mapillary listings have no tabs or import actions without...
orkutmuratyilmaz’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.