Block-based editing: selection, drag-and-drop, and actions menu - #13
Closed
jondkinney wants to merge 18 commits into
Closed
Block-based editing: selection, drag-and-drop, and actions menu#13jondkinney wants to merge 18 commits into
jondkinney wants to merge 18 commits into
Conversation
- Clear highlight color on Enter: new paragraphs start with default styling unless parent list item is uniformly highlighted (parent retention) - Bullet marker color sync: ListItemNode transform sets <li> element color from text content so ::before markers match via currentColor - Highlight propagation: applying color to a parent list item cascades to all children in the structural wrapper - Highlight inheritance: Tab-indenting under a highlighted parent inherits the parent's color - Mark padding sync: data-pad-start/data-pad-end attributes on <mark> elements for word-boundary-aware padding - CSS parsing helpers ($extractHighlightFromCSS, $mergeHighlightIntoCSS, $removeHighlightFromCSS) that handle var() values safely in Rollup builds - All inheritance functions exported for reuse by other extensions Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Switch Yarn to node-modules linker (.yarnrc.yml) for Prism compat - Add inlineDynamicImports to Rollup for single-file bundle - Add 28 new Prism language components for syntax highlighting - Detect CommonMark <pre><code class="language-*"> format on paste - Add triple-backtick code fence keyboard shortcut - CSS for code blocks, syntax tokens, and blockquotes Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- New dispatchSetFormatHeadingXLarge command - H1 icon added to toolbar - Heading 1/2/3/4 in toolbar dropdown with pressed state tracking Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Position link dialog near selected text using saved selection rect - Auto-prepend https:// for bare domains - Change input from type=url to type=text for looser validation - Overlay-based selection highlight with pixel-perfect positioning - Pin dropdown open via data-pinned to prevent toolbar auto-close - Guard against missing input element in connectedCallback - Update test selector for new input type Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Action buttons: - Preview, download, edit, and collapse/expand buttons on attachment overlay - Buttons appear on hover/selection with proper positioning Card view: - Collapsed card layout with icon, name, caption, and file size - Toggle between preview and card via attachment--collapsed class Toolbar: - Download button and caption pass-through to preview Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Type / at start of line to open command palette - Sections: "Basic blocks" (insert below) and "Turn into" (convert) - Fuzzy search via fuzzysort dependency - Markdown shortcuts: --- for HR, | and " for blockquote - Viewport-aware positioning with flip-above and scroll anchoring - Add browser globals to eslint config Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Allow individual list items to independently display as bullet or numbered within the same list, matching Notion's mixed list behavior. The feature is opt-in via the mixedLists configuration flag (default: true), and can be disabled per-editor with mixed-lists="false". Node model: - EarlyEscapeListItemNode gains __listItemType property - getEffectiveListType() resolves: explicit override → parent list type - createDOM/updateDOM set data-list-item-type on <li> for CSS targeting Per-item toggling: - Command dispatcher toggles just the current item's type - Toolbar pressed state reflects per-item effective type Keyboard shortcuts: - "- " or "* " in a numbered item toggles to bullet - "1. " in a bullet item toggles to numbered Wrapped blocks in list items: - Turn-into wraps content in-place (headings, code, quotes) - Code block and table exit creates sibling list item when wrapped Configuration: - mixedLists: true in default preset, opt-out with mixed-lists="false" - FormatEscapeExtension gates features behind supportsMixedLists Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
# Conflicts: # .gitignore
# Conflicts: # src/elements/editor.js
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Block selection, drag-and-drop, block actions menu, indent/outdent, keyboard movement, highlight color inheritance, and turn-into for wrapped blocks. This commit represents the delta between block-qa-deps (PRs 4-10 merged) and the full block-based-editing branch. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- KEY_SPACE_COMMAND instead of TextNode transform (perf) - Null guard on link dropdown connectedCallback - Only export collapsed="true" (not "false") in attachment exportDOM - Scope toolbar test selectors to lexxy-toolbar - .first() on strict-mode attachment locators - ESLint browser globals - .yarnrc.yml for node-modules linker Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Remove #findDeepestLastItem from block_drag_and_drop.js (unused) - Remove #autoRevealSubmenuForFocused from block_actions_menu.js (unused) - Remove duplicate $clearHighlightOnNewBlock from highlight_extension.js - Remove unused imports: $isHeadingNode, COMMAND_PRIORITY_LOW, KEY_ENTER_COMMAND - Convert arrow function assignments to declarations (func-style) - Suppress intentional no-unused-vars and no-misleading-character-class Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Block-based editing extension for Lexxy, built on top of the standalone feature PRs (code blocks, H1, link dialog, highlights, mixed lists, slash commands, attachments).
Block selection
Drag and drop
Block actions menu
Indent/outdent and movement
Highlight color inheritance
Turn-into for wrapped blocks
Dependencies
This PR includes all standalone features (PRs #4-#10) merged together, plus the block editing extension on top. The standalone PRs should be reviewed and merged individually first.
Test plan
🤖 Generated with Claude Code