aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/templates/page/page-layout.stories.tsx
Commit message (Collapse)AuthorAgeFilesLines
* refactor(components): replace PageLayout template with PageArmand Philippot2023-11-201-521/+0
| | | | | | | | | * split pages in smaller components (it is both easier to maintain and more readable, we avoid the use of fragments in pages directory) * extract breadcrumbs from article tag (the navigation is not related to the page contents) * remove useReadingTime hook * remove layout options except `isHome`
* refactor(components): extract MetaItem from MetaListArmand Philippot2023-11-201-33/+41
| | | | | | * replace `items` prop on MetaList with `children` prop: it was too restrictive and the global options was not really useful. It is better too give control to the consumers.
* refactor(components): replace LinksListWidget with LinksWidgetArmand Philippot2023-11-141-9/+6
| | | | | | | * avoid List component repeat * rewrite tests and CSS * add an id to LinksWidgetItemData (previously LinksListItems) type because the label could be duplicated
* refactor(components): replace Sharing with SharingWidget componentArmand Philippot2023-11-141-3/+5
| | | | | | | * all the widgets should have a coherent name * fix mailto uri * remove useless CSS * add tests
* refactor(components): rewrite PostsList componentArmand Philippot2023-11-131-2/+28
| | | | | | | | | | | | | | | * remove NoResults component and move logic to Search page * add a usePostsList hook * remove Pagination from PostsList (it is only used if javascript is disabled and not on every posts list) * replace `byYear` prop with `sortByYear` * replace `loadMore` prop with `onLoadMore` * remove `showLoadMoreBtn` (we can use `loadMore` prop instead to determine if we need to display the button) * replace `titleLevel` prop with `headingLvl` * add `firstNewResult` prop to handle focus on the new results when loading more article (we should not focus a useless span but the item directly)
* refactor(components): rewrite CommentsList componentArmand Philippot2023-11-111-2/+102
| | | | | | * use ApprovedCommentProps to make CommentData type * add the author name of the parent on reply form heading * add tests
* refactor(components): rewrite SearchForm componentArmand Philippot2023-11-111-8/+1
| | | | | | * remove searchPage prop (the consumer should handle the submit) * change onSubmit type * use `useForm` hook to handle the form
* refactor(components): replace Meta component with MetaListArmand Philippot2023-11-111-15/+30
| | | | | | It removes items complexity by allowing consumers to use any label/value association. Translations should also be defined by the consumer. Each item can now be configured separately (borders, layout...).
* refactor(components): merge HeadingButton and Widget componentsArmand Philippot2023-11-111-7/+6
| | | | | | The HeadingButton component was only used inside Widget component and it is not very useful on its own so I merge the two components in a new Collapsible component.
* refactor(components): rewrite Button and ButtonLink componentsArmand Philippot2023-10-241-11/+9
| | | | | | | | | | | | | | Both: * move styles to Sass placeholders Button: * add `isPressed` prop to Button * add `isLoading` prop to Button (to differentiate state from disabled) ButtonLink: * replace `external` prop with `isExternal` prop * replace `href` prop with `to` prop
* refactor: use named export for everything except pagesArmand Philippot2023-09-201-7/+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-8/+8
| | | | | | 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.
* chore: add a search form when posts list prints no resultsArmand Philippot2022-05-241-1/+6
|
* refactor: reduce the number of data transformationArmand Philippot2022-05-231-118/+3
|
* fix: render all images unoptimized in StorybookArmand Philippot2022-05-221-16/+6
| | | | | | There is a bug with next/image and Storybook. I was manually adding `unoptimized` to images. Instead we can use a workaround by adding an extra config in Storybook `preview.js` file.
* chore: complete Storybook storiesArmand Philippot2022-05-211-0/+24
|
* chore: use persistent layoutArmand Philippot2022-05-171-16/+8
| | | | | It prevents to rerender the common components between pages (header, footer...).
* chore: adjust and complete missing stylesArmand Philippot2022-05-161-1/+1
| | | | | | * add logo to topics pages and links * add Prism styles to articles * and a few other adjustements
* refactor: use custom hook for breadcrumb items and schemaArmand Philippot2022-05-161-0/+12
|
* chore: add Article pagesArmand Philippot2022-05-151-3/+3
|
* chore: add the Blog index pageArmand Philippot2022-05-131-37/+25
|
* refactor: rewrite DescriptionList and Meta componentsArmand Philippot2022-05-091-68/+39
| | | | | | The meta can have different layout. The previous implementation was not enough to easily change the layout. Also, I prefer to restrict the meta types and it prevents me to repeat myself for the labels.
* chore: add a PageLayout componentArmand Philippot2022-04-251-0/+520