aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/molecules/layout
Commit message (Collapse)AuthorAgeFilesLines
* feat(components): add a generic Grid componentArmand Philippot2023-11-115-248/+0
| | | | | * merge Columns, Gallery and CardsList into Grid component * add more options to control the grid
* refactor(components): rewrite Card componentArmand Philippot2023-11-115-456/+0
| | | | | | | | | | | | | * make the component more generic * merge `<Summary />` and `<Comment />` styles into card component to avoid repeating the same structure * remove most of the props to use composition However the CSS is a bit complex because of the two variants... Also, the component should be refactored when the CSS pseudo-class `:has` has enough support: the provider and the `cover` and `meta` props should be removed.
* refactor(components): rewrite Code component and usePrism hookArmand Philippot2023-11-115-513/+0
| | | | | | | | | | | | * move Prism styles to Sass placeholders to avoid repeats * let usePrism consumer define its plugins (remove default ones) * remove `plugins` prop from Code component * add new props to Code component to let consumer configure plugins (and handle plugin list from the given options) However there are some problems with Prism plugins: line-highlight and treeview does not seems to be loaded. I don't want to use Babel instead of SWC so I have no solution for now.
* refactor(components): replace Meta component with MetaListArmand Philippot2023-11-1114-540/+124
| | | | | | 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): replace ResponsiveImage with Figure componentArmand Philippot2023-11-113-6/+8
| | | | | | | | 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-115-421/+0
| | | | | | 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.
* refactor(components): extract FlippingLogo from Branding componentArmand Philippot2023-11-112-33/+3
|
* feat(components): add a generic Flip componentArmand Philippot2023-11-114-55/+132
| | | | | | 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): merge HeadingButton and Widget componentsArmand Philippot2023-11-115-264/+0
| | | | | | 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 Link componentArmand Philippot2023-11-112-3/+2
| | | | | | | | | * 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-15/+33
| | | | | | | * 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-117-104/+81
| | | | | | | | | | | | | * 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.
* feat(components): add Article, Aside, Footer, Header, Main & NavArmand Philippot2023-10-242-18/+13
| | | | | Some components have been renamed to be able to create Footer, Header and Nav.
* refactor(components): rewrite Heading componentArmand Philippot2023-10-244-38/+31
| | | | | | | | | * remove `alignment` and `withMargin` props (consumer should handle that) * move styles to Sass placeholders to avoid repeats with headings coming from WordPress * refactor some other components that depend on Heading to avoid ESlint errors
* refactor(components): rewrite Button and ButtonLink componentsArmand Philippot2023-10-241-14/+17
| | | | | | | | | | | | | | 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-248-1/+9
|
* refactor: use named export for everything except pagesArmand Philippot2023-09-2025-91/+71
| | | | | | 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-1923-39/+40
| | | | | | 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-233-19/+5
|
* chore: add an aria label to code blocksArmand Philippot2022-06-072-0/+19
| | | | | Prism is adding a tabindex to code blocks, so I think an aria label can help screen reader users to identify the tabbed content.
* chore(cards): use post title as link labelArmand Philippot2022-06-074-48/+69
|
* test: install and configure cypressArmand Philippot2022-06-028-8/+8
| | | | I also configure Jest to avoid conflicts between Cypress and Jest.
* chore: adjust cards list spacingArmand Philippot2022-05-231-1/+1
|
* refactor: reduce the number of data transformationArmand Philippot2022-05-231-20/+2
|
* chore: adjust dark mode stylesArmand Philippot2022-05-222-1/+3
|
* fix: render all images unoptimized in StorybookArmand Philippot2022-05-222-6/+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-215-87/+50
|
* chore: udpate code blocks styleArmand Philippot2022-05-201-139/+135
|
* refactor: rewrite Prism hooks and providersArmand Philippot2022-05-191-17/+8
| | | | | It avoid some hydratation errors on project pages (not in article however) and the hooks are now reusable.
* chore: fix minor styles/typescript issues introduced during refactoringArmand Philippot2022-05-182-2/+7
|
* chore: add branding animationArmand Philippot2022-05-182-35/+116
|
* chore: make some widgets scrollable (like ToC)Armand Philippot2022-05-172-1/+27
|
* chore: adjust and complete missing stylesArmand Philippot2022-05-164-21/+59
| | | | | | * add logo to topics pages and links * add Prism styles to articles * and a few other adjustements
* chore: improve accessibilityArmand Philippot2022-05-151-6/+20
|
* chore: add the Blog index pageArmand Philippot2022-05-131-38/+62
|
* refactor: rewrite DescriptionList and Meta componentsArmand Philippot2022-05-0912-132/+450
| | | | | | 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 LegalNotice pageArmand Philippot2022-05-032-7/+8
|
* chore: add homepageArmand Philippot2022-05-033-3/+4
|
* chore: add a Columns componentArmand Philippot2022-04-294-0/+235
|
* chore: add a PageLayout componentArmand Philippot2022-04-252-3/+28
|
* chore: add a PageHeader componentArmand Philippot2022-04-214-0/+233
|
* chore: add a PageFooter componentArmand Philippot2022-04-213-0/+87
|
* refactor(storybook): reorganize design systemArmand Philippot2022-04-2012-239/+147
| | | | | Add more stories for each components and change some components categories for better organization.
* chore: add a Code componentArmand Philippot2022-04-194-0/+542
|
* refactor: support React 18Armand Philippot2022-04-165-21/+23
| | | | | | | | 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 Overview componentArmand Philippot2022-04-151-0/+4
|
* chore: add a Widget componentArmand Philippot2022-04-154-0/+198
|
* chore: add a Card componentArmand Philippot2022-04-134-0/+345
|
* chore: add a Meta componentArmand Philippot2022-04-113-0/+135
|
* refactor: use a consistent classname prop and avoid children propArmand Philippot2022-04-083-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.