Repository navigation
v0.2.7
App-owned slash menus with icons and groups, @ mentions, painted fences, app link cards and any-scheme links, searchable submenus, block caret height, and grey hairlines.
New
editor::AppExt::set_slash_itemsreplaces the slash menu's items, which areeditor::slash_defaults()until it is called. ASlashItemis aRow(SlashRow)with a label, optional icon andSlashAction, or aGroupof rows behind a submenu with its own icon.SlashAction::Blockturns the block into aBlockKind;SlashAction::Runhands the app aSlashAtwith the editor and block index.- The default slash rows carry block glyphs, with quotes and callouts behind one
Quotegroup. A query ranks rows across groups; a group with several matches stays a submenu and a lone match stands as its own row. Chrome::mentionturns on an@menu over the rows fromeditor::AppExt::set_mention_source. Picking aMentionreplaces@querywith a chip linking its URL.markdown::BlockRendererreceives aFencewith its language, code and an optionalrewritethat writes new code as an undoable edit. Painted fences sit insidePAINTED_CONTEXT, so keys typed into their controls stay there;LeaveBlockreturns focus to the document.Editing::fencetakes aFenceHost, andEditor::set_code,Editor::place_blockandDoc::set_codeback it.markdown::AppExt::set_link_cardinstalls aLinkCardpainter for links the app owns, in place of the bookmark.LinkPreview::glyphpaints an app icon where a favicon would go; a chip with one opens no hover card.- Explicit links and autolinks accept any
scheme://URL.markdown::is_linktests for one;is_urlstill decides what bare text links itself as. Item::searchableopens a submenu with a focused query field that narrows its rows by label and description and scrolls pastSEARCH_ROWS.ui::menu::initinstalls its keys;ui::menu::bindingsreturns them.ui::AppExt::set_caret_heightmakes block carets fill the line (CaretHeight::Line, the default) or stand as tall as the text (CaretHeight::Text).Theme::border_faintis the faintest hairline, andTheme::drop_targetfills a pane docking preview when no material paints it.
Changed
BlockRenderertakes&Fenceinstead of separate language and code arguments.Themehasborder_faintanddrop_targetfields; struct literals must include them.- Hairline ink is a light grey on dark and a dark grey on light instead of pure white or black.
popover::divider,popover::menu_sectionandpopover::dialog_fieldtake&Theme.- Canvas selection rings and handles are 1px in the theme's
ringcolor instead of the accent. - The pane docking preview is a thin material where materials are on, and
Theme::drop_targetotherwise. drag::Carry::hosttakes the origin the target draws the ghost at.- gpui is updated to 0.3.16.
Fixed
- Enter at the start of a block moves the whole block down under an empty paragraph, so a heading keeps its level.
- Dropped drag items, including custom ghosts and tabs hosted by a dock, settle from where they were last drawn.