Document the atomic component move (POST {component}/move)
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 78/100
- Tipo de issue
- Documentación
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- typescript
- Área
- documentation
Línea de trabajo
Lee la documentación existente sobre la posición de los componentes y los datos de las páginas en content/4.api/ y luego documenta POST {component IRI}/move junto a esos endpoints. Describe las variantes de la solicitud, el comportamiento atómico del movimiento, la respuesta, los errores de validación y autorización, y el tratamiento de borradores descrito en el issue. El trabajo estará completo cuando el endpoint y los ejemplos expliquen cómo mover o reordenar componentes y cómo volver a leer el estado resultante.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- TypeScript
- Estrellas
- 0
- Forks
- 0
- Merge medio
- 1 h 20 min
- PR fusionados (30 d)
- 1
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de components-web-app/docs
-
Browser Tests page: the template's tests no longer use the sample content (components-web-app#177)Abierto
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
components-web-app/docs#267 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
components-web-app/docs#266 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
components-web-app/docs#265 · 1 comentario ·
-
documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
components-web-app/docs#263 · 1 comentario ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
components-web-app/docs#262 ·
Todos los issues de components-web-app/docs
Issues similares
-
Sequências em espanhol: «Atualizado em», a aba «Fila» e o valor 'pause' ainda saem em portuguêsAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
melgarafael/DeskcommCRM#3104 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
🐛 [Bug] Mobile: on the login and registration pages the footer sits below the visible screenAbiertobug service: webapp
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Ocelot-Social-Community/Ocelot-Social#10684 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
nicobailon/pi-subagents#2978 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
getsentry/sentry-conventions#732 · 1 comentario ·
Los mantenedores suelen responder en 1 día