[xwiki/xwiki-platform] e4980e: XWIKI-24831: Add the Records macro with its Live D...
Branch: refs/heads/XWIKI-24831 Home: https://github.com/xwiki/xwiki-platform Commit: e4980e6240b49c96d405241e12942b89d2d5d52c https://github.com/xwiki/xwiki-platform/commit/e4980e6240b49c96d405241e12942... Author: Manuel Leduc <[email protected]> Date: 2026-10-06 (Tue, 06 Oct 2026) Changed paths: M pnpm-lock.yaml M pnpm-workspace.yaml M xwiki-platform-core/pom.xml A xwiki-platform-core/xwiki-platform-records/pom.xml A xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/pom.xml A xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/main/java/org/xwiki/records/internal/macro/RecordsMacro.java A xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/main/java/org/xwiki/records/macro/RecordsColumns.java A xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/main/java/org/xwiki/records/macro/RecordsDataType.java A xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/main/java/org/xwiki/records/macro/RecordsMacroParameters.java A xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/main/resources/ApplicationResources.properties A xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/main/resources/META-INF/components.txt A xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/main/resources/templates/html_displayer/recordscolumns/edit.vm A xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/main/resources/templates/html_displayer/recordsdatatype/edit.vm A xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/test/java/org/xwiki/records/internal/macro/RecordsMacroTest.java A xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-webjar/pom.xml A xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-webjar/src/main/node/eslint.config.ts A xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-webjar/src/main/node/package.json A xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-webjar/src/main/node/src/__tests__/dialog.test.ts A xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-webjar/src/main/node/src/__tests__/fieldPicker.test.ts A xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-webjar/src/main/node/src/dialog.ts A xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-webjar/src/main/node/src/fieldPicker.ts A xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-webjar/src/main/node/src/index.ts A xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-webjar/src/main/node/src/xwiki.d.ts A xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-webjar/src/main/node/tsconfig.app.json A xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-webjar/src/main/node/tsconfig.json A xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-webjar/src/main/node/tsconfig.node.json A xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-webjar/src/main/node/tsconfig.vitest.json A xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-webjar/src/main/node/vite.config.ts A xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-webjar/src/main/node/vitest.config.ts Log Message: ----------- XWIKI-24831: Add the Records macro with its Live Data mapping Grows the Records macro prototype into a first shippable increment: the macro now renders a real table instead of echoing its parameters, its columns are picked rather than typed, and both halves are tested. * Live Data mapping. The macro owns no rendering: it maps its parameters onto a Live Data backed by the liveTable source and hands them to LiveDataRenderer, the component the liveData macro itself uses. Only class needs work, becoming a className source parameter; the rest are passed through, so a value means the same thing here as it would in a liveData macro. The doc.* headers are translated through a translationPrefix the macro sets itself, as the documents macro does. * The default column list is resolved by the macro. The liveTable source needs an explicit list: given none it renders a table with no columns at all, not one with every column, so an author who omitted the parameter got an empty table. The macro therefore asks the source for the data type's property descriptors, through LiveDataSourceManager so that the PER_LOOKUP source gets its className, and uses the data type's own fields in declaration order. The entry metadata and the Live Data pseudo-columns are left out: the default describes the data type, and an author can add any doc.* column themselves. This is what the documents macro does too, for the same reason. * No advanced configuration is passed, deliberately. LiveDataRenderer marks the content trusted only when the advanced configuration is blank or the author holds script right, so using it would downgrade every table authored without that right and get the link displayers sanitized away. * A TypeScript webjar holds the JavaScript. The columns parameter is a suggester whose candidates come from the Live Data properties REST resource for the data type currently selected. No declarative way to depend on a sibling parameter exists, but a suggester's data source is a callback invoked per keystroke rather than a URL fixed when the displayer template was rendered, so it can read the class input at query time. The coupling is to the input named after the parameter, which is the contract the macro editor itself relies on to assemble a macro call, and nothing else in the editor's DOM is touched. * The bundle is loaded as a classic script and exports nothing. The macro editor builds each parameter field detached and only then appends it to the dialog; jQuery evaluates the field's scripts at that append, and it refuses to fetch a type="module" script by src while evaluating every other one as a classic script. A module script is therefore silently skipped, and a bundle carrying an ES export fails to parse, so the entry point stays free of imports and exports and registers itself with define() for RequireJS instead. * The tabs are hidden until a data type is picked. Every tab is derived from it, so there is nothing to offer before it is set, and the macro editor has no disabled state for a group: the choice is between a tab that is reachable with nothing in it and no tab at all. * Changing the data type warns before discarding the parameters derived from it, then resets the columns, the filters and the sort to their defaults. A column, filter or sort naming a field the new data type does not have would render a table the author cannot explain, and the suggest widget caches its candidates, so the stale ones are dropped too. Declining the warning puts the previous data type back, in the enhanced widget as well as in the element. * The columns element does not carry the xwiki-selectize class. xwiki.selectize.js auto-enhances every element carrying it on xwiki:dom:updated, with default settings and so without the load callback this picker exists for, and $.fn.xwikiSelectize skips an element that is already enhanced. Owning the enhancement means keeping that class off. * Parameter groups follow the dialog the framework can actually build. class is mandatory and ungrouped, so it is rendered as a bare field above the tab strip; it will want a group again once location joins it, but a panel headed Data around a single Data type field earns nothing today. Every optional parameter, in contrast, must carry an explicit group: an ungrouped one is added to the framework's default group, which is pinned at order 0 and which no Java macro can reorder, so it would surface as the first tab ahead of Columns. A mandatory parameter never reaches that branch, which is why class is exempt. * A translation bundle, so the tabs read as names rather than raw group ids. Two parameters the design calls for are left out rather than shipped wrong. location needs an exact prefix predicate the liveTable source cannot express, so it waits on the results page this module will ship. editable maps onto the per-property flag of the Live Data configuration, which is the advanced configuration ruled out above. Tests: 16 Java tests covering the mapping (100% instruction coverage), 37 TypeScript tests covering the picker and the dialog behaviours. The picker's tests are written against the shape the properties resource really answers with, which is an envelope carrying the descriptors under properties rather than a bare array, and against the pseudo-columns it reports next to the real fields. Commit: d8a86d32f7ae9c8c079ba6875dd2da9da53f19c9 https://github.com/xwiki/xwiki-platform/commit/d8a86d32f7ae9c8c079ba6875dd2d... Author: Manuel Leduc <[email protected]> Date: 2026-10-06 (Tue, 06 Oct 2026) Changed paths: M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/main/java/org/xwiki/records/internal/macro/RecordsMacro.java M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/main/java/org/xwiki/records/macro/RecordsMacroParameters.java M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/main/resources/ApplicationResources.properties M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/test/java/org/xwiki/records/internal/macro/RecordsMacroTest.java Log Message: ----------- XWIKI-24831: Open the default column list with the entry title A Records table left with no explicit columns showed the data type's fields and nothing else, so a reader had no way to tell one entry from another and no way to reach the page an entry lives in. The title column is what makes the rest of the row mean something, and it is the first column of every mockup in the design. The default is now doc.title followed by the data type's fields, in declaration order. Naming any column still replaces the list entirely, so an author who wants the fields alone can say so. The rest of the entry metadata stays out: the title is the only piece of it the default needs, and the author can add any doc.* column. A data type with no field of its own now yields a one-column table a reader can still use, rather than no columns at all. Commit: c94814aa3191376fe121ca92c759d68974565ac3 https://github.com/xwiki/xwiki-platform/commit/c94814aa3191376fe121ca92c759d... Author: Manuel Leduc <[email protected]> Date: 2026-10-06 (Tue, 06 Oct 2026) Changed paths: M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/main/java/org/xwiki/records/macro/RecordsMacroParameters.java M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/main/resources/ApplicationResources.properties Log Message: ----------- XWIKI-24831: Say what the description parameter actually does The parameter said the description was "announced to assistive technology", which reads as though it were screen-reader only. It is not: Live Data renders it as a plain visible paragraph above the table (LivedataLayout.vue), in normal flow, and additionally points the layout at it with aria-describedby. An author choosing whether to fill the field needs to know it will be on the page. Note also that it is the table's accessible *description*, not its name, which is a different ARIA concept and is what the design page claimed. Commit: 622628575378dd90f2f2d11af19d34551ceaf115 https://github.com/xwiki/xwiki-platform/commit/622628575378dd90f2f2d11af19d3... Author: Manuel Leduc <[email protected]> Date: 2026-10-06 (Tue, 06 Oct 2026) Changed paths: M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/main/java/org/xwiki/records/internal/macro/RecordsMacro.java M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/test/java/org/xwiki/records/internal/macro/RecordsMacroTest.java Log Message: ----------- XWIKI-24831: Always give the table a unique identifier Live Data builds the element id of a table's description as <id>-description and points at it with aria-describedby, so a table without an id got the literal id "undefined-description". Harmless alone, but two such tables on one page shared that element id and the second was described by the first one's text. The macro now always hands Live Data an id, taken from the document's IdGenerator rather than a counter of its own, so a Records table takes its place among the ids the rest of the page generates -- headings included -- and cannot collide with them: * No id from the author yields "records", then "records-1", "records-2" for each further table on the page. * An authored id is kept as it is when it is unique, and suffixed the same way when another table already uses it. Two details of IdGenerator worth knowing. adaptId takes the first character of an id as its prefix and rejects one that is not a letter, so an id the author starts with a digit is prefixed instead of refused. And a macro executed outside a document has no XDOM and so no generator, which still has to yield an id. This makes the id parameter more than a way of keeping each table's reader state apart, which is all its description claims; that wording should follow. Commit: 1e15c0b7e334c9bfa003e4d1dfadb7e7ef84b66f https://github.com/xwiki/xwiki-platform/commit/1e15c0b7e334c9bfa003e4d1dfadb... Author: Manuel Leduc <[email protected]> Date: 2026-10-06 (Tue, 06 Oct 2026) Changed paths: M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/main/java/org/xwiki/records/internal/macro/RecordsMacro.java A xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/main/java/org/xwiki/records/macro/RecordsLayouts.java M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/main/java/org/xwiki/records/macro/RecordsMacroParameters.java M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/main/resources/ApplicationResources.properties A xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/main/resources/templates/html_displayer/recordslayouts/edit.vm M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/test/java/org/xwiki/records/internal/macro/RecordsMacroTest.java Log Message: ----------- XWIKI-24831: Close the layout choice and drop the entries per page * The layout is now picked from two radio buttons, table and cards, rather than typed as a comma-separated list of layout identifiers. The dialog is in a position to name the layouts a table of records can reasonably use, and an author who needs anything else has the liveData macro. The widget needs no JavaScript of its own: the macro editor already keeps a radio group together and checks the one matching the parameter value. * The entries per page parameter is gone. Nothing is lost by leaving it out: an unset limit is Live Data's own default of fifteen, and the reader can change the page size from the pagination controls anyway, so the parameter only chose a starting point. Commit: 9ffba0f50749af9c504ef3864efd9d560be4e6c5 https://github.com/xwiki/xwiki-platform/commit/9ffba0f50749af9c504ef3864efd9... Author: Manuel Leduc <[email protected]> Date: 2026-10-06 (Tue, 06 Oct 2026) Changed paths: M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-webjar/src/main/node/src/index.ts Log Message: ----------- XWIKI-24831: Hide the columns placeholder once columns are picked The columns field is a multiple-value suggest widget, and the suggest widget is backed by Tom Select, whose hidePlaceholder setting defaults to `mode !== 'multi'`. So the placeholder stayed next to the selected items. Here it names the default column list, which means it was telling the author the table shows the title and every field while they were looking at the columns they had just picked. Commit: 163efa485bae00aac9ed1fdaaa7305d03b7e2d04 https://github.com/xwiki/xwiki-platform/commit/163efa485bae00aac9ed1fdaaa730... Author: Manuel Leduc <[email protected]> Date: 2026-10-06 (Tue, 06 Oct 2026) Changed paths: M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/main/java/org/xwiki/records/macro/RecordsMacroParameters.java A xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/main/java/org/xwiki/records/macro/RecordsSort.java M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/main/resources/ApplicationResources.properties A xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/main/resources/templates/html_displayer/recordssort/edit.vm A xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-webjar/src/main/node/src/__tests__/sortPicker.test.ts M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-webjar/src/main/node/src/fieldPicker.ts M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-webjar/src/main/node/src/index.ts A xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-webjar/src/main/node/src/sortPicker.ts Log Message: ----------- XWIKI-24831: Pick the sort criteria instead of typing them The sort parameter now uses a suggester offering each field of the data type twice, once ascending and once descending, so a criterion is one choice and the direction is never typed. The platform has a generic sort widget, uicomponents/widgets/sortPicker.js, and it is deliberately not used: it edits a single criterion through a field select and an order select, while this parameter holds an ordered list of criteria. The suggester's drag-and-drop plugin is what lets that order be authored. That widget would also need its field select filled from the sibling class parameter, which is the same client-side work as this picker, so it would buy the harder half and still lose the list. A stored criterion is resolved exactly rather than searched, because the suggester refuses free text: a criterion naming no direction, or naming a field the data type no longer has, would otherwise be dropped the next time the dialog opens. The lookup of the selected data type is now shared between the pickers rather than repeated. Commit: 1851649795b20e836c2226a9a40af7c9d09913cd https://github.com/xwiki/xwiki-platform/commit/1851649795b20e836c2226a9a40af... Author: Manuel Leduc <[email protected]> Date: 2026-10-06 (Tue, 06 Oct 2026) Changed paths: A xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/main/java/org/xwiki/records/macro/RecordsFilters.java M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/main/java/org/xwiki/records/macro/RecordsMacroParameters.java M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/main/resources/ApplicationResources.properties A xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/main/resources/templates/html_displayer/recordsfilters/edit.vm A xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-webjar/src/main/node/src/__tests__/filterPicker.test.ts M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-webjar/src/main/node/src/fieldPicker.ts A xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-webjar/src/main/node/src/filterPicker.ts M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-webjar/src/main/node/src/index.ts Log Message: ----------- XWIKI-24831: Suggest the fields and the values of a filter The filters parameter now uses a suggester holding one item per field=value constraint, which is what the renderer parses the query string into. The suggestions come in two steps, since only the author knows which field they mean: the fields until a = is typed, then that field's values. Picking a field puts "field=" back in the text box rather than leaving half a constraint behind as an item. The values are not invented here. The Live Data properties resource already reports a filter.searchURL for every property whose values are enumerable, with an {encodedQuery} placeholder, and it is the same URL the Live Data filter row queries, so the dialog offers what a reader would be offered in the rendered table. A property without one is filtered by typing, which is why this is the only picker of this dialog that accepts free text. A suggested value is percent-encoded, because the renderer URL-decodes each half of a constraint: a value holding & or = would otherwise be read as another constraint. Repeating a field is left possible, since the renderer turns that into two constraints on that field, and it works because an item's value is the whole pair. Commit: a64a51b0b8f5e38b1f6152b94652807f5dcd6c2b https://github.com/xwiki/xwiki-platform/commit/a64a51b0b8f5e38b1f6152b946528... Author: Manuel Leduc <[email protected]> Date: 2026-10-06 (Tue, 06 Oct 2026) Changed paths: M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-webjar/src/main/node/src/__tests__/sortPicker.test.ts M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-webjar/src/main/node/src/index.ts M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-webjar/src/main/node/src/sortPicker.ts Log Message: ----------- XWIKI-24831: Stop offering a field that is already sorted on Both directions of a field disappear from the sort suggestions once that field is used, rather than only the criterion picked. Sorting a field twice says nothing the first criterion did not already say, and offering the pair invites reading it as a choice between directions when it is not one. The widget caches what it has loaded per query and keeps the options it has already seen, so neither the filtering at load time nor a removal would show through on its own. Adding or removing a criterion therefore drops the options that are not backing a selected one, which also clears that cache, and the next dropdown loads the rest afresh. Commit: 82a73cb7f28af7adb32bd6754b21837523b766bc https://github.com/xwiki/xwiki-platform/commit/82a73cb7f28af7adb32bd6754b218... Author: Manuel Leduc <[email protected]> Date: 2026-10-06 (Tue, 06 Oct 2026) Changed paths: M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/pom.xml M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/main/java/org/xwiki/records/internal/macro/RecordsMacro.java M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/main/java/org/xwiki/records/macro/RecordsMacroParameters.java M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/main/resources/ApplicationResources.properties M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-webjar/src/main/node/src/index.ts Log Message: ----------- XWIKI-24831: Call the picked class an object type, as the search facet does The macro dialog, the descriptions and the reset warning now say "object type" where they said "data type". The default search already labels its facet filtering pages by class "Object type", and the two select the same pages, so a reader moving from one to the other should meet the same word. The UI also says "Objects of type {0}" elsewhere. Only the wording users read changes: the code identifiers keep "data type" while the vocabulary discussion on the forum is still open, so that a later rename touches the facet and this macro together. Commit: 33fb1f56a9db81d7c933158e1475cd1ca7913a04 https://github.com/xwiki/xwiki-platform/commit/33fb1f56a9db81d7c933158e1475c... Author: Manuel Leduc <[email protected]> Date: 2026-10-06 (Tue, 06 Oct 2026) Changed paths: M xwiki-platform-core/xwiki-platform-records/pom.xml M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/pom.xml M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/main/java/org/xwiki/records/internal/macro/RecordsMacro.java M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/main/java/org/xwiki/records/macro/RecordsColumns.java M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/main/java/org/xwiki/records/macro/RecordsDataType.java M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/main/java/org/xwiki/records/macro/RecordsFilters.java M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/main/java/org/xwiki/records/macro/RecordsLayouts.java M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/main/java/org/xwiki/records/macro/RecordsMacroParameters.java M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/main/java/org/xwiki/records/macro/RecordsSort.java M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-webjar/pom.xml Log Message: ----------- XWIKI-24831: Move the Records modules to 18.9.0-SNAPSHOT The branch is now rebased on master, which is on 18.9.0-SNAPSHOT, so the module versions follow and the new APIs are introduced in 18.9.0RC1. Commit: 95624e2086dfed834428842d892471a7b2920c2f https://github.com/xwiki/xwiki-platform/commit/95624e2086dfed834428842d89247... Author: Manuel Leduc <[email protected]> Date: 2026-10-06 (Tue, 06 Oct 2026) Changed paths: M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/pom.xml M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/main/java/org/xwiki/records/internal/macro/RecordsMacro.java M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/main/resources/ApplicationResources.properties M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/test/java/org/xwiki/records/internal/macro/RecordsMacroTest.java Log Message: ----------- XWIKI-24831: Degrade to a legible message when the object type or a field is gone A column, a sort criterion or a filter naming a field the object type no longer has used to reach Live Data as is, which is where the failure surfaced. The macro now reads the identifiers the source offers before rendering and drops what is gone, with a warning above the table naming the field and the object type. When no authored column is left, the default columns apply rather than a table without any. A deleted object type replaces the table by a single message, and the macro call is left untouched so that restoring the object type restores the table. Every message the macro produces, errors included, now goes through translation keys and says what happened and what to do in the words of the design page, instead of exposing parameter names and the Live Data source. The technical detail stays in the exception cause. Commit: f1269e8d5f454021360bd86cd39ea72237b10b86 https://github.com/xwiki/xwiki-platform/commit/f1269e8d5f454021360bd86cd39ea... Author: Manuel Leduc <[email protected]> Date: 2026-10-06 (Tue, 06 Oct 2026) Changed paths: M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/main/resources/ApplicationResources.properties M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-webjar/pom.xml M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-webjar/src/main/node/src/__tests__/sortPicker.test.ts M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-webjar/src/main/node/src/index.ts M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-webjar/src/main/node/src/sortPicker.ts Log Message: ----------- XWIKI-24831: Translate the strings the macro dialog displays The warning shown before the object type changes, the labels of the sort directions and of the two groups of the columns picker were hard-coded in English in the webjar. They are now keys of the macro's translation bundle, loaded through the xwiki-l10n module that every page already has, which resolves them for the language of the current user. The module defining the keys is registered by the bundle itself, in the same way the BlockNote webjar does, so that the displayer templates still load it as a classic script. The native confirm is kept: only its text was the problem. A key missing from the bundle shows up as its identifier rather than as an empty label. Commit: 750ca36b4c5d22df5f860c9e38d84373ae264417 https://github.com/xwiki/xwiki-platform/commit/750ca36b4c5d22df5f860c9e38d84... Author: Manuel Leduc <[email protected]> Date: 2026-10-06 (Tue, 06 Oct 2026) Changed paths: M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/main/java/org/xwiki/records/internal/macro/RecordsMacro.java M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/main/java/org/xwiki/records/macro/RecordsMacroParameters.java M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/main/resources/ApplicationResources.properties M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/test/java/org/xwiki/records/internal/macro/RecordsMacroTest.java M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-webjar/src/main/node/src/__tests__/fieldPicker.test.ts M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-webjar/src/main/node/src/__tests__/filterPicker.test.ts M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-webjar/src/main/node/src/__tests__/sortPicker.test.ts M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-webjar/src/main/node/src/fieldPicker.ts Log Message: ----------- XWIKI-24831: Call the doc.* columns page metadata, not entry metadata The group of the columns picker and the description of the Columns parameter said "Entry metadata" for the doc.* columns. The forum discussion kept page concepts for those columns, and the design page speaks of page metadata, so the dialog now uses that wording. The entries themselves are still called entries. Only the wording changes, including the comments that repeated it; the code identifiers are kept. Commit: 36b5fcc0d4b3fbc9327fad91111f32b9cf2cb2b9 https://github.com/xwiki/xwiki-platform/commit/36b5fcc0d4b3fbc9327fad91111f3... Author: Manuel Leduc <[email protected]> Date: 2026-10-06 (Tue, 06 Oct 2026) Changed paths: M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-webjar/src/main/node/src/__tests__/fieldPicker.test.ts M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-webjar/src/main/node/src/dialog.ts M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-webjar/src/main/node/src/index.ts M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-webjar/src/main/node/src/xwiki.d.ts M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-webjar/src/main/node/tsconfig.vitest.json Log Message: ----------- XWIKI-24831: Type the RequireJS and suggest widget calls instead of casting them The translation keys module is defined through the typed name, dependencies and factory form of define, which gives RequireJS the same module value. The selectize instance the suggest widget stores on the element it enhances is declared once, globally, so the dialog reads it without a cast. The one test feeding a null name, which the typings forbid, says so with @ts-expect-error. Commit: 38c33824de5dbc78d2d921c857a6936c5df6936c https://github.com/xwiki/xwiki-platform/commit/38c33824de5dbc78d2d921c857a69... Author: Manuel Leduc <[email protected]> Date: 2026-10-06 (Tue, 06 Oct 2026) Changed paths: M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/pom.xml M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/main/java/org/xwiki/records/internal/macro/RecordsMacro.java M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/test/java/org/xwiki/records/internal/macro/RecordsMacroTest.java Log Message: ----------- XWIKI-24831: Show the warnings and errors through the message macros The warnings and the missing data type error are now calls to the warning and error macros instead of hand-made boxes, so they get the same look, icon and accessible name as {{warning}} and {{error}}. The message macros parse their content as wiki syntax while our messages embed names that come from the wiki (field ids, class references), so the translated text is run through the plain text parser and rendered back as XWiki syntax to escape it. Commit: cf939f4129fc7effd746fbe85ef0e76c2c348387 https://github.com/xwiki/xwiki-platform/commit/cf939f4129fc7effd746fbe85ef0e... Author: Manuel Leduc <[email protected]> Date: 2026-10-06 (Tue, 06 Oct 2026) Changed paths: M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/main/resources/templates/html_displayer/recordsfilters/edit.vm M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-webjar/src/main/node/src/index.ts Log Message: ----------- XWIKI-24831: Save several filters with & so that they all apply * Render the filters field as a text input rather than a multiple select. The macro editor joins the values of a multiple select with a comma, which Live Data read as part of the first constraint's value, so two filters matched nothing. With a text input, the suggest widget builds the &-separated value itself. * A stored value such as status=Active&status=Draft now reopens as two items instead of one. Commit: 9d0b787d8e6a7c3307fc8ca272faaa3018868ba1 https://github.com/xwiki/xwiki-platform/commit/9d0b787d8e6a7c3307fc8ca272faa... Author: Manuel Leduc <[email protected]> Date: 2026-10-06 (Tue, 06 Oct 2026) Changed paths: M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-webjar/src/main/node/src/index.ts Log Message: ----------- XWIKI-24831: Clear the typed text once a suggested filter is picked * Tom Select keeps the search text when a suggested option is picked, so the text left over from picking status=published was prepended to the next constraint. Commit: 89510e960066b072b291993ef0217f6ff62b65d9 https://github.com/xwiki/xwiki-platform/commit/89510e960066b072b291993ef0217... Author: Manuel Leduc <[email protected]> Date: 2026-10-06 (Tue, 06 Oct 2026) Changed paths: M xwiki-platform-core/xwiki-platform-records/pom.xml A xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-test/pom.xml A xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-test/xwiki-platform-records-test-docker/pom.xml A xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-test/xwiki-platform-records-test-docker/src/test/it/org/xwiki/records/test/ui/AllIT.java A xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-test/xwiki-platform-records-test-docker/src/test/it/org/xwiki/records/test/ui/RecordsMacroIT.java A xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-test/xwiki-platform-records-test-pageobjects/pom.xml A xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-test/xwiki-platform-records-test-pageobjects/src/main/java/org/xwiki/records/test/po/RecordsMacroEditModal.java Log Message: ----------- XWIKI-24831: Add a functional test for the filters of the Records macro dialog * Add the xwiki-platform-records-test modules, with a page object for the tabbed macro dialog and a docker test. * The test picks two filters, checks that they are saved with & and that the table shows the one entry matching both, reopens the dialog, and checks that a field named twice opens as two items. Commit: 75f154371fa1eddd28c927caa7a30d5eb976a69d https://github.com/xwiki/xwiki-platform/commit/75f154371fa1eddd28c927caa7a30... Author: Manuel Leduc <[email protected]> Date: 2026-10-06 (Tue, 06 Oct 2026) Changed paths: M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/pom.xml M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/main/java/org/xwiki/records/internal/macro/RecordsMacro.java M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/test/java/org/xwiki/records/internal/macro/RecordsMacroTest.java Log Message: ----------- XWIKI-24831: Keep the authored columns, filters and sort for a reader who cannot view the object type * The liveTable source reports the fields of an object type only to a reader who can view it, so for any other reader every authored field looked gone: the columns, filters and sort were dropped with warnings about fields that exist, and the filtered-out entries were shown. * The authored fields are now checked only when the reader can view the object type, and passed through unchanged otherwise. Commit: 0ae65a12666c3162584d13aa31a80b9f057ae3bc https://github.com/xwiki/xwiki-platform/commit/0ae65a12666c3162584d13aa31a80... Author: Manuel Leduc <[email protected]> Date: 2026-10-06 (Tue, 06 Oct 2026) Changed paths: M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/main/java/org/xwiki/records/internal/macro/RecordsMacro.java M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/main/resources/ApplicationResources.properties M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/test/java/org/xwiki/records/internal/macro/RecordsMacroTest.java M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-webjar/src/main/node/src/__tests__/filterPicker.test.ts M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-webjar/src/main/node/src/filterPicker.ts M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-webjar/src/main/node/src/index.ts Log Message: ----------- XWIKI-24831: Encode the filter values the author types, and ignore a filter that cannot be read * A value typed in the filters picker is now percent-encoded like a suggested one, so 100% no longer makes the whole table fail to load and C++ is no longer read as "C ". Typed text with no field and value creates no item. * The picker reads a + in a stored value as a space, as the renderer does, and searches value suggestions with the text as typed. * A hand-written filter the renderer cannot decode is dropped with a warning, instead of replacing the table with an error or failing the macro. Commit: c64a891001b1f611e68a4f0b2ff33d98f2afff91 https://github.com/xwiki/xwiki-platform/commit/c64a891001b1f611e68a4f0b2ff33... Author: Manuel Leduc <[email protected]> Date: 2026-10-06 (Tue, 06 Oct 2026) Changed paths: M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/main/resources/ApplicationResources.properties M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-webjar/src/main/node/src/__tests__/dialog.test.ts M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-webjar/src/main/node/src/__tests__/fieldPicker.test.ts M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-webjar/src/main/node/src/dialog.ts M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-webjar/src/main/node/src/fieldPicker.ts M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-webjar/src/main/node/src/index.ts M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-webjar/src/main/node/src/xwiki.d.ts Log Message: ----------- XWIKI-24831: Tell the author when the fields of the object type could not be loaded, or the object type no longer exists * A failed properties request shows "The fields of {0} could not be loaded." under the picker, with a Try again button, instead of an empty list; the chosen values are kept * Reopening the dialog on an object type the properties resource reports no field for (deleted or not viewable) warns on the object type picker and focuses it * A failed value suggestion in the filters picker falls back to free typing Commit: 8ebe522ded662955567f0c42fb7e71445b75a6f3 https://github.com/xwiki/xwiki-platform/commit/8ebe522ded662955567f0c42fb7e7... Author: Manuel Leduc <[email protected]> Date: 2026-10-06 (Tue, 06 Oct 2026) Changed paths: M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/main/resources/templates/html_displayer/recordscolumns/edit.vm M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/main/resources/templates/html_displayer/recordsfilters/edit.vm M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/main/resources/templates/html_displayer/recordssort/edit.vm M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-webjar/src/main/node/vite.config.ts Log Message: ----------- XWIKI-24831: Build the dialog script as an IIFE so that its names do not overwrite the page's globals * The displayer templates load the bundle as a classic script, so the top-level names of the ES bundle were globals; the minifier named one `$`, which overwrote Prototype's and broke the page * The bundle is now index.js, in the "iife" format, and the templates load that file Commit: 8d3469dd84eea91fc86619fad17dd366b3eb53a1 https://github.com/xwiki/xwiki-platform/commit/8d3469dd84eea91fc86619fad17dd... Author: Manuel Leduc <[email protected]> Date: 2026-10-06 (Tue, 06 Oct 2026) Changed paths: M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-webjar/src/main/node/src/index.ts M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-webjar/src/main/node/src/xwiki.d.ts Log Message: ----------- XWIKI-24831: Do not focus the object type picker when warning that the object type no longer exists * Focusing it opens its dropdown, which covers the warning Commit: 16d058ee496bafc6997151543e20107af0cbe178 https://github.com/xwiki/xwiki-platform/commit/16d058ee496bafc6997151543e201... Author: Manuel Leduc <[email protected]> Date: 2026-10-06 (Tue, 06 Oct 2026) Changed paths: M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/main/java/org/xwiki/records/internal/macro/RecordsMacro.java M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/main/resources/ApplicationResources.properties M xwiki-platform-core/xwiki-platform-records/xwiki-platform-records-macro/src/test/java/org/xwiki/records/internal/macro/RecordsMacroTest.java Log Message: ----------- XWIKI-24831: Ignore a filter or a sort criterion the type of its field no longer allows, and say so * Read whether each field can be sorted and filtered on, and with which filter, from its descriptor and from the defaults of the liveTable source for its type, as Live Data does. * Drop a filter on a field that cannot be filtered on, and a filter value a number or boolean field cannot match, which made the liveTable source return no entry at all. * Drop a sort criterion on a field that cannot be sorted on, and name what the table is sorted on instead, or say that it is not sorted. Compare: https://github.com/xwiki/xwiki-platform/compare/dbf0af78eba2...16d058ee496b To unsubscribe from these emails, change your notification settings at https://github.com/xwiki/xwiki-platform/settings/notifications
participants (1)
-
XWiki Notifications