Skip to content

RustCMS v0.13.1

Choose a tag to compare

@irisvn irisvn released this 17 Nov 10:14

RustCMS v0.13.1. Install: https://irisvn.github.io/RustCMS/ (guide, install scripts).

Built from irisvn/RustCMS-Core v0.13.1.

— 2026-11-17

Added

  • Rich text document version 3 (vocabulary 18, ADR 0042; contributed by
    @giangittb112000): underline, superscript and subscript marks (<u>,
    <sup>, <sub> in HTML), and application elements:
    AdminProvider::rich_text_node(RichTextNode::inline_atom("app.kbd").attr("keys", Attr::text()))
    declares an atom with typed attributes (text, integer, boolean,
    one_of, uuid; .label(..); defaults filled in before storing, at most
    1 KiB per element), and Field::rich_text().nodes([...]) names the ones a
    field accepts (none by default). Checked on every write; at most 500 per
    document, which is bounded to 256 KiB once its defaults are filled in;
    block elements never inside a callout; the attribute name node is
    reserved. The editor inserts them from an Insert an element menu; an
    extension draws and edits them with registerRichTextNode(name, { view, edit }) (SDK ui 4), else a placeholder and a generated form. A document
    holding elements the field no longer accepts opens read-only with a button
    that removes them. Exported HTML writes them as <span|div data-node data-{attr}> with the declaration's .text (rich_text::Html,
    AppNodes::parse). The server stores every document in the lowest version
    it needs (1, 2 or 3), whoever writes it. Demo: app.kbd and
    app.note_ref in posts.
  • Form reactions (vocabulary 19, ADR 0043; contributed by @giangittb112000):
    Input::reacts(|ctx, state| …) runs on the server when the user changes
    the input (POST form/react, after a pause in typing) and answers with
    FormPatches (set, set_if_empty, add_row, remove_row, move_row,
    flag_row, notice) the panel applies while the form is unchanged. The
    reaction reads what the user's form holds (ADR 0037: stored values only for
    a record the user may view, typed values only for fields they may write,
    the key a relation binds), FormState::previous() gives the changed
    input's earlier value; patches the user could not make are dropped and
    logged, the others sent canonical, conditions evaluated again after each;
    at most 200 patches. Admission and the rate limit (120 a minute) come
    before the body; 2 reactions at once per user. Resource forms only; saves
    never run reactions (the contribution's .strict() is not kept). A rich
    text editor draws a patched document. Demo: a category's slug follows its
    name.

Changed

  • rich_text::Mark is #[non_exhaustive] and has three new variants: an
    exhaustive match needs a _ arm. rich_text::VERSION is 3
    (upgrade_value still only lifts version 1 to 2); rich_text::parse
    refuses application elements (use AppNodes::parse). The SDK is ui 4:
    extensions rebuilt with it declare Requires { ui: 4, … } (rustcms make:sdk lists the registrations to update).
  • Admin panel: a rich text view whose value is not a document says it cannot
    be shown instead of showing its JSON (a legacy text value is still shown as
    it is).
  • Admin panel: the default view page (contributed by @giangittb112000). A
    record's view page without infolist() is drawn by an infolist made from
    its form at boot (InfolistSchema.fromForm, vocabulary 17), one read-only
    renderer instead of two; values look as before. Its conditions read fields
    as the edit form does (the values the form would hold, null where the
    form hides a field); a declared infolist still reads the stored values. A
    belongs_to field's title comes with the record (no request per value) and
    links to the related record when the user may list it; an encrypted field
    shows nothing (not even whether it is set). The view schema carries
    infolist only for a record (with a key). A list of records in a text
    entry shows as indented JSON; a field shown twice at one level no longer
    logs a duplicate key.

Fixed

  • Admin panel: opening a rich text editor reported a change (TipTap's
    setEditable), so a form could count as edited before any edit.