Routes that don't follow the @@ view convention

Open
#429 4 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Refactor
Clarity
Needs clarification
Activity status
Active
Tech stack
javascript
Domain
backend

Research direction

Read docs/how-to-guides/routes.md, packages/cmsui/config/routes.ts, and packages/publicui/index.ts to compare the route convention with the listed routes. The discussion asks maintainers to choose between renaming routes and preserving compatibility paths, and has no settled decision yet. Once that choice is made, update the affected route registrations and guide; done means the agreed routes follow the documented convention while handling the explicitly identified compatibility exceptions.

Written by the indexing model from the issue text.

Description

discussion

Our route convention (docs/how-to-guides/routes.md) says views, the routes that render a page, use a @@ prefix, and resource routes use a single @. I checked every route registered on main (apps/aurora/app/routes.ts, @plone/cmsui, @plone/publicui, @plone/contents). These views don't follow it:

Route Package Where
login/* cmsui config/routes.ts
logout/* cmsui same
passwordreset, passwordreset/:token cmsui same
controlpanel (overview), controlpanel/addons, controlpanel/:id cmsui same
test-layout/* cmsui same
sitemap publicui index.ts
search publicui same

Everything else follows the convention: the @@add, @@edit, @@contents… views, the single-@ resources (@search, @breadcrumbs, @objectBrowserWidget, @layers.css, @reset-fetcher, @@contents/@<action>…), and ok, the health check, which is already the one named exception.

Also: the routes how-to guide uses /login as its example of registering a route, a few lines after stating the convention.

Things to weigh
  • login, logout, passwordreset, controlpanel, and sitemap are URLs people know from Volto and Classic Plone. Renaming them breaks bookmarks, external links, and muscle memory.
  • search → @@search would sit next to the @search resource. That works, since the prefixes differ, but it's easy to mix up.
  • test-layout is a leftover scratch page from the Forms work (it renders <div>HELLO</div> inside the CMS UI layout). Nothing links to it or tests it, and it's not needed anymore.
Proposal (from @sneridagh)
  • Remove test-layout, since it's not needed now.
  • passwordreset should probably get @@.
  • For the rest there are serious doubts. One option: add @@ counterparts (@@login, @@logout, @@controlpanel, @@sitemap, @@search) and keep the current paths for backwards compatibility, documented as exceptions to the convention.

@pnicolli @davisagli what do you think about these exceptions? Are they worth keeping, should we rename them, or go with @@ counterparts and keep the old paths as BBB?

Assisted-by: Claude Opus 5.5

Dominant language
JavaScript
Stars
10
Forks
9
Avg merge
4d 7h
Merged PRs (30d)
54

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from plone/aurora

All issues in plone/aurora

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.