Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(Import de masse): basculer la logique de documentation (schema -> table) dans un composant dédié #4854

Merged
merged 7 commits into from
Jan 9, 2025

Conversation

raphodn
Copy link
Member

@raphodn raphodn commented Jan 7, 2025

Quoi

Suite à #4832, je bascule toute la logique dans un nouveau composant SchemaTable.vue

Utile pour réutiliser dans la/les PR à venir (à commencer par #4853)

Base automatically changed from raphodn/import-de-masse-rendre-le-header-obligatoire-achats-json to staging January 7, 2025 11:58
@raphodn raphodn force-pushed the raphodn/frontend-schema-to-table-component branch from 17ad7c5 to be53085 Compare January 7, 2025 13:28

<script>
const schemaTypes = {
date: "Date (au format AAAA-MM-JJ)",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
date: "Date (au format AAAA-MM-JJ)",
date: "Date au format AAAA-MM-JJ",

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Je trouve que les parenthèses compliquent la lecture

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

j'ai opté pour garder les parenthèses un peu partout (y'en avait déjà, et pour homogénéiser, on pourra décider d'homogénéiser dans l'autre sens si besoin)

number: "Chiffre",
siret: "14 chiffres, avec ou sans espaces",
string: "Texte",
string_enum: "Texte (choix unique)",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
string_enum: "Texte (choix unique)",
string_enum: "Texte choix unique",

siret: "14 chiffres, avec ou sans espaces",
string: "Texte",
string_enum: "Texte (choix unique)",
string_enum_multiple: "Texte (choix multiples)",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
string_enum_multiple: "Texte (choix multiples)",
string_enum_multiple: "Texte choix multiples",

<td>{{ field.name }}</td>
<td>{{ field.title }}</td>
<td>
<p>{{ field.description }}</p>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

La description n'est pas présente sur tous les champs, ce qui fait qu'on affiche quand même un paragraphe vide. Ce paragraphe a aussi un margin-bottom ce qui créé des espacements en "top" inégaux dans toute la colonne

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

j'ai rajouté un v-if 👌

<p v-if="field.constraints && field.constraints.enum_multiple">
Spécifiez plusieurs options en séparant avec un
<code>{{ field.constraints.enum_multiple_seperator }}</code>
.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Je pense que le "." n'est pas nécessaire en bout de phrase, en plus comme il est proche de la une virgule utilisée en séparateur, ça peut porter à confusion.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

j'ai enlevé le point 👌

@raphodn raphodn force-pushed the raphodn/frontend-schema-to-table-component branch from 8d50f13 to ac2bfa5 Compare January 9, 2025 08:42
@raphodn raphodn merged commit 7f65351 into staging Jan 9, 2025
5 of 6 checks passed
@raphodn raphodn deleted the raphodn/frontend-schema-to-table-component branch January 9, 2025 08:49
qloridant pushed a commit that referenced this pull request Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Imports de masse : utiliser les schemas comme documentation pour les utilisateurs
2 participants