Skip to content

From 06 to 07

github-actions[bot] edited this page Nov 25, 2026 · 1 revision

Migrating from 0.6 to 0.7

0.7 is a minor release of a pre-1.0 crate, so it carries breaking changes. This page gathers the ones that need a code change. Each crate's CHANGELOG.md lists everything, in more detail.

Rich text editor

The rich text editor moved from blinc_layout to blinc_cn, so that its toolbar can use the cn components. Change the import path. The functions, types and CSS classes keep their names.

// 0.6
use blinc_layout::widgets::rich_text_editor::{RichDocument, rich_text_editor, rich_text_state};

// 0.7
use blinc_cn::components::rich_text_editor::{RichDocument, rich_text_editor, rich_text_state};

With the blinc facade crate, the path is blinc::cn::components::rich_text_editor. Its rules are part of CN_STYLES, so a theme bundle that sets only the layout stylesheet must add CN_STYLES to style the editor.

The editor's CSS classes carry the cn prefix: .blinc-rich-text is now .cn-rich-text-editor-document, the root .blinc-rich-text-editor is .cn-rich-text-editor, and the other .blinc-rich-text-* and .blinc-rte-* classes are .cn-rich-text-editor-*. The caret variable --blinc-rich-text-caret is --cn-rich-text-editor-caret.

The toolbar is built from cn components, and PickerState and RichTextData::picker are removed: the colour picker, the heading select and the link popover keep their own open state.

BlockKind has TaskItem { checked } and Table { columns } variants, so a match on it needs arms for them. It has no Quote variant: Block::quote is a flag on a paragraph or a heading, and Block::quote(text, color) makes a quoted paragraph. Code that builds a Block field by field must set quote. Use BlockKind::is_list_item where any list will do. LineGeometry has a cell field, and RichTextData::line_at_y is now line_at, which takes the point's x too.

Block has an align field, so code that builds one field by field must set it. Use Default::default(), or the constructors such as Block::paragraph, which do.

The editor now wraps its text to the width it is laid out at. The width passed to rich_text_editor is the width it wraps to until its first layout, so an editor in a parent of another width wraps differently than in 0.6. Give the parent the width the editor should have.

NotchRenderData is removed. A Notch is a Div element whose RenderProps::notch holds its outline, so code that matched on it as a canvas needs no change, and a stylesheet rule on its class now sets its fill, border, radius and shadow.

Navigation

Getting Started

Migrating

Mobile Development

Example Gallery

Web Development

Core Concepts

Animation

Components

Component Library (blinc_cn)

Widgets

Canvas Kit

Advanced

Architecture

Contributing

Clone this wiki locally