Problem/Motivation

The /components route may collide with a project one.

Proposed resolution

Use an admin route with the module name /admin/sdc_component_library.

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

nicoschi created an issue. See original summary.

d.fisher’s picture

I agree however I think it might be better if we make the route configurable with a fallback of /admin/sdc_component_library

I may find time to look at this next week unless you fancy doing so?

d.fisher’s picture

Status: Active » Needs work
d.fisher’s picture

Assigning the component library an /admin route will then require that a user also has permission to view admin routes so I suggest that we use something more obscure as the default (to reduce risk of route already existing on a website). I am going to suggest /sdc-component-library. This should then be overridable in the admin UI so you as a user can set it to whatever works for you, your client, and your project. I also think it would be helpful to everyone - new and familiar users - if we added a link to the component library under the "Appearance" tab of the admin menu. This is on my radar and I will address as soon as I have time to do so.

daniel.j changed the visibility of the branch 3562088-the-components-preview to hidden.

daniel.j changed the visibility of the branch 3562088-the-components-preview to active.

daniel.j changed the visibility of the branch 3562088-the-components-preview to hidden.

daniel.j changed the visibility of the branch 3562088-the-components-preview to hidden.

daniel.j changed the visibility of the branch 3562088-the-components-preview to active.

daniel.j’s picture

Status: Needs work » Needs review

Added a configurable route system for the component library by introducing module config (config/install/sdc_component_library.settings.yml) with schema, a settings form at /admin/config/system/sdc-component-library plus a menu link, updated routing to include the settings route, and added a RouteSubscriber that reads the configured path and sets the component list route accordingly. Updated the README to reference the new default path and documented the configuration screen.

d.fisher’s picture

Ooh nice. I will patch this on a project I'm working on now and check it out!!

d.fisher’s picture

Status: Needs review » Reviewed & tested by the community

Yes looks good. Just added a link to the admin menu as well.

d.fisher’s picture

Status: Reviewed & tested by the community » Fixed

Released in 1.0.4.

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.

d.fisher’s picture

Thank you everyone for your work on this.

Status: Fixed » Closed (fixed)

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