plone / plone/plone.restapi

Registering the expandable elements as adaptors defeats the purpose if the service instantiates them directly

Open
#1,682 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
109
Forks
107
Avg merge
2d 3h
Merged PRs (30d)
4

Description

It would be better if the service calls the navigation as an expandable element. This allows overriding the expandable element once without having to also override the navigation service.

https://github.com/plone/plone.restapi/blob/731554b676aa391795a8991dce21d6bce9f866b0/src/plone/restapi/services/navigation/get.py#L193

Contributor guide

Open the contributing guide

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.

Research direction

Start by reading src/plone/restapi/services/navigation/get.py around line 193, where the navigation service instantiates the expandable elements. Trace how the navigation is currently obtained and how expandable elements are registered as adaptors. Done means the service calls the navigation as an expandable element, allowing that element to be overridden without also overriding the navigation service.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend-api-design
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.