Problem/Motivation

To let people select a path to work on it could help to list all route names and their path. See also https://www.drupal.org/contributor-tasks/create-tour

Proposed resolution

Add an autocomplete field to search for route names and path pattern



The response can get quite long :-(

Remaining tasks

Decide how it should look like and being compatible with related issue #2978327: Allow configuration of route parameters

User interface changes

API changes

Data model changes

Comments

clemens.tolboom created an issue. See original summary.

clemens.tolboom’s picture

Status: Active » Needs review
StatusFileSize
new1.23 KB
clemens.tolboom’s picture

Issue summary: View changes
pvsureshmca’s picture

Status: Needs review » Needs work
StatusFileSize
new106.63 KB

Hi,

db_query is deprecated in the latest version, Please correct the Drupal coding standard error.

issue

clemens.tolboom’s picture

Status: Needs work » Needs review

Thanks for the review :-) (the image does not help). Deprecated is not bad per se.

What do you think of the idea? I personally find the textarea ugly but was not sure how to easily create an autocomplete URL / route matcher.

Ideas are welcome. Patches even more.

clemens.tolboom’s picture

Installing devel then visit devel/routes is now documented through the tour which is helpful but we can mimic the devel code which would be a good feature.

clemens.tolboom’s picture

StatusFileSize
new40.37 KB
new31.38 KB
new2.3 KB

Attached new version.

The UI is not great. Should we add a collapsible fieldset? Should we get a table as response as #2978327: Allow configuration of route parameters adds route parameters too which are needed for the editing of the routes field.

clemens.tolboom’s picture

clemens.tolboom’s picture

Issue summary: View changes
clemens.tolboom’s picture

Issue summary: View changes
clemens.tolboom’s picture

Status: Needs review » Needs work

Typing node/12 does not work

mpp’s picture

Another approach for this issue would be to provide a "Create tour" button:
- only show when the user has the permission to create tours;
- only show when there's no tour (in that case we could add an "Edit tour" button;
- link to the add tour page with the route (e.g. /admin/config/user-interface/tour/add?route=entity.media.add_form)

clemens.tolboom’s picture

@mpp not sure your answer belongs to this issue right?

mpp’s picture

@mpp not sure your answer belongs to this issue right?

@clemens.tolboom, we could open a new issue if you like but the real issue here is that it's hard (e.g. for an editor) to know what route belongs to a given path. The current approach is to simplify this by adding a "find route" widget. Another (or additional) way would to add a 'create tour' button that creates a tour for the current page. This way an editor would no longer need to fill in a route (or path, or install devel as I read in the documentation) in order to create a tour.

  1. +++ b/src/Controller/TourUIController.php
    @@ -67,4 +67,36 @@ class TourUIController extends ControllerBase {
    +      $list=[];
    

    + $list = [];

  2. +++ b/src/Controller/TourUIController.php
    @@ -67,4 +67,36 @@ class TourUIController extends ControllerBase {
    +
    

    remove newline

clemens.tolboom’s picture

Assigned: Unassigned » clemens.tolboom

@mpp IC ... that button sounds nice but is 'similar' as installing Devel and check the route as described on the project page. It should be a separate issue.

Maybe we should change 'Find route' into 'Find route or path'? I'll work on it and commit when done as this issue is open for too long.

clemens.tolboom’s picture

Issue summary: View changes
StatusFileSize
new116.64 KB

Doh ... I should have added an autocomplete result screenshot!

You can search for a node path but only for route related entries ie not for aliases.

  • clemens.tolboom committed b72f617 on 8.x-1.x
    Issue #2955523 by clemens.tolboom: Add route names for easier adding...
clemens.tolboom’s picture

Issue summary: View changes
Status: Needs work » Fixed

Committed patch #7 plus textual change. It's good enough for me.

mpp’s picture

It's definitely an improvement, thanks!

clemens.tolboom’s picture

Status: Fixed » Closed (fixed)

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