feat: visually group settings by category with collapsible cards
Node.js build / build (20.x) (push) Has been cancelled
Node.js build / build (22.x) (push) Has been cancelled

- Each command category (Better Formatting, Line Operations, etc.) now
  renders as a collapsible <details> card with a bordered/shaded header
  showing an 'N/M enabled' badge, instead of a flat list separated only
  by bold text headings.
- Sentence regex + reset moved into the Sentence Navigator category
  card (it configures that category's commands, so it belongs there
  instead of the general section).
- Bulk actions (global enable/disable all, per-category toggle-all,
  regex reset) now patch the DOM in place instead of calling the full
  display() re-render, so open/closed category state is never lost
  when a setting changes.
- Removed the 'General' settings heading (obsidianmd/settings-tab/no-problematic-settings-headings
  lint rule flags it).
- styles.css adds .bindthem-category-* rules for the card borders,
  header shading, collapse caret, and setting-row separators.
This commit is contained in:
2026-09-07 14:45:24 -04:00
parent 254fcc1b41
commit b031cd7e04
2 changed files with 181 additions and 56 deletions
+72 -8
View File
@@ -1,8 +1,72 @@
/*
This CSS file will be included with your plugin, and
available in the app when your plugin is enabled.
If your plugin does not need CSS, delete this file.
*/
/*
This CSS file will be included with your plugin, and
available in the app when your plugin is enabled.
*/
/* ============================================================
Settings tab — command category grouping
============================================================ */
.bindthem-category-list {
margin-bottom: 0.5em;
}
.bindthem-category {
border: 1px solid var(--background-modifier-border);
border-radius: var(--radius-m);
margin-bottom: 0.5em;
overflow: hidden;
}
.bindthem-category > summary {
display: flex;
align-items: center;
justify-content: space-between;
gap: 0.75em;
padding: 0.65em 1em;
cursor: pointer;
font-weight: 600;
background-color: var(--background-secondary);
list-style: none;
}
.bindthem-category > summary::-webkit-details-marker {
display: none;
}
.bindthem-category > summary::before {
content: '▸';
display: inline-block;
margin-right: 0.5em;
color: var(--text-muted);
transition: transform 0.15s ease-in-out;
}
.bindthem-category[open] > summary::before {
transform: rotate(90deg);
}
.bindthem-category-name {
flex: 1;
}
.bindthem-category-count {
font-weight: 400;
font-size: var(--font-ui-smaller);
color: var(--text-muted);
white-space: nowrap;
}
.bindthem-category-content {
padding: 0 1em;
}
.bindthem-category-content .setting-item {
border-top: 1px solid var(--background-modifier-border);
}
.bindthem-category-content .setting-item:first-child {
border-top: none;
}