| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
| |
* extract Blog component from BlogPage (paginated) and extract Article
component from ArticlePage to avoid `Cannot read properties` errors due
to fallback route
* fix sitemap build (cjs not supported)
* fix eslint warnings (react/jsx-no-literals)
* update `start` script since I'm using standalone output
* update `postbuild` script since we need to copy public and static
files to standalone directory (Next.js does not handle it itself
because we should use a CDN...)
|
| | |
|
| |
|
|
|
| |
The previous component was too long and hardly readable. So I splitted
it in different part and added tests.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* replace `items` prop with `children` prop: it is more readable this
way,
* handle navbar item state inside NavbarItem component: it avoid using
three differents states and their methods to do exactly the same thing
* remove useAutofocus hook since we can't use it anymore
* add `onActivation` and `activationHandlerDelay` prop to NavbarItem
component to be able to focus the search input only when the item is
activated (it replicates the functioning of useAutofocus hook)
* replace `ref` type in SearchForm component: it does not make sense to
use an input ref for a form. Instead I use useImperativeHandle to
provide different a focus method to the given ref.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
* remove `Notice` prop to handle it directly in the form
* replace `saveComment` prop with `onSubmit`
* use `useForm` hook to handle the form
|
| |
|
|
|
|
| |
* remove `Notice` props to handle it directly inside the form
* replace `sendMail` prop with `onSubmit` prop
* use `useForm` hook to handle fields
|
| |
|
|
|
|
| |
* remove searchPage prop (the consumer should handle the submit)
* change onSubmit type
* use `useForm` hook to handle the form
|
| |
|
|
|
|
|
|
| |
* remove SearchModal and SettingsModal components
* add a generic NavbarItem component (instead of the previous toolbar
items to avoid unreadable styles...)
* move FlippingLabel component logic into NavbarItem since it is only
used here
|
| |
|
|
|
|
| |
We could use an array of items and map over it instead of repeating the
Switch component for each settings but with translations, it becomes
quickly unreadable. So I prefer to keep separate components.
|
| | |
|
| |
|
|
|
|
| |
* reuse Theme provider logic
* move DOM mutation from provider to hook
* add a script to init theme before page load
|
| |
|
|
|
|
|
| |
To be honest, next-themes was working fine. However since I use a theme
provider for Prism code blocks, some code is duplicated between this
app and the library. So I prefer to use a custom Provider without the
options I don't need.
|
| |
|
|
|
|
|
|
|
|
| |
Since the local storage key is not meant to change between the
components, it should be set directly inside the app file. So
both the local storage and the data attribute should be handle
in a provider.
I also added a custom document because we need a script to
retrieve the stored value in local storage earlier to avoid
flashing on hydration.
|
| | |
|
| |
|
|
|
|
|
| |
* return a tuple instead of an object
* add a validator function as parameter (if the stored value
is manually changed, it is not safe to cast its type)
* add tests
|
| | |
|
| |
|
|
|
|
|
|
|
| |
* 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
|
| |
|
|
|
|
|
| |
* 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
|
| |
|
|
|
| |
Sizes are also predefined and can be set using the `size` prop,
so the consumers should no longer adjust the size in CSS.
|
| |
|
|
|
|
|
|
|
| |
* 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
|
| | |
|
| | |
|
| |
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
I changed the settings disposition to make tooltip positioning easier.
Jest complains about ref passed but everything seems to work as
expected so I'm not sure it is relevant. Maybe a bug with cloneElement.
|
| |
|
|
| |
I also configure Jest to avoid conflicts between Cypress and Jest.
|
| | |
|
| | |
|
| |
|
|
|
| |
With French translation, words are a little longer so I reduce the
font size on small devices to avoid line breaking.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
* change animation on article card hover
* change comments section alignment
|
| |
|
|
|
|
| |
* add logo to topics pages and links
* add Prism styles to articles
* and a few other adjustements
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
Add more stories for each components and change some components
categories for better organization.
|
| |
|
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| |
|