aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/organisms/layout/comments-list.tsx
Commit message (Collapse)AuthorAgeFilesLines
* refactor(components): rewrite CommentsList componentArmand Philippot2023-11-111-119/+0
| | | | | | * use ApprovedCommentProps to make CommentData type * add the author name of the parent on reply form heading * add tests
* refactor(components): split Comment component into 3 componentsArmand Philippot2023-11-111-14/+74
| | | | | | | | | * add ApprovedComment, PendingComment and ReplyCommentForm components * let consumer handle reply form visibility * move structured data into article page (each article already has the comments data and already handle json ltd schema so I prefered to move the schema in the final consumer instead of adding a script element foreach comment)
* refactor(components): rewrite CommentForm componentArmand Philippot2023-11-111-12/+3
| | | | | | * remove `Notice` prop to handle it directly in the form * replace `saveComment` prop with `onSubmit` * use `useForm` hook to handle the form
* refactor(components): rewrite DescriptionList componentArmand Philippot2023-11-111-5/+6
| | | | | | | | | | | | | * add a `spacing` prop * replace `layout` prop with `isInline` prop * remove `items` prop (and classNames props) in favor of new components: Description, Group, Term * remove `withSeparator` prop (CSS content is announced by screen readers and Firefox/Safari have no support for alternative text so the consumer should add itself an element with `aria-hidden` if it need a separator) Be aware, Meta component and its consumers can be visually broken, they should be refactored before using them in production.
* refactor(components): rewrite List componentArmand Philippot2023-11-111-10/+21
| | | | | | | | | * change `items` prop to children * replace `kind` prop with `isHierarchical`, `isOrdered` & `isInline` props * add `hideMarker` prop * add `spacing` prop to control item spacing * move lists styles to Sass placeholders to avoid repeats because of headless WordPress
* refactor: use named export for everything except pagesArmand Philippot2023-09-201-5/+3
| | | | | | Next expect a default export for pages so only those components should use default exports. Everything else should use named exports to reduce the number of import statements.
* refactor(build): replace paths aliases with relative pathsArmand Philippot2023-09-191-4/+2
| | | | | | Using paths aliases starting with "@" can be confusing and can lead to conflict with existings modules. I prefer to use relative paths to avoid extra configuration in tools because of these aliases.
* fix(comments): load all comments on a postArmand Philippot2022-08-211-6/+6
| | | | | | | | | Previously, only the first 10 comments was loaded. So I update the fetching method to retrieve all the comments on a post. Also, I choose to order comments on client side because of a bug with WPGraphQL. Finally, I renamed the Comment type to SingleComment to avoid conflict with existing types.
* refactor: reduce the number of data transformationArmand Philippot2022-05-231-7/+4
|
* chore: add Article pagesArmand Philippot2022-05-151-6/+4
|
* chore: add a CommentsList componentArmand Philippot2022-04-221-0/+65