Commit graph

9 commits

Author SHA1 Message Date
Gary Ritchie
eaf24746b3
Move delete button to the select/deselect row (#50)
* Move "Delete selected" button to select/deselect row

Addresses #48: the warning-red delete button next to the lighter-red
"Update properties" CTA drew the eye toward delete and made update
look inactive. Move delete to the Select all / Deselect all row,
left-justified, with the same styling as the sibling buttons.

* Let selection row span full modal width

The "Delete selected" button was only pushed left within the right
half of the row. Hide the empty .setting-item-info on this row so the
control area spans the modal, letting margin-right: auto put Delete at
the left edge while Select all / Deselect all stay on the right.
2026-04-22 20:17:33 -06:00
Gary Ritchie
8d087efcf0
Add bottom padding to new value region in bulk edit modal (#47) 2026-04-12 11:57:23 -06:00
Gary Ritchie
0e8d99c9ca
Link empty-state message to plugin settings (#38)
* Link "plugin settings" text to open settings tab in empty-state message

When no properties are configured, the modal now shows "plugin settings"
as a clickable link that closes the modal and navigates directly to the
plugin's settings tab.

* Guard undocumented settings API with feature detection

Check that setting.open and setting.openTabById are functions before
calling them. Falls back to a Notice with manual navigation instructions
if the internal API is absent.

* Add focus-visible indicator for links in the modal
2026-04-04 12:31:42 -06:00
Gary Ritchie
f7e28e5e2c
Replace comma-separated textarea with pill-style input for multi-value properties (#22)
* Replace comma-separated textarea with pill-style input for tags

Use Obsidian's native .multi-select-pill CSS classes for tags,
aliases, and multitext property types. Pills are added via Enter,
comma, or paste and removed via × button or Backspace. Dedup
applies to tags/aliases only; multitext allows duplicates. IME
composition is respected to avoid breaking CJK input.

* Add x icon to pill remove button via setIcon

* Fix paste merging and blur commit behavior for pill input

Paste now merges clipboard text with existing input value at the
cursor position before splitting on commas. The trailing segment
after the last comma stays in the input for further editing.

Blur only commits pending text when focus leaves the pill container
entirely, not when clicking a remove button inside it.

* Move pending-text commit to container focusout

Replace the input-level blur handler with a container-level focusout
listener that commits pending text only when focus leaves the pill
container entirely. This covers the keyboard path where focus moves
from a remove button to outside the container.

* Strip border from pill remove button and reduce pill size

* Add hover and focus-visible styles to pill remove button

* Use span with role=button for pill remove to match Obsidian's DOM

Obsidian's native multi-select pills use a span for the remove
control, not a button element. The button element picks up
Obsidian's base button styling (visible border) that can't be
easily overridden. Switching to a span with role="button" and
tabindex="0" matches the native DOM while preserving keyboard
accessibility via an explicit keydown handler.

* Match native button behavior: activate Space on keyup, not keydown

* Validate tag names against Obsidian's naming rules

Reject tags containing spaces, invalid characters, or only digits.
Strip leading # from user input. Show a Notice with the specific
reason when a tag is rejected. Validation applies only to the tags
property type, not aliases or multitext.

* Show notice when bare # is entered as a tag name

* Restore focus to pill input after adding or removing a pill

* Only refocus pill input from keyboard and paste, not blur commits

* Fix duplicate pill on multitext by clearing input before addPill

renderPills() detaches and reattaches the input element, which can
fire a focusout event mid-operation. The focusout handler would then
see the still-populated input and commit the same value again. For
tags/aliases this was masked by dedup, but multitext allows
duplicates so the double-add was visible. Fix by capturing and
clearing the input value before calling addPill.
2026-04-01 19:55:02 -06:00
Gary Ritchie
29bed989d7
Add deselect-all command with progress and cancellation
Shows a persistent Notice with live progress ("Deselecting 3 / 47...")
and a cancel button. Extracts getSelectedFiles to shared src/files.ts.
2026-03-26 22:10:58 -06:00
Gary Ritchie
b0a1668f6d
Rename baseprop references to bulk-properties
Rename classes (BasepropPlugin → BulkPropertiesPlugin, etc.),
CSS classes (baseprop-* → bulk-properties-*), and package name
to match the new plugin identity.
2026-03-26 21:57:53 -06:00
Gary Ritchie
11ede55311
Add interactive file checklist to bulk edit modal
Shows all selected files with checkboxes so users can see and adjust
which files will be affected before running the update. Toggling a
checkbox immediately persists the selection property to the file.
2026-03-25 19:39:54 -06:00
Gary Ritchie
03cd4a0d80
Implement bulk property editor for Obsidian Bases
Add command "Bulk edit selected files" that finds all vault files with
the "selected" checkbox property checked, then presents a modal to
choose a property, enter a new value (with type-appropriate inputs),
and apply the change across all selected files. Includes option to
deselect files after update.
2026-03-24 20:14:47 -06:00
Gary Ritchie
ea6de67a85
Initial commit 2026-03-24 19:27:30 -06:00