aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/organisms/layout
Commit message (Collapse)AuthorAgeFilesLines
* refactor(components): replace ResponsiveImage with Figure componentArmand Philippot2023-11-115-24/+24
| | | | | | | | 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): rewrite Branding componentArmand Philippot2023-11-112-21/+16
| | | | | | The component should only be responsible of the layout for the logo, the name and the optional baseline. Also, the homepage url could be different from `/` so the consumer should give the right url.
* feat(components): add a generic Flip componentArmand Philippot2023-11-112-5/+31
| | | | | | The flipping animation is used at several places so it makes sense to use a single component to handle the animation. It will avoid styles duplication.
* refactor(components): rewrite BackToTop componentArmand Philippot2023-11-111-1/+11
| | | | | * replace `link` prop with `anchor` prop * add a `label` prop to let consumer handle the accessible name
* refactor(components): rewrite Link componentArmand Philippot2023-11-113-5/+127
| | | | | | | | | * 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
* refactor(components): remove Column and NoScript from atomsArmand Philippot2023-11-113-2/+4
| | | | | | | * Column is a simple div meant to be used inside Columns component so they should live together. * NoScript is only used in Layout component and its name does not make sense since it needs to be used inside a `noscript` element.
* refactor(components): rewrite DescriptionList componentArmand Philippot2023-11-118-62/+57
| | | | | | | | | | | | | * 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-119-97/+78
| | | | | | | | | * 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(components): rewrite ProgressBar componentArmand Philippot2023-11-112-5/+16
| | | | | | | * Avoid browser vendors by adding an extra div * Add a loading state * Add an option to center the progress bar (no longer the default) * Remove min since it is always 0
* refactor(components): rewrite Spinner componentArmand Philippot2023-10-241-2/+8
| | | | | | | * Message should be set as children * Default message is no longer available (depending on use case, the consumer might prefer aria-label instead) * It is now possible to define the message position
* feat(components): replace icons with a generic Icon componentArmand Philippot2023-10-242-6/+7
| | | | | Sizes are also predefined and can be set using the `size` prop, so the consumers should no longer adjust the size in CSS.
* feat(components): add Article, Aside, Footer, Header, Main & NavArmand Philippot2023-10-2410-82/+87
| | | | | Some components have been renamed to be able to create Footer, Header and Nav.
* refactor(components): rewrite Button and ButtonLink componentsArmand Philippot2023-10-243-84/+82
| | | | | | | | | | | | | | 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
* build: convert project to esmArmand Philippot2023-10-249-0/+9
|
* refactor(components): rewrite form componentsArmand Philippot2023-10-241-1/+1
|
* refactor: use named export for everything except pagesArmand Philippot2023-09-2029-116/+117
| | | | | | 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-1928-76/+69
| | | | | | 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-235-22/+20
|
* fix(comments): load all comments on a postArmand Philippot2022-08-213-10/+10
| | | | | | | | | 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.
* chore: add a label to progress barArmand Philippot2022-06-071-2/+4
| | | | | | The progress element is a form element, so a label is required to be accessible. Since I'm not using it without label, I transform the optional info parameter to a mandatory label parameter.
* chore(cards): use post title as link labelArmand Philippot2022-06-071-1/+2
|
* chore: add aria hidden attribute to SVG iconsArmand Philippot2022-06-071-1/+5
|
* test: install and configure cypressArmand Philippot2022-06-029-9/+9
| | | | I also configure Jest to avoid conflicts between Cypress and Jest.
* chore: replace Checkbox component with a BooleanField componentArmand Philippot2022-05-311-1/+1
| | | | | Checkbox and radio buttons are working the same way so I decided to group them in a same component.
* chore: add a search form when posts list prints no resultsArmand Philippot2022-05-247-48/+149
|
* test: fix theme toggle and comment testsArmand Philippot2022-05-242-26/+3
|
* chore: adjust cards list spacingArmand Philippot2022-05-231-0/+7
|
* fix: ensure all topics/thematics have the base urlArmand Philippot2022-05-233-8/+8
|
* refactor: reduce the number of data transformationArmand Philippot2022-05-2317-471/+374
|
* fix: render all images unoptimized in StorybookArmand Philippot2022-05-229-37/+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-1/+58
|
* chore: update some stylesArmand Philippot2022-05-213-4/+10
| | | | | | | * 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: update images stylesArmand Philippot2022-05-202-8/+8
|
* chore: handle blog pagination when JS is disabledArmand Philippot2022-05-201-27/+68
|
* chore: fix minor styles/typescript issues introduced during refactoringArmand Philippot2022-05-181-1/+0
|
* chore: handle settings changeArmand Philippot2022-05-183-7/+56
|
* chore: adjust articles stylesArmand Philippot2022-05-171-2/+5
| | | | | * change animation on article card hover * change comments section alignment
* chore: listen scroll to hide/show back to top buttonArmand Philippot2022-05-172-11/+31
|
* chore: improve accessibilityArmand Philippot2022-05-153-2/+21
|
* chore: add Article pagesArmand Philippot2022-05-156-34/+71
|
* chore: add Search pageArmand Philippot2022-05-153-22/+20
|
* chore: add Thematic pageArmand Philippot2022-05-133-3/+17
|
* chore: handle blog paginationArmand Philippot2022-05-135-26/+151
|
* chore: add the Blog index pageArmand Philippot2022-05-137-99/+172
|
* refactor: rewrite DescriptionList and Meta componentsArmand Philippot2022-05-0916-245/+281
| | | | | | 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 homepageArmand Philippot2022-05-033-4/+21
|
* chore: add a PageLayout componentArmand Philippot2022-04-255-13/+19
|
* chore: add a Header componentArmand Philippot2022-04-224-0/+243
|
* chore: add a CommentsList componentArmand Philippot2022-04-227-7/+291
|
* chore: add a Comment componentArmand Philippot2022-04-214-0/+443
|