Repository navigation
v2.0.0
Major Changes
-
b7c6b83: Breaking: the index no longer re-exports the internal helpers nor the testing tools: these names can no longer be imported from
react-resource-view, their code stays in its moduleRemoved from the index, to be released with version 2.0.0:
onResourceViewDefaultsChange(marked@internal) andgetRegisteredOpenFramesBUILT_IN_OPENandresolveOpenadoptResourcesanduseInlineClaimwriteOptimistically,isOptimisticandnotifyWriteErrorjoinPath,appendBracketParamandflattenStrapiRecordPermissionCacheContextresetApiConfig, for testsHeaderandContentList, internal components of the list view (names that collided with the router's)
None of these names is used by the documentation or the website.
@internaldeclarations no longer appear in the published.d.tsfiles (stripInternal). A test now freezes the list of public exports: any addition or removal changes it.
Minor Changes
-
150902e: Added:
commandPaletteonAdminLayout/createAdminLayoutopens a Cmd+K / Ctrl+K palette built from the scope — go to a menu entry, start a creation — and lists only what the resources permit, instead of leaving the back office without keyboard navigation.commandPalette: { searchable: true }also looks records up by thetitleFieldof each resource, sent as a filter like the list's own.- The palette is a
role="dialog"holding acomboboxand alistbox; Escape closes it.
-
51a6912: Changed:
afterSave: "read"onviews.createandviews.updateleads to the page of the saved record, anduseFormByResourcefills the form itself when the record arrives, instead of a view copying the synchronisation ofEditView"read"is accepted by the development validation next to"close","stay"and"reload".- A form handed a
dataof its own (a row of a list) keeps that record and is not refilled.
-
5fb8020: Changed:
layout.board({ groupBy: "status" })draws one column per option of the form'sstatusinput, instead of asking forcolumnsnext to theoptionsit already declarescolumnsstays available to reorder the columns or show only some of them.- In development, a board without
columnsis refused only when the input it groups by has nooptionsto read them from.
-
37179f8: Added:
layout.board({ columns })accepts a function({ viewResourceContext, rows, defaults }) => columns, read again at each render, andhideEmpty(on the board or on a column) hides the columns holding no card except while a card is dragged, instead of replacing the whole board list component to do eitherdefaultsare the options of the form's input the board groups by.- "Move to…" still lists every column, hidden or not.
-
6d40944: Changed: below
sm, the calendar's month view shows the initials of the days, one dot per event and the list of the tapped day underneath, instead of titles cut to "02:" in 44 px cells. -
f5a2886: Changed:
layout.cards({ frame: false })drawscomponents.rowon its own, without border, padding or actions footer, andactions: falseremoves the actions footer of a framed card, instead of always wrapping the row in a card of its own- A row component that already draws its own card no longer gets a double frame; selection and opening keep working.
- The codemod writes
frame: falseon cards whosecardViewOptionFactoryhad arowComponent.
-
82bd6e2: Added:
createPage("help", { name, icon, component })declares a page without data (a home, a help, a dashboard): a menu entry and a route to a component, with nocreate,read,updateordeleteroute and no request to the API, instead of acreateViewResourcewith every permission turned off and a fakegetCollection.migratewrites a 0.x resource made only of a name, an icon and aviewComponentascreatePage, and no longer reports RV1-PERM-002 on it.
-
029a3d9: Changed: in development, a tab with neither
resourcenorcomponentor whose resource is an unknown id, alayout.chart()with neithergroupBynordateFieldand alayout.cards({ columns })outside 1 to 6 throw an explicit error, instead of passing silently. -
31915ba: Added:
ChartAggregate,ChartInterval,BaseJsonLdItemInterfaceandDefinitionProblemtypes are exported, as isinspectDefinition, which lists the problems of a declaration without throwing, so it can be tested in CI. The README shows a vitest example. -
7f556f2: Added:
npx react-resource-view generate resourceswrites one resource declaration per collection of the OpenAPI schema, instead of leaving everycreateViewResourceto be written by hand afterinit- Reads OpenAPI 3.0/3.1 and Swagger 2.0 (API Platform, FastAPI, Supabase…) from a file or a URL — by default
src/api-schema/openapi.json. - Writes the
path, theform.inputs(enums as selects, IRIs and foreign keys as searchable relations, dates, numbers, booleans), thepermissionsthe exposed operations allow, a table, and a board when an enum namedstatusis among the inputs. - Registers the resources in the scope's
resources;--only books,authorsrestricts them,--dry-runlists the files, and no existing file is overwritten without--force.
- Reads OpenAPI 3.0/3.1 and Swagger 2.0 (API Platform, FastAPI, Supabase…) from a file or a URL — by default
-
7b8b0b7: Added:
react-resource-view/i18nexportsmessages, the English reference of every message the library shows, andmissingKeys(dictionary), which lists the keys a dictionary leaves untranslated, instead of copying the keys by hand into each projectmessagesis keyed on the English text:messages["Saved"] === "Saved". A dictionary for another language has one entry per key.missingKeysreturns the keys without an entry, and those with an empty one. Call it from a test to fail when a new version of the library adds a message your dictionary does not translate.- The documentation has an "i18n" page that shows how to merge the catalogue with your own keys.
-
5ca6970: Added:
layout.gallery({ imageField })draws a grid of cards headed by a picture, for products, articles or profilesimageFieldis typed on the item and accepts an URL, a data URL, a media object ({ url, name }) or a list of them; a record without an image gets a placeholder, and the pictures load lazily.aspect("4/3","1/1","16/9"),fit("cover","contain"),titleField,columnsandfieldsshape the cards.
-
7744b2b: Changed: below
sm, the layout switcher shows the icon of each layout alone (its name stays the tab's accessible name), instead of cutting the last tabs off at 390 px. -
a0855d0: Changed: an empty list tells "nothing yet" from "nothing matched", draws the resource's own icon and name, and offers to clear the filters when one is active, instead of always saying "Nothing matched your search"
- New
views.list.empty: { icon, title, body, filteredTitle }declares them without a component;icondefaults to the resource'sicon,titleto "No yet". - The create button only shows where
permissions.createallows it. components.emptystill replaces the whole state.
- New
-
5d87b71: Added: two media controls,
createMediaImageInput(one image: preview, replace, crop, remove) andcreateMediaFilesInput(a list of documents: name, type, size, preview or icon, download, removal), which keep the file as base64 in the record instead of requiring an upload API- Options:
accept(MIME types,image/*families or extensions),maxSize,maxFiles,dragAndDrop,crop: { aspect }; a refused file is named under the field with the reason, throughreact-mini-i18n. storechanges what becomes of a file: a data URL by default (storeAsDataUrl), or the URL returned by a function that sends it to the API.components: { dropzone, imagePreview, fileItem }replaces part of the rendering;mediaImageInputControllerFactoryandmediaFilesInputControllerFactoryset these options once for the whole application.- Outside a form,
MediaValueshows a thumbnail for an image and an icon with the name for a document: on a detail page, in a table cell (two files then "+N") and on the cards, instead of the raw base64.
- Options:
-
fba905e: Added:
mobileNavMaxItemsonAdminLayout/createAdminLayout(4 by default) caps the entries of the mobile bottom bar; the following ones move into the "More" drawer, ahead offooterMenu, and "More" is marked current when the page on screen is one of them. -
c93ffa0: Changed: a burst of realtime pushes is read once, 250 ms after the last one (
realtime: { debounce }to change it), and a read that a newer one replaces, or that the unmount outlives, is aborted:ResourceContextcarries asignalthat the REST repository passes tofetch, instead of five full reads of the list whose stale answers were only dropped on arrival. -
7e51ed8: Added:
realtimeaccepts{ subscribe, withCredentials }: the channel is pluggable (Supabase Realtime, SSE, WebSockets), and Mercure reconnects with a growing delay and reads the views again when the hub comes back, instead of closing for good after an HTTP error. -
365ffc7: Changed: a hand-written
repositoryanswers{ items, totalItems }and always receives{ id: string }, instead of a JSON-LD collection and an id that was sometimes the item, the IRI or the bare segmentgetCollectionaccepts{ data: { items, totalItems, nextCursor? } }without a cast;createResourceCollectionand JSON-LD collections still work.getItemandremoveItemreceive{ id }andupdateItemthe record with itsid, always the short identifier as a string. A repository that read the@idof the item it was given must readidinstead.- New
idFieldon the resource: links, keys and selection are built from that field, so the records need no@id.
-
f454c8e: Added:
restDialectdescribes a common REST API through configuration (X-Total-Count,Linkheader, cursor pagination), with thejsonServerDialectanddrfCursorDialectpresets andinit -b json-server, instead of requiring a hand-written dialect -
8c15035: Changed: below
sm, the table's row actions fit in a 56 px "…" menu instead of two text buttons that took half the screen -
6e5b079: Added:
views.list.savedViews: trueadds tabs of saved views above a list — a name over its filters, sort, layout and columns, created, renamed, duplicated and deleted by the reader — andviews.list.presetsdeclares typed ones in code, instead of a combination that cannot be named nor linked to- A view has a URL:
?savedView=<id>applies it, next to thefilterandvariantit sets. - The views a reader saves are kept by the new
savedViewsport ofconfigurePorts:localStorageby default, or four functions (list,create,update,remove) to share them through an API.SavedViewsStoreInterface,SavedView,ListPresetandlocalSavedViewsStoreare exported. - In development, a preset without a name, with an undeclared layout or with the id of another is refused.
- A view has a URL:
-
b99a241: Added:
singleton: { get }orsingleton: { id }declares a resource with a single record (settings, a profile): its menu entry opensupdate(orread) directly, and draws the creation form, pre-filled withdefaultData, when the record does not exist, instead of a hand-made list filtered down to at most one item.get(context)resolves to the record, or toundefined/nullwhen there is none; withid, a 404 from the API means the same.- Saving a new record stays on the page and turns it into the editing form;
afterSavestill applies.
-
9389c47: Added:
storage: { type: "local", seed: Item[] | () => Item[] }fills a resource kept in the browser with its first records, written once and only while the storage is empty, instead of writing the Hydra collection into the storage key by hand -
d9904d0: Changed: the submit button of a form reads "Save" on an edit screen and "Create" on a creation one, instead of the name of the action ("update"), so
label.submitis no longer needed to get those words- A
label.submitdeclared in the form still wins.
- A
-
3a3d897: Added:
layout.table({ groupBy })andlayout.cards({ groupBy })section the rows by a field, one foldable section per value with its count- The sections are headed by the labels of the
optionsof the form's select input, in its order; the records with no value are gathered under "No value", last. - Each header is a button with
aria-expanded; every section starts open. - The Properties menu of the table gains a "Group by" choice among its select fields, remembered per resource and layout like the columns.
- Only the page on screen is grouped, and a note says so when the API holds more records.
- The sections are headed by the labels of the
-
12cda5e: Added: three new list layouts —
layout.tree()(each record under its parent, collapsible branches),layout.map()(one marker per record on tiles from any server, with no new dependency) andlayout.chart()(count, total, average and bars per value or columns per period), all API-agnostic
Patch Changes
-
a1e6df0: Fixed: the JSON-LD dialect reads
hydra:title,hydra:descriptionandhydra:violations(API Platform 3's default error format), instead of showing a 400 error with no explanation. -
ddcfbd5: Fixed:
ApiUrishows a fallback instead of an endless loader when the relation responds with an error,noCacherereads an iri that is already cached, a changediriis picked up, and the cache is invalidated when the linked resource publishesonChange. -
c0e6c5f: Fixed:
hooks.beforeListreceives the view's filter already merged and has the last word, instead of seeing the filter added after it returned (asearchrenamed toqwent out with both keys, a removed key came back) -
cd56907: Added: a resource can let a board's cards be moved without offering the update form (
permissions: { update: false, move: true }), instead of locking the cards as soon asupdateis refusedThe new
movepermission answers asupdatedoes as long as it is not declared: nothing changes for a resource that does not mention it. Themigratecodemod puts aTODO(RV1-PERM-008)onupdatewhencanUpdateis refused on a declaration that draws a board — in 0.x, its cards moved anyway. Documented inMIGRATION-1.0.mdandmigrations/1.0.json. -
12ac31e: Fixed: on a board, records whose
groupBymatches no column (null, unknown value) fall into a "No value" column (showUnassigned,unassignedLabel), and1finds the"1"column, instead of disappearing without a sign. -
f1a5d93: Fixed: clicking a day of the calendar opens the create view, with the date filled in and no id, where
views.create.opensays, instead of adding a second "create" link under the calendar -
36058f2: Fixed: the month's cells and the calendar's week and day slots create a record from the keyboard (Tab, then Enter or Space), and the Day/Week/Month tabs keep their label for screen readers on a phone, instead of being click-only
divs and tabs reduced to an icon -
a268b11: Fixed: the calendar's month view names its days from the locale's first day of the week (Sunday in en-US), instead of staying fixed from Monday to Sunday above columns that start elsewhere.
-
ae49b69: Fixed: a word that is not a command (
migrat,wombat) exits with code 1 and suggests the closest command ("Unknown command "migrat" — did you mean migrate?"), instead of creatingsrc/views/migratLayout.tsx;helpprints the help instead of creatinghelpLayout.tsxhelp [command]and--version/-vwork, and the help lists the options under the command they belong to. The shortcut without a command (npx react-resource-view Heatmap) still works, but only for a name that starts with a capital letter. -
526f4af: Fixed:
configureApi'sbaseUrl,fetchandgetHeadersalso apply to the default JSON-LD dialect, andbaseUrlandgetAuthTokenreach Mercure, instead of being ignored -
f6df599: Fixed: the CSV export prefixes with an apostrophe the cells that start with
=,+,-,@, a tab or a carriage return, instead of letting Excel or LibreOffice run them as formulas when the file is opened (CSV injection, OWASP); the JSON export is unchanged -
2c5d64b: Fixed: a custom dialect that reads
payload.rowsfills the list, instead of showing it empty because it read the already normalized envelope again -
881724a: Fixed: with FastAPI, Django or Spring and a primary key other than
id, opening a record callsGET /articles/hello, instead of the collection's URL -
539bf18: Fixed: in the calendar and the timeline, a date without a time (
2026-10-23) falls on the right day in every time zone and is shown without a time, instead of being read as UTC ("02:00", or the day before in the Americas) -
96f33b5: Changed: a development error points to
MIGRATION-1.0.mdandnpx react-resource-view migrateonly when it reports a 0.x key, instead of ending every error — a typo in a 1.x declaration included — with it- An option a layout names differently is suggested under its name there:
layout.timeline({ dateField })suggestsstartField(andlayout.calendar({ startField })suggestsdateField), instead of the closest spelling,titleField. - A misplaced
groupBylistslayout.chart({ groupBy })among the layouts that take one. - The hint for
titleKey(RV1-VIEW-008) names the layouts that take atitleField— board, gallery, calendar, timeline, tree and map — instead of "on a layout", whichlayout.table({ titleField })refuses.
- An option a layout names differently is suggested under its name there:
-
91a91b2: Fixed: a resource declared before
configureApi({ dialect })speaks the configured dialect, instead of staying on JSON-LD forevercreateRepositorychose between the JSON-LD repository and the REST repository when the resource was declared. Resources being declared by imported modules, hence before the body of the entry point that callsconfigureApi, a Strapi or Supabase application split across several files spoke JSON-LD without a word. The choice is now made on every request; a resource that declares its owndialectkeeps its backend. -
5ce21a3: Fixed: field names (
titleField,groupBy,form.inputs…) are also checked on an item that extendsBaseJsonLdItemInterface, instead of accepting any string because of its index signature. -
d68099f: Fixed: changing a filter brings the list back to page 1, instead of keeping the current page and showing "No results yet" without pagination
-
8f130e1: Changed: the keys of
form.inputsare checked against the item:inputs: { titel }is a TypeScript error, instead of compiling silently. A field that does not exist on the item (a password confirmation…) is declared in the second generic,createViewResource<User, User & { confirm: string }>;filters.inputsstays free, and the README says so. -
73641d2: Fixed:
init -b supabase -u https://<ref>.supabase.cofillsSUPABASE_PROJECT_REFin.envfrom the URL, and ends onmake api-schema(which reads.env) instead ofpnpm run api-schema, which failed on the empty project id -
5eb82e3: Fixed: on an items or tree layout, a record still being created shows no action buttons, as a table row does, instead of offering update and delete on a row that has no identifier yet.
-
a25d0ec: Fixed:
createViewResource<Row>accepts the real type of a Supabase, Strapi, FastAPI, Django or Spring row, without"@id", instead of refusing the type or pushing to lie about it -
c647ac0: Fixed: on the default JSON-LD backend, an array filter goes out as
status[]=a&status[]=b, instead ofstatus=a&status=b, of which API Platform kept only the last value -
3643c38: Changed: in development, a JSON-LD
pathwithout a leading/throws an error instead of targeting the wrong host, andrealtime: trueon apathoutside/api/warns that it subscribes to nothing, instead of staying silent. -
4a59a6c: Fixed: the JSON-LD dialect returns ids as strings, so a custom repository answering
{ id: 5 }no longer crasheslayout.split()withid.split is not a function. -
0f48e26: Changed: switching layouts writes
variant=<id>into the URL, asfilterdoes, instead of keeping it in memory only: a reload or a shared link finds the chosen layout again. A list nested in a tab leaves the URL alone. -
4313bb0: Fixed: the board, calendar, timeline and split layouts show the pagination, instead of stopping at the first page with no way to reach the other records.
-
ebd65f1: Changed:
createViewResourcealone weighs under 50 kB minified instead of 191 kB: the layouts, the views and the dialog/drawer frames are loaded the first time they are drawn, not bundled by every resource declaration. -
edc83ac: Fixed: the list always sends its page size (30 without
views.list.pageSize), instead of letting Spring answer 20 rows and Strapi 25 while the pagination counts 30 -
c675ade: Fixed:
storage: "local"paginates and sorts on the client instead of emptying the list and the export as soon aspageSize, a sort orpageenters the filter -
dcb927e: Fixed: a malformed
?filter=or?defaultData=in the URL is ignored (with a warning in development) and the view is shown, instead of throwing aSyntaxErrorthat brought down the wholeResourceViewProvider -
3cc2138: Fixed: the
migratecodemod rewritestableViewOptionFactory()without an argument tolayout.table(), and a factory called with a variable tolayout.cards(opts)flagged for a manual review, instead of crashing on a TypeError that does not name the fileA file the migration cannot read or rewrite is now named with its error and left as it is; the other files are processed anyway, and the command ends with code 1 — the project is no longer left half migrated without knowing where.
-
558c450: Fixed: the
migratecodemod exits with code 1 on a path that does not exist and processes.mts,.ctsand.cjsfiles, instead of announcing "0 files rewritten." and letting--checkpass in CIErrors (unknown option, missing path, file that cannot be migrated) are written to stderr, no longer to stdout.
-
820b0f3: Changed:
Button,BadgeandTabsTriggertransition only their colors, border, shadow and transform, instead of every propertytransition-allbecomestransition-[color,background-color,border-color,box-shadow,transform], as in the Brand Assets design system. Size and layout changes (a width set by the application, for instance) are no longer animated.- The default theme sets
--heading-weightto 600 and--heading-trackingto −0.02em, instead of 800 and −0.025em: headings are lighter.
-
fd9f63e: Fixed: a page beyond the last one (after a deletion or through a
?filter={"page":50}link) brings the list back to its last page, instead of an empty screen without pagination. -
f0c281e: Fixed: the pagination's ellipses are no longer buttons, instead of sending page "...." to the API
-
f64d535: Fixed: under
prefers-reduced-motion: reduce, dialogs, alert-dialogs, popovers and selects no longer grow when they open: they only fade -
0331468: Fixed:
setSelected,isSelectedandonSelectedselect a record by the identity the dialect reads, instead of accepting only those that have an@id(Strapi, Supabase, FastAPI, Django, Spring) -
e59fe0a: Fixed: the delete view is shown on a full page (direct route
…/delete/1,views.delete.open: "page") instead of throwingDialogRootContext is missing, and "Cancel" goes back to the list there. -
37c3c5a: Fixed: the delete view shows the loading error with "Try again" when the record does not load, and "Continue" is disabled during the call, instead of leaving the dialog empty and sending two DELETE requests
A failing
getItem(404, 403) left the body of the dialog empty, with no message and no way back. Withviews.delete.optimistic: false, a double click on "Continue" sent two DELETE requests: the button is now disabled during the deletion, in its destructive variant, and becomes active again if the API refuses. -
f52b205: Fixed:
views.list.rowActionsrejectsActionList.createandActionList.listat compile time, as it already rejected"create"and"list", instead of accepting them. Onlyread,updateanddeleteare accepted, written as strings or as the enum. -
1122220: Fixed: the links of the row actions, the split, the timeline, the calendar and the chart carry the identifier read by the resource's dialect (Strapi's
documentId, Supabase's primary key), instead of the global dialect's -
ef6aa16: Changed: the selection checkboxes of the table, cards, items, tree and gallery are named "Select <title>" (from
titleField, thentitle,name,label, then the id) and the table's actions column header carries a screen-reader "Actions" label, instead of every checkbox being called "Select" and the header being empty -
769452a: Fixed: in a list, the bulk action bar only appears in the layouts that have a selection (table, cards, items, tree, board, or a
layout.customthat declaressupports: ["selection"]); when switching to the calendar, the map… the selection is set aside instead of staying active on invisible rows. -
8547004: Fixed: a selection is cleared when the page, the filter or the sort changes, instead of reappearing on the way back to the page with a bulk action ready to act on it
-
65c817a: Fixed: in the split layout, "Back to the list" closes the detail and the id follows the URL (the Back button included), instead of leaving the detail shown on a phone.
-
1635b86: Changed: list rows (table, cards, items, split) are keyed by the identity of their record instead of
JSON.stringifyor the index, so an edited or optimistically created row keeps its DOM node, focus and local state. -
7af1a17: Changed: the starter generated by
initsplits React, the router and the UI dependencies into their own chunks, so its firstvite buildends without the "chunks are larger than 500 kB" warning, instead of one 687 kB entry chunk. -
bd6c10a: Fixed: the sticky row-actions column of the table took the page's colour instead of the card's, drawing a darker band from the header down, ignoring hover and selection and overflowing the card's rounded corner; it now follows the card and the row, its shadow only shows while the table scrolls, and Delete is muted until hovered, with a gap between the buttons
-
2d490ee: Fixed: on a timeline, a
groupByfield holding a number or a boolean (0andfalseincluded) forms one group per value, instead of putting every row in "Unassigned". -
20ddfba: Fixed: an unknown resource throws
Resource "x" is not registered. Registered: …and an action without a viewResource "x" has no "update" view. Available: …, instead of "View not found" in both cases -
80e1146: Fixed: without a total returned by the API, the list offers "Previous / Next" and the export reads every page, instead of believing it has only one page
-
0085a9f: Fixed: a view refuses an identifier from its URL that is the IRI of another resource or an absolute URL, and shows a load error, instead of reading — and saving — whatever the IRI designates (
/books/update/%2Fapi%2Fusers%2F1calledGET /api/users/1)- An identifier holding a slash is accepted only as an IRI one segment under the resource's
path. - The JSON-LD dialect no longer calls an absolute URL given as an id, which would have sent the bearer token to that host.
- An identifier holding a slash is accepted only as an IRI one segment under the resource's
-
b5b04c9: Changed: the development validation checks the values of
rowActions,open,afterSave,pageSize,permissionsandlayouts, and reports a table declared withoutform, instead of letting them fall back silently on a default. -
69e6232: Changed: the development validation cross-checks
groupBy,fields,sort.fieldsandtitleFieldagainstform.inputs:statussortitelgive a "did you mean … ?" warning instead of passing silently (a warning, to let computed fields through). -
c53ceeb: Changed: the development validation also checks the keys of
form,filtersandsort:inptus,intialorfeildsthrow "did you mean … ?" instead of being ignored without a word. -
f8c071c: Fixed: the pagination and the views' labels go through the dictionary, with English keys, instead of staying in French or hard-coded — the half-translated "Showing 1 to 30 of 31 results" becomes a key with variables
-
f799450: Changed: a write that fails without an answer says "The server could not be reached.", and one the API refuses without a detail (an HTML 500) shows its status, instead of a bare "An error occurred"
The toast of
useResourceMutationand the one of the forms now follow the same rules as the load error: the API's detail when it gave one, else " — The server answered with an error.", else, for afetchthat never got an answer, "The server could not be reached.".