aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/atoms/links
Commit message (Collapse)AuthorAgeFilesLines
* refactor(stories): migrate stories to CSF3 formatArmand Philippot2023-12-155-338/+166
|
* refactor(pages): refine Article pagesArmand Philippot2023-12-011-1/+1
| | | | | | | | | | | * use rehype to update code blocks class names * fix widget heading level (after a level 1 it should always be a level 2 and not 3) * replace Spinner with LoadingPage and LoadingPageComments components to keep layout coherent * refactor useArticle and useComments hooks * fix URLs in JSON LD schema * add Cypress tests
* fix: generate an id for each headings in the page main contentsArmand Philippot2023-11-181-1/+1
| | | | | | | | | | | | | | | | | | | | Since #be4d907 the ids was no longer addded to headings in useHeadingsTree hook. It was a bad practice to manipulate the DOM that way. However, I did not move the implementation elsewhere... To fix this, I now use rehype-slug on both markdown contents and html string coming from WordPress. I'm not sure the dynamic imports are really useful here since the table of contents is on almost all pages but Jest was failing with regular import because of ESM. It is the only thing that makes the tests functional again so... However if we want to test the `updateContentTree` function, Jest fails for the same reason. So I decided to not test this function. I've already spend too much time on this issue. Another problem: the ToC on projects page. Currently we use the ref on the body but the page contents are imported dynamically so the hook is executed before the contents are loaded. It makes the ToC empty... We should refactor the pages so we can use the ref directly on the imported contents.
* feat(components): add a VisuallyHidden componentArmand Philippot2023-11-111-2/+2
|
* refactor(components): rewrite SocialLink componentArmand Philippot2023-11-117-97/+143
| | | | | * replace default label with a label prop * rename name prop to icon prop
* refactor(components): rewrite SharingLink componentArmand Philippot2023-11-118-253/+241
| | | | | * replace default label with label prop * simplify CSS rules
* refactor(components): rewrite Link componentArmand Philippot2023-11-1113-474/+249
| | | | | | | | | * rename `external` prop to `isExternal` * rename `download` prop to `isDownload` * rewrite CSS to reduce code length and complexity * move link styles in Sass placeholders to avoid repeats because of WordPress articles * move NavLink component to molecules
* feat(components): replace icons with a generic Icon componentArmand Philippot2023-10-241-1/+0
| | | | | Sizes are also predefined and can be set using the `size` prop, so the consumers should no longer adjust the size in CSS.
* build: convert project to esmArmand Philippot2023-10-244-0/+4
|
* refactor: use named export for everything except pagesArmand Philippot2023-09-2013-42/+30
| | | | | | 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-199-15/+15
| | | | | | 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: make Links and Images compliant with Next.js 13Armand Philippot2023-01-232-12/+9
|
* test(unit): fix Jest errors due to images importArmand Philippot2022-06-031-0/+3
| | | | | 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-024-4/+4
| | | | I also configure Jest to avoid conflicts between Cypress and Jest.
* chore: adjust dark mode stylesArmand Philippot2022-05-222-32/+184
|
* chore: complete Storybook storiesArmand Philippot2022-05-211-4/+1
|
* chore: adjust and complete missing stylesArmand Philippot2022-05-161-23/+0
| | | | | | * add logo to topics pages and links * add Prism styles to articles * and a few other adjustements
* chore: improve accessibilityArmand Philippot2022-05-151-0/+23
|
* chore: add a CV pageArmand Philippot2022-05-033-8/+117
|
* refactor(storybook): reorganize design systemArmand Philippot2022-04-204-21/+136
| | | | | Add more stories for each components and change some components categories for better organization.
* refactor: support React 18Armand Philippot2022-04-165-12/+26
| | | | | | | | 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 a Nav componentArmand Philippot2022-04-121-3/+1
|
* refactor: use a consistent classname prop and avoid children propArmand Philippot2022-04-085-16/+29
| | | | | | | | I was using the FunctionComponent type for some component that do not use children. So I change the type to VoidFunctionComponent to avoid mistakes. I also rename all the "classes" or "additionalClasses" props to "className" to keep consistency between each components.
* chore: add a ResponsiveImage componentArmand Philippot2022-04-061-3/+15
|
* chore: add a SharingLink componentArmand Philippot2022-04-054-0/+301
|
* chore: add a NavLink componentArmand Philippot2022-04-044-0/+145
|
* chore: add a social link componentArmand Philippot2022-04-014-0/+149
|
* chore: add a Link componentArmand Philippot2022-03-314-0/+153