Add @-mention and Notion-style UX quick wins#10
Open
namedgraph wants to merge 1 commit into
Open
Conversation
Borrow the Notion affordances worth stealing, reinterpreting @-mention as an RDF relation-authoring gesture. - @-mention (src/mention.xsl): typing @ at a word boundary opens a picker with an explicit predicate (from the vocabularies) and an object IRI autocompleted from document resources, vocab class terms, or free-form entry. Emits <span property="P" resource="O">label</span> - a real (subject, P, object-IRI) triple, reusing local:wrap-range / local:apply-annotation. No extractor change. - Slash menu (/): caret popup in an empty block that converts/inserts any block kind, reusing convert-block, the list builder and the figure/table dialogs. - Markdown input rules: '# '/'## '/'### ', '- '/'* ', '1. ', '> ', ``` in an empty paragraph. - Block-handle menu: click the gutter handle for Turn into / Duplicate / Delete (turn-into disabled on structure-locked list/figure/table blocks). Shared foundation: one higher-priority ixsl:onbeforeinput dispatcher routes the printable-char triggers and next-matches into undo.xsl's coalescer, so plain typing still snapshots for undo. local:show-at is split into a reusable show-at-point (+ show-at-caret/-element) for the keyboard-triggered popups. local:convert-block becomes a pure primitive (caller owns the undo snapshot), which also fixes a dangling element-level caret after replaceWith on empty blocks. Tests: new tests/browser/notion.mjs (26 assertions) registered in run.mjs; make test and make test-browser both green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
062fba9 to
7b36f12
Compare
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.
Borrow the Notion affordances worth stealing, reinterpreting @-mention as an RDF relation-authoring gesture.
Shared foundation: one higher-priority ixsl:onbeforeinput dispatcher routes the printable-char triggers and next-matches into undo.xsl's coalescer, so plain typing still snapshots for undo. local:show-at is split into a reusable show-at-point (+ show-at-caret/-element) for the keyboard-triggered popups. local:convert-block becomes a pure primitive (caller owns the undo snapshot), which also fixes a dangling element-level caret after replaceWith on empty blocks.
Tests: new tests/browser/notion.mjs (26 assertions) registered in run.mjs; make test and make test-browser both green.