-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat: 🎸 je consulte le détail d'un article (v1) #77
Conversation
front/components/form/Button.tsx
Outdated
action: () => void; | ||
icon?: React.ReactElement; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
icon?: React.ReactElement; | |
icon?: React.ReactNode; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Peut-être que tu pourras retirer le ?
avec ReactNode
puisque le type comprend undefined
il me semble
@@ -25,7 +26,7 @@ | |||
"expo": "~40.0.1", | |||
"expo-asset": "~8.2.2", | |||
"expo-constants": "~10.0.1", | |||
"expo-font": "~9.0.0", | |||
"expo-font": "^8.4.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pourquoi un downgrade ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
J'ai downgrade la version car la v9 ne fonctionne pas bien avec les fonts custom, j'ai commencé à créer une font d'icônes ça sera beaucoup plus simple à gérer pour changer la couleur et importer chaque icône à chaque fois. Je sais pas si tu connais icomoon c'est un outil en ligne qui permet de générer des fonts à partir de svg (https://icomoon.io/app/#/select)
front/screens/ArticleDetail.tsx
Outdated
|
||
if (loading) { | ||
return ( | ||
<View> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A isoler dans son propre composant ? On risque d'en avoir besoin à nouveau dans d'autres fichiers
front/screens/ArticleDetail.tsx
Outdated
<ActivityIndicator size="large" /> | ||
</View> | ||
); | ||
} else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Les else
ne sont probablement pas nécessaires. Je pense que loading
, error
et data
sont 3 états différents qui ne peuvent pas valoir quelque chose en même temps. Je pense que le code peut être simplifié comme dans cet exemple : https://www.apollographql.com/docs/react/data/queries/#executing-a-query
front/screens/ArticleDetail.tsx
Outdated
<View style={[styles.mainContainer]}> | ||
<View> | ||
<View style={[styles.flexStart]}> | ||
<Button |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ce bouton retour est peut-être aussi à isoler dans son propre composant puisqu'il sera sûrement utile ailleurs à l'avenir
front/screens/ListArticles.tsx
Outdated
</ListItem.Content> | ||
</ListItem> | ||
))} | ||
<ActivityIndicator size="large" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Même commentaire ici pour le composant de Loading à sortir de ce fichier (peut-être aussi celui d'erreur), et aussi sur les if else
front/screens/ListArticles.tsx
Outdated
); | ||
} else { | ||
if (error) { | ||
console.log(error); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A retirer ?
front/screens/ListArticles.tsx
Outdated
{result.articles.length} article(s) à lire | ||
</Text> | ||
{result.articles.map((article, index) => { | ||
return ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
L'écriture peut être simplifiée en retirant le return et les accolades
front/screens/ListArticles.tsx
Outdated
{article.titre} | ||
</ListItem.Title> | ||
<ListItem.Subtitle style={[styles.articleDescription]}> | ||
<HTML |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A changer peut-être à l'avenir. Je n'aime pas beaucoup l'idée d'avoir une webview pour la description sur chaque élément de la liste. L'idéal serait peut-être d'avoir depuis le back-end une description ou un résumé de l'article sous forme de string et pas de HTML pour simplifier le code ici. @risseraka Qu'en penses-tu ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C'est à configurer.
S'il n'y a pas de besoin d'éditorialiser le résumé, alors on peut s'en tirer avec un champ de type description.
À valider avec le métier ?
# [1.5.0](v1.4.3...v1.5.0) (2021-03-31) ### Bug Fixes * **android:** correction de problèmes d'affichage sur Android ([#80](#80)) ([5a4c17e](5a4c17e)) * **api:** ajoute la variable d'environnement de non-authentification pour le déploiement ([#75](#75)) ([c4e5cea](c4e5cea)) * **backoffice:** corrige l'affichage des champs textes HTML ([#78](#78)) ([2d1a40a](2d1a40a)) * **k8s:** another PVC fix ([#84](#84)) ([d9e240a](d9e240a)) * **k8s:** fix PVC issue with kube 1.19 ([#79](#79)) ([cab3556](cab3556)) ### Features * 🎸 je consulte le détail d'un article (v1) ([#77](#77)) ([1372e19](1372e19)), closes [#28](#28)
🎉 This PR is included in version 1.5.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
✅ Closes: #28