feat(lasso): add "Make Space Above" + presentability pass - #56
Merged
Conversation
New "above" cut direction, chosen via a second toolbar button (id 101),
alongside the existing "below" (id 100, unchanged behavior). Both open the
same overlay; App.tsx tells them apart via the Pending Button ID pattern
(references/patterns.md Pattern 5) since PluginHost reuses the App
instance across opens rather than remounting it.
- src/makeSpace.ts: computeLassoRect takes a required CutDirection
('above' | 'below'); same clamped cut-line math either way, only which
side of it becomes the rect changes. Mirror test coverage added.
- index.js: registers button 101, module-level pendingDirection +
registerButtonListener for the pre-mount race, exports
checkPendingDirection().
- App.tsx: direction state seeded from checkPendingDirection() on mount,
kept live afterwards via its own registerButtonListener (stays
subscribed for the reused instance's whole lifetime). Hint/intro copy
now direction-aware.
- Locale files: tapToInsertSpaceBelow/Above, bodyBelow/Above.
Presentability pass, ahead of eventual InkHub listing (see
make-space.md §11 — no submission spec exists yet, this is the no-regret
prep bucket):
- Three new hand-drawn icons (assets/icon.png redesigned, +icon-below.png,
+icon-above.png) replacing the generic unused-template puzzle piece.
- PluginConfig.json `name`: "sn_make_space" -> "Make Space" (this is the
human-facing title shown in Settings -> Apps -> Plugins; independent of
`pluginKey`/`pluginID`, which stay untouched — changing those would
confuse the host's plugin registry for anyone with an existing install).
`desc` polished into a proper listing-quality description.
- app.json `displayName` and package.json `description` filled in to
match (app.json `name` left alone — it's the actual AppRegistry key,
coupled to PluginConfig's `pluginKey`).
- README: badges, fixed stale "below"-only wording now that both
directions exist.
Co-Authored-By: Claude Sonnet 5 <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
computeLassoRecttakes a requiredCutDirection— full mirror test coverage added (25 tests total, up from 18).PluginConfig.jsonnamerenamed from rawsn_make_spaceto "Make Space" (display-only,pluginKey/pluginIDuntouched), polished description, README badges + stale-copy fixes./home/gorlix/.claude/plans/functional-knitting-lantern.mdTest plan
npm run typecheck/lint/format/test:ci— all clean, 25/25 passing🤖 Generated with Claude Code