feat(14.2.1-03): document ML fields and regenerate admin artifacts

- Document markdown, mltext, and mlmarkdown plus TranslationWriter save semantics
- Extend the SPA registry tests and rebuild committed boardwalk dist

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Jakub Zych
2026-10-06 13:29:00 +02:00
parent a04116d41f
commit e3b3475b1c
9 changed files with 82 additions and 16 deletions

View File

@@ -7,6 +7,9 @@ import SwitchField from '../../src/components/form/fields/SwitchField.vue'
import TextField from '../../src/components/form/fields/TextField.vue'
import TextareaField from '../../src/components/form/fields/TextareaField.vue'
import PartialField from '../../src/components/form/fields/PartialField.vue'
import MarkdownField from '../../src/components/form/fields/MarkdownField.vue'
import MLMarkdownField from '../../src/components/form/fields/MLMarkdownField.vue'
import MLTextField from '../../src/components/form/fields/MLTextField.vue'
import PasswordField from '../../src/components/form/fields/PasswordField.vue'
import PermissionEditorField from '../../src/components/form/fields/PermissionEditorField.vue'
import UnsupportedField from '../../src/components/form/fields/UnsupportedField.vue'
@@ -177,3 +180,34 @@ describe('Phase 12.1 field types (UI-SPEC S5 and S7)', () => {
}
})
})
describe('markdown and multilingual field types (Phase 14.2.1)', () => {
it('registers markdown, mltext and mlmarkdown as editable types with their own controls', () => {
expect(rendererFor('markdown')).toBe(MarkdownField)
expect(rendererFor('mltext')).toBe(MLTextField)
expect(rendererFor('mlmarkdown')).toBe(MLMarkdownField)
expect(isRegistered('markdown')).toBe(true)
expect(isRegistered('mltext')).toBe(true)
expect(isRegistered('mlmarkdown')).toBe(true)
expect(needsRecord('markdown')).toBe(false)
expect(needsRecord('mltext')).toBe(false)
expect(needsRecord('mlmarkdown')).toBe(false)
})
it('labels markdown as an input and ML fields as groups', () => {
expect(ownsLabel('markdown')).toBe(false)
expect(ownsLabel('mltext')).toBe(false)
expect(ownsLabel('mlmarkdown')).toBe(false)
expect(groupLabelled('markdown')).toBe(false)
expect(groupLabelled('mltext')).toBe(true)
expect(groupLabelled('mlmarkdown')).toBe(true)
})
it.each(['mlunknown', 'MLTEXT', 'richtext', 'markdowneditor'])(
'falls back to UnsupportedField for unknown ML type %j',
(type) => {
expect(isRegistered(type)).toBe(false)
expect(rendererFor(type)).toBe(UnsupportedField)
},
)
})