From 881b09c33b52671c2d5a224c108017b916c96c66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20S=C3=A9nave?= <59770457+nsenave@users.noreply.github.com> Date: Fri, 9 Aug 2024 10:13:48 +0200 Subject: [PATCH] refactor: mark table positioning property as 'for removal' (#260) Removed in docs and marked as for removal in the code. --- docs/fr/components/Table.md | 2 -- .../java/fr/insee/lunatic/model/flat/ComponentType.java | 1 - .../java/fr/insee/lunatic/model/flat/RosterForLoop.java | 7 +++++++ src/main/java/fr/insee/lunatic/model/flat/Table.java | 7 +++++++ 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/docs/fr/components/Table.md b/docs/fr/components/Table.md index f37995af..b5b98b08 100644 --- a/docs/fr/components/Table.md +++ b/docs/fr/components/Table.md @@ -1,7 +1,6 @@ ## Le composant `Table` Il s'agit du composants le plus complexe de Lunatic. -Comme tous les composants, il a les attributs communs des composants. Il dispose en plus d'un attribut `positioning` pouvant être égale à "HORIZONTAL" ou "VERTICAL". Il y a deux types de composants `Table` Lunatic : @@ -36,7 +35,6 @@ Dans le dernier cas : "id" : "j4nwc63q", "componentType" : "Table", "mandatory" : false, - "positioning" : "HORIZONTAL", "label" : "\"label de la question\"", "declarations": [...], "conditionFilter" : "if ((not(cast(READY,integer) <> 1) )) then \"normal\" else \"hidden\"", diff --git a/src/main/java/fr/insee/lunatic/model/flat/ComponentType.java b/src/main/java/fr/insee/lunatic/model/flat/ComponentType.java index f7c1217c..de93719c 100644 --- a/src/main/java/fr/insee/lunatic/model/flat/ComponentType.java +++ b/src/main/java/fr/insee/lunatic/model/flat/ComponentType.java @@ -23,7 +23,6 @@ "goToPage", "label", "orientation", - "positioning", "maxLength", "min", "max", diff --git a/src/main/java/fr/insee/lunatic/model/flat/RosterForLoop.java b/src/main/java/fr/insee/lunatic/model/flat/RosterForLoop.java index 741d176d..22ada507 100644 --- a/src/main/java/fr/insee/lunatic/model/flat/RosterForLoop.java +++ b/src/main/java/fr/insee/lunatic/model/flat/RosterForLoop.java @@ -16,6 +16,13 @@ public class RosterForLoop protected LinesRoster lines; protected List header; protected List components; + + /** + * Metadata on how the table should be displayed. + * Value should be one of "HORIZONTAL", "VERTICAL" or "DEFAULT". + * @deprecated Unused in Lunatic, to be removed. + */ + @Deprecated(forRemoval = true, since = "3.14.0") protected String positioning; public RosterForLoop() { diff --git a/src/main/java/fr/insee/lunatic/model/flat/Table.java b/src/main/java/fr/insee/lunatic/model/flat/Table.java index 74be649e..5df2126c 100644 --- a/src/main/java/fr/insee/lunatic/model/flat/Table.java +++ b/src/main/java/fr/insee/lunatic/model/flat/Table.java @@ -20,6 +20,13 @@ public class Table protected List header; @JsonProperty("body") protected List bodyLines; + + /** + * Metadata on how the table should be displayed. + * Value should be one of "HORIZONTAL", "VERTICAL" or "DEFAULT". + * @deprecated Unused in Lunatic, to be removed. + */ + @Deprecated(forRemoval = true, since = "3.14.0") protected String positioning; public Table() {