Skip to content

Add optional insert-card button between cards - #1211

Open
ibci wants to merge 1 commit into
community-archive:mainfrom
ibci:feat/insert-card-button
Open

Add optional insert-card button between cards#1211
ibci wants to merge 1 commit into
community-archive:mainfrom
ibci:feat/insert-card-button

Conversation

@ibci

@ibci ibci commented May 21, 2026

Copy link
Copy Markdown

Summary

Adds a hover + affordance in the gap between cards (and above the first / below the last card) to insert a new card at that exact position, instead of only being able to append to the end of a list.

The feature is gated behind a new board setting "Show insert card button between cards" (off by default), so it does not change behavior for existing users unless they opt in.

Details

  • Reuses the existing boardModifiers.insertItems flow (the same one powering the "Insert card before/after" context-menu items), so the new card opens in edit mode at the right index.
  • The inserter element is marked data-ignore-drag — the same mechanism the card's menu button uses — so it does not interfere with drag-and-drop.
  • Inserters are skipped in static/search views.

Files changed

  • src/components/Item/Item.tsxItemInserter component + inline rendering between cards, gated on the setting
  • src/components/Lane/Lane.tsx — passes laneIndex down to <Items>
  • src/Settings.ts — the show-insert-card-button board toggle
  • src/lang/locale/en.ts — setting label/description strings
  • src/styles.less — inserter zone + button styles

Testing

  • Lint (eslint) and prettier pass on the changed files; npm run build succeeds.
  • Verified manually in Obsidian: toggling the setting on shows the + between cards and inserts at the correct position; drag-and-drop continues to work; toggling off restores stock behavior.

🤖 Generated with Claude Code

Adds a hover "+" affordance in the gap between cards (and above the first / below the last) to insert a new card at that position, instead of only appending to the end of the list.

Gated behind a new board setting "Show insert card button between cards" (off by default), so existing behavior is unchanged unless enabled. The inserter is marked data-ignore-drag so it does not interfere with drag-and-drop.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant