Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
5f933e1
feat: localised page title
maanlamp May 7, 2026
7cbb2d9
Update index.html
maanlamp May 7, 2026
bc1f237
fix: Change approach to keep dynamic content on navigation
maanlamp May 7, 2026
d69f700
fix: use error color for badge
maanlamp May 7, 2026
4f6b837
fix: Use idiomatic react
maanlamp May 7, 2026
8a39707
fix: Feedback
maanlamp May 8, 2026
c528222
Update vite.config.ts
maanlamp May 8, 2026
c8cc8f5
feat: Add canonical URL
maanlamp May 8, 2026
c5f4309
feat: Reformat title like before
maanlamp May 8, 2026
6934d17
Update title.ts
maanlamp May 8, 2026
eaeff74
added some comments
publicJorn Jun 16, 2026
f031c9b
review: rename claude settings file
publicJorn Jun 16, 2026
491afa0
force translatedParams in separate router-i18n connector file
publicJorn Jun 16, 2026
ec2eaca
Merge branch 'main' into feature/localised-page-titles
publicJorn Jun 17, 2026
ef138b3
create test form page and setup utils to handle backend errors
publicJorn Jun 26, 2026
02b1fb8
Add top-level routing ErrorComponent
publicJorn Jun 26, 2026
9b035f6
add form components and an input connector for tsf
publicJorn Jun 30, 2026
3fd014b
add checkbox component and example
publicJorn Jun 30, 2026
47134a7
add CheckboxGroup
publicJorn Jun 30, 2026
ae1e27b
Added some minimal, but useful docs that help adoptation
publicJorn Jun 30, 2026
b1523dc
re-implement mutateAndValidate
publicJorn Jul 3, 2026
7e5a96c
update login form
publicJorn Jul 3, 2026
9fb77e5
adjust form component composition according to feedback
publicJorn Jul 7, 2026
7330924
small docs fix
publicJorn Jul 7, 2026
d61ed3a
checkbox primitive is now only the control
publicJorn Jul 7, 2026
30106d6
apply agreed upon BE error format
publicJorn Jul 7, 2026
d4c4cf2
fix translated url
publicJorn Jul 7, 2026
156db59
Merge branch 'main' into tanstack-form-basics
publicJorn Jul 8, 2026
6f3677e
resolve comments & some style updates
publicJorn Jul 8, 2026
e2b0a3b
fix: missed clsx update
publicJorn Jul 9, 2026
d46906e
nitpick
publicJorn Jul 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 30 additions & 2 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Documentation

This folder contains documentation on how to use the IGNE vite-react-template. You can also add project-specific docs.
38 changes: 38 additions & 0 deletions docs/recipes/extending-base-ui.md
Comment thread
publicJorn marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Extending base-ui

[Base UI](https://base-ui.com) covers a bunch of generic components that we use to build our own on.

Oftentimes you may want to implement base-ui as-is, but you need a generic way to apply generic styling or functionality to its compound components.
This doc describes a good way to do that.

## Import and re-export

For example a menu's Trigger should always contain an arrow:

```tsx
import { Menu as BaseMenu } from '@base-ui/react/menu';
import ChevronRight from "assets/icons/chevron-right.svg?react";

const MenuTrigger = ({children, ...rest}: BaseMenu.Trigger.Props) =>
<BaseMenu.Trigger {...rest}>{children}<ChevronRight /></BaseMenu.Trigger>

export default {
...BaseMenu,
Trigger: MenuTrigger,
}
```

This way you only have to redefine the compound components that you change.
The suffix format (in this case `Menu`Trigger), prevents issues with reserved component names (eg. Error from Field.Error).

## If you add props, always export a type

```tsx
//...

export type MenuTriggerProps = BaseMenu.Trigger.Props & { icon: "chevron" | "arrow" }
const MenuTrigger = ({children, icon, ...rest}: MenuTriggerProps) =>
<BaseMenu.Trigger {...rest}>{children}{icon ? <ChevronRight /> : <Arrow />}</BaseMenu.Trigger>

//...
```
34 changes: 34 additions & 0 deletions docs/working-with-forms.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Working with forms

We use [Tanstack Form](https://tanstack.com/form/latest/docs/framework/react/guides/basic-concepts) (TSF).

In `lib/forms/` you can define reusable form/field components. See the docs on [form composition](https://tanstack.com/form/latest/docs/framework/react/guides/form-composition) for more info.

Form components are in `components/form/`. Tanstack Form connectors should be prefixed with `tsf-`.
If you need for example an Input component that is not connected to TSF, create a separate component. Be specific, a search component is `<Search />` etc.

If you need something VERY specific (used only once), you may not need to make a component at all. Just use BaseUI primitives and reuse the styling classnames.

## How to adopt

### Error handling

The first thing to do is to verify the **error object(s)** with Backend.
Make sure that the validation/error utils can translate the backend errors into something tanstack form understands.
See TODO's in `lib/forms/validation-helpers` & `lib/api/error-helpers.ts`.

### Validation options

- Use a validation schema (preferably generated from api spec) to do FE validation of the form. Connect to `onDynamic`.
- If applicable, use the provided util to handle backend validation errors with `onSubmitAsync` & `mutateAndValidate`.
Note: this is a temp solution.

### Submission

Prefer submitting with Tanstack Query (`useMutation`). An option object should be generated by heyapi.


See the form-example route to see how it all comes together.
Note: Normally you would not put everything in the route file, but this is easy to remove when you start a new project.

💡 Remove any example files/code you don't need in your project!
2 changes: 2 additions & 0 deletions messages/en-US.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"$schema": "https://inlang.com/schema/inlang-message-format",

"forms_optional": "Optional",

"roles_user": "User",
"roles_admin": "Administrator",

Expand Down
2 changes: 2 additions & 0 deletions messages/nl-NL.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"$schema": "https://inlang.com/schema/inlang-message-format",

"forms_optional": "Optioneel",

"roles_user": "Gebruiker",
"roles_admin": "Administrator",

Expand Down
203 changes: 0 additions & 203 deletions openapi.json

This file was deleted.

Loading
Loading