fix: relation picker page size refused by entry list
This commit is contained in:
1 parent
f2cdbcd3cb
commit
daba3c04c0
4 files changed
+24
-2
No files matched your search
@@ -44,3 +44,4 @@ Each body lives in `docs/releases/<tag>.md`. Publish with `tea releases create -
|
|||||||
| `v3.4.1-beta` | Media field and security updates |
|
| `v3.4.1-beta` | Media field and security updates |
|
||||||
| `v3.4.2-beta` | Security and privacy hardening |
|
| `v3.4.2-beta` | Security and privacy hardening |
|
||||||
| `v3.5.0-beta` | Relation field |
|
| `v3.5.0-beta` | Relation field |
|
||||||
|
| `v3.5.1-beta` | Relation picker fix |
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
This release fixes the Relation field picker, which could not load any entries.
|
||||||
|
|
||||||
|
## Improvements and fixes
|
||||||
|
|
||||||
|
- Choosing a target for a Relation field no longer fails with "Couldn't load" and a `400` error. The picker asked for pages of 10 entries, a size the entry list refuses, and now asks for 25.
|
||||||
|
|
||||||
|
## Upgrading
|
||||||
|
|
||||||
|
- Replace the binary, or pull the new image. No schema migration and no new environment variable.
|
||||||
@@ -14,7 +14,13 @@ import { ruleMessage } from '@/lib/entryMessages'
|
|||||||
import { groupFields } from '@/lib/entryLayout'
|
import { groupFields } from '@/lib/entryLayout'
|
||||||
import { classifyRefusal, parseEntryRefusal } from '@/lib/entryServerError'
|
import { classifyRefusal, parseEntryRefusal } from '@/lib/entryServerError'
|
||||||
import { FIELD_TYPES, fieldTypeSpec } from '@/lib/fieldTypes'
|
import { FIELD_TYPES, fieldTypeSpec } from '@/lib/fieldTypes'
|
||||||
import { isRelationId, relationIdsOf, summariesOf, type RelationSummary } from '@/lib/relationField'
|
import {
|
||||||
|
RELATION_PAGE_SIZE,
|
||||||
|
isRelationId,
|
||||||
|
relationIdsOf,
|
||||||
|
summariesOf,
|
||||||
|
type RelationSummary,
|
||||||
|
} from '@/lib/relationField'
|
||||||
import { relationRowOf } from '@/lib/relationRows'
|
import { relationRowOf } from '@/lib/relationRows'
|
||||||
import { ApiError } from '@/lib/apiError'
|
import { ApiError } from '@/lib/apiError'
|
||||||
import { diffFields } from '@/lib/schemaBuilderDiff'
|
import { diffFields } from '@/lib/schemaBuilderDiff'
|
||||||
@@ -481,3 +487,9 @@ describe('relation in the builder model', () => {
|
|||||||
expect(data.speakers).toEqual([])
|
expect(data.speakers).toEqual([])
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
describe('the picker page size', () => {
|
||||||
|
it('is one of the sizes the entry list endpoint accepts', () => {
|
||||||
|
expect([5, 25, 50, 100]).toContain(RELATION_PAGE_SIZE)
|
||||||
|
})
|
||||||
|
})
|
||||||
@@ -7,7 +7,7 @@ export type RelationKind = (typeof RELATION_KINDS)[number]
|
|||||||
|
|
||||||
export const DEFAULT_RELATION_KIND: RelationKind = 'one_to_many'
|
export const DEFAULT_RELATION_KIND: RelationKind = 'one_to_many'
|
||||||
export const RELATION_MAX = 50
|
export const RELATION_MAX = 50
|
||||||
export const RELATION_PAGE_SIZE = 10
|
export const RELATION_PAGE_SIZE = 25
|
||||||
|
|
||||||
const RELATION_ID_MAX = 4294967295
|
const RELATION_ID_MAX = 4294967295
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user