Document the atomic component move (POST {component}/move)
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 78/100
- Tipo di issue
- Documentazione
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- documentation
Direzione di ricerca
Leggi la documentazione esistente sulla posizione dei componenti e sui dati delle pagine in content/4.api/, quindi documenta POST {component IRI}/move insieme a questi endpoint. Descrivi le varianti della richiesta, il comportamento atomico dello spostamento, la risposta, gli errori di convalida e autorizzazione e la gestione delle bozze descritta nell’issue. Il lavoro è completato quando l’endpoint e gli esempi spiegano come spostare o riordinare i componenti e come rileggere lo stato risultante.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
The API bundle now has an atomic component move (components-web-app/api-components-bundle#526, PR components-web-app/api-components-bundle#533), which the Nuxt module will use (cwa-nuxt-module #415). Please document it in content/4.api/ (component positions / page data):
Endpoint: POST {component IRI}/move (e.g. /component/html_contents/{id}/move, under the route import prefix), application/ld+json, available on every component resource like {component IRI}/usage.
Body:
{ "from": { "componentPosition": "<iri>" } | { "pageData": "<iri>", "property": "<name>" },
"to": { "componentGroup": "<iri>", "after": "<position iri>"?, "before": "<position iri>"? } | { "pageData": "<iri>", "property": "<name>" } }
What happens (one request, one database flush, so a component is never left in two places or deleted by a dropped connection):
- position → group: the same position is moved (its IRI is kept) and placed by
after/before, or at the end, exactly asPATCH <position> {componentGroup, after|before}; within the same group it is a reorder. - position → page data property: the property is set and the position removed; the component is not deleted even if that was its only use.
- page data property → group: a new static position is created and placed; the property is nulled.
- property → property: one is set and the other nulled, across two page data resources too. Dynamic (
pageDataProperty) positions are never changed.
Response: 200 with componentPosition (the moved or created position's IRI, null for a property target) and from/to echoed. Re-read the groups' /order and the page data for the new state.
Errors: 422 with violations at from, to, from.componentPosition, from.pageData, from.property, to.componentGroup, to.after, to.before, to.pageData, to.property: the same checks as the separate writes (allowedComponents, maxComponents, explicitAllowOnly, a component placed inside itself, anchors in the target group, the property's component class), plus the target being the source property, a dynamic or empty source position, an empty source property, a from that does not hold the component (a draft and its published component count as one), and a target property that already holds a component (refused rather than replaced). 403 when the caller is not granted one of the underlying writes (the position write and each page data PATCH, e.g. routable_security on unreachable page data); 401 for anonymous callers.
Drafts: moving by a draft's IRI moves the published component, and the published component is what is stored.
- Lingua principale
- TypeScript
- Stelle
- 0
- Fork
- 0
- Merge medio
- 1h 20m
- PR unite (30g)
- 1
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di components-web-app/docs
-
Browser Tests page: the template's tests no longer use the sample content (components-web-app#177)Aperta
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
components-web-app/docs#267 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
components-web-app/docs#266 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
components-web-app/docs#265 · 1 commento ·
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
components-web-app/docs#263 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
components-web-app/docs#262 ·
Tutte le issue di components-web-app/docs
Issue simili
-
[Android] Nested transforms are composed in reverse orderForse già presa @Danyalo l’ha presa oggi. ApertaRepro provided
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
software-mansion/react-native-svg#3090 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
radix-ui/primitives#4228 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 95/100
rocketride-org/rocketride-server#2705 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
archon-ready archon-size-s archon-type-bug area: web
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
coleam00/Archon#4707 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
HarperFast/grafana-datasource#177 ·