aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/organisms/widgets
Commit message (Collapse)AuthorAgeFilesLines
* refactor(stories): migrate stories to CSF3 formatArmand Philippot2023-12-155-253/+131
|
* refactor(components, hooks): rewrite ToC and useHeadingsTreeArmand Philippot2023-11-149-125/+137
| | | | | | | | | | | | * replace TableOfContents component with TocWidget to keep the name of widget components coherent * replace `wrapper` prop with `tree` prop (the component no longer uses the hook, it is up to the consumer to provide the headings tree) * let consumer handle the widget title * add options to useHeadingsTree hook to retrieve only the wanted headings (and do not assume that h1 is unwanted) * expect an ref object instead of an element in useHeadingsTree hook * rename most of the types involved
* refactor(components): replace LinksListWidget with LinksWidgetArmand Philippot2023-11-1411-311/+314
| | | | | | | * 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-148-309/+336
| | | | | | | * all the widgets should have a coherent name * fix mailto uri * remove useless CSS * add tests
* refactor(components): replace SocialMedia with SocialMediaWidgetArmand Philippot2023-11-138-98/+77
| | | | | | * the goal is to make the name of the widgets coherent * remove useless CSS * replace Media type with SocialMediaData
* refactor(components): rewrite ImageWidget componentArmand Philippot2023-11-139-335/+253
| | | | | | | | * remove `imageClassName` prop * replace `image` prop with `img` and expect an image instead of an object * remove `alignment prop` * remove useless CSS
* refactor(components): replace ResponsiveImage with Figure componentArmand Philippot2023-11-112-16/+18
| | | | | | | | The styles applied to ResponsiveImage are related to the figure and figcaption elements. Those elements could be use with other contents than images. So I extracted them in a Figure component. The ResponsiveImage component is no longer useful: the consumer should use the Image component from `next` and wrap it in a link if needed.
* refactor(components): merge HeadingButton and Widget componentsArmand Philippot2023-11-1113-192/+136
| | | | | | 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 SocialLink componentArmand Philippot2023-11-113-14/+16
| | | | | * replace default label with a label prop * rename name prop to icon prop
* refactor(components): rewrite SharingLink componentArmand Philippot2023-11-112-66/+118
| | | | | * replace default label with label prop * simplify CSS rules
* refactor(components): rewrite List componentArmand Philippot2023-11-118-81/+67
| | | | | | | | | * 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
* build: convert project to esmArmand Philippot2023-10-245-0/+5
|
* refactor: use named export for everything except pagesArmand Philippot2023-09-2016-54/+44
| | | | | | 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-1914-29/+26
| | | | | | 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.
* build(storybook): fix loading errors due to updated depsArmand Philippot2022-09-211-1/+1
|
* test(unit): fix Jest errors due to images importArmand Philippot2022-06-031-0/+2
| | | | | I mocked some SVG files and moves the branding photo to public directory. It is more a workaround than a real fix but it works so...
* test: install and configure cypressArmand Philippot2022-06-025-5/+5
| | | | I also configure Jest to avoid conflicts between Cypress and Jest.
* fix(storybook): create a fake wrapper for Table of Contents storyArmand Philippot2022-05-221-1/+22
|
* fix: render all images unoptimized in StorybookArmand Philippot2022-05-221-1/+0
| | | | | | 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-214-32/+26
|
* chore: update some stylesArmand Philippot2022-05-211-1/+0
| | | | | | | * Improve wp-blocks-columns, wp-block-quote and some images * Make Sharing widget consistent between pages * Remove margin option from lists * Fix Topic logo alignement
* chore: make some widgets scrollable (like ToC)Armand Philippot2022-05-171-0/+1
|
* chore: adjust and complete missing stylesArmand Philippot2022-05-162-9/+19
| | | | | | * add logo to topics pages and links * add Prism styles to articles * and a few other adjustements
* chore: add Project single pagesArmand Philippot2022-05-134-28/+34
|
* chore: add a CV pageArmand Philippot2022-05-034-19/+48
|
* chore: add a LegalNotice pageArmand Philippot2022-05-034-5/+16
|
* chore: add a TableOfContents componentArmand Philippot2022-04-223-0/+106
|
* refactor(storybook): reorganize design systemArmand Philippot2022-04-206-24/+125
| | | | | Add more stories for each components and change some components categories for better organization.
* refactor: support React 18Armand Philippot2022-04-163-29/+20
| | | | | | | | I replaced the deprecated VFC type with FC type and made all children explicits. Formatjs is still not compatible with React 18 so I need to skip type checking when comitting. There are some type errors because of IntlProvider in Storybook stories.
* chore: add an ImageWidget componentArmand Philippot2022-04-154-0/+285
|
* chore: add a SocialMedia componentArmand Philippot2022-04-154-0/+140
|
* chore: add a SharingWidget componentArmand Philippot2022-04-154-0/+309
|
* chore: add a LinksListWidget componentArmand Philippot2022-04-154-0/+276