"Browse" tab should always return to the browser UI, not the detail page

Created on 10 June 2023, about 1 year ago
Updated 7 May 2024, 4 months ago

Problem/Motivation

There are still some unintuitive navigational pathways within the Project Browser UI. It's counterintuitive that the tab provided by the project_browser.browse local task will just refresh the page when we are looking at a project detail page. Correct the tab, and the "Back to Browsing" link becomes identical. The breadcrumb provided by Drupal is also redundant, but is standard behavior and is not prominent.

Steps to reproduce

Visit any project detail page at /admin/modules/browse/{module_name}. Click on "Browse" in the primary tabs. The page will reload the detail page for the module you are already on, not the browsing interface.

Proposed resolution

This happens because the browser and the detail page are both wired up to the project_browser.browse route. Simply creating a second route for the detail page, while retaining the same controller, allows Drupal to recognize that the "Browse" tab is a distinct route.

Remaining tasks

  • ✅ File an issue about this project
  • ☐ Manual Testing
  • ☐ Code Review
  • ☐ Accessibility Review
  • ☐ Automated tests needed/written?
Feature request
Status

Active

Version

1.0

Component

User experience

Created by

🇺🇸United States gslexie

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

Comments & Activities

  • Issue created by @gslexie
  • 🇺🇸United States gslexie

    This patch creates a distinct project_browser.detail route for the project detail pages. It has the unanticipated side effect of hiding the "Extend" local task group entirely while looking at the detail pages. This was initially off-putting, but I came to believe I was looking for the tabs only because I had been working on them specifically. With the tabs gone, the "Back to Browsing" link is much more prominent and useful and is no longer competing with the tabs for an end user's attention.

    The approach is also consistent with other navigations in Drupal Core. For example, the Block Layout page is inside of a local tasks tabset, but the detail pages for configuring individual blocks are not.

    It is tempting to move the module title into the Drupal page title after this change, but that would be functionally complicated because the existing plumbing is built to expose project data to Svelte through an API and not for direct use by PHP code. Moving the title may also lead to a cascade of other design changes.

  • Open in Jenkins → Open on Drupal.org →
    Core: 10.1.x + Environment: PHP 8.1 & MySQL 5.7
    last update about 1 year ago
    65 pass
  • 🇺🇸United States chrisfromredfin Portland, Maine
  • 🇺🇸United States chrisfromredfin Portland, Maine

    I think this might be better served by making the detail page a modal and having this problem go away entirely. See https://www.drupal.org/project/project_browser/issues/3310908 Consider making 'detail page' a modal window instead of a separate "page" in app Active

Production build 0.71.5 2024