fix: Improving official plugin review recommendations

The new community.obsidian.md portal for publishing plugins includes a review mechanism that presents recommendations and warnings to end-users about the plugin's implementation. This commit attempts to pass review warnings.
This commit is contained in:
David Golding 2026-05-12 17:22:46 -06:00
parent dd66889639
commit 183b3310c2
9 changed files with 1884 additions and 205 deletions

48
.github/workflows/release.yml vendored Normal file
View file

@ -0,0 +1,48 @@
name: Release
on:
push:
tags:
- '*'
permissions:
contents: write
id-token: write
attestations: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: 10
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build
run: pnpm build
- name: Attest build provenance
uses: actions/attest-build-provenance@v1
with:
subject-path: |
main.js
styles.css
manifest.json
- name: Release
uses: softprops/action-gh-release@v2
with:
files: |
main.js
manifest.json
styles.css

2
.gitignore vendored
View file

@ -1,6 +1,5 @@
.hotreload
node_modules/
pnpm-lock.yaml
pnpm-workspace.yaml
.DS_Store
.vscode
@ -9,3 +8,4 @@ pnpm-workspace.yaml
/docs
skills-lock.json
/.agent
/.agents

View file

@ -1,4 +1,4 @@
<h1 align="center">Colophon 2.0</h1>
<h1 align="center">Colophon</h1>
<p align="center">Long-form writing canvas for Obsidian</p>
Colophon provides a dedicated, typographically refined environment for writing manuscripts and screenplays. Unlike standard Markdown editors, Colophon uses a custom editor engine (Tiptap/ProseMirror) and a dedicated file format to ensure your formatting, footnotes, and script standards are preserved exactly as you intended.

217
main.js

File diff suppressed because one or more lines are too long

View file

@ -1,7 +1,7 @@
{
"id": "colophon-writer",
"name": "Colophon",
"version": "2.2.4",
"version": "2.2.5",
"minAppVersion": "1.7.5",
"description": "A dedicated, typographically refined writing canvas for structuring long-form manuscripts and screenplays.",
"author": "David Golding",

View file

@ -1,6 +1,6 @@
{
"name": "obsidian-colophon",
"version": "2.2.4",
"version": "2.2.5",
"description": "A dedicated, typographically refined writing canvas for structuring long-form manuscripts and screenplays.",
"main": "main.js",
"scripts": {
@ -16,25 +16,25 @@
"vitest": "^4.1.0"
},
"dependencies": {
"@tiptap/core": "^3.22.3",
"@tiptap/extension-bold": "^3.22.3",
"@tiptap/extension-document": "^3.22.3",
"@tiptap/extension-dropcursor": "^3.22.3",
"@tiptap/extension-gapcursor": "^3.22.3",
"@tiptap/extension-hard-break": "^3.22.3",
"@tiptap/extension-history": "^3.22.3",
"@tiptap/extension-horizontal-rule": "^3.22.3",
"@tiptap/extension-italic": "^3.22.3",
"@tiptap/extension-paragraph": "^3.22.3",
"@tiptap/extension-strike": "^3.22.3",
"@tiptap/extension-subscript": "^3.22.3",
"@tiptap/extension-superscript": "^3.22.3",
"@tiptap/extension-text": "^3.22.3",
"@tiptap/extension-text-style": "^3.22.3",
"@tiptap/extension-underline": "^3.22.3",
"@tiptap/pm": "^3.22.3",
"@tiptap/starter-kit": "^3.22.3",
"fast-diff": "^1.3.0",
"jszip": "^3.10.1"
"@tiptap/core": "3.22.3",
"@tiptap/extension-bold": "3.22.3",
"@tiptap/extension-document": "3.22.3",
"@tiptap/extension-dropcursor": "3.22.3",
"@tiptap/extension-gapcursor": "3.22.3",
"@tiptap/extension-hard-break": "3.22.3",
"@tiptap/extension-history": "3.22.3",
"@tiptap/extension-horizontal-rule": "3.22.3",
"@tiptap/extension-italic": "3.22.3",
"@tiptap/extension-paragraph": "3.22.3",
"@tiptap/extension-strike": "3.22.3",
"@tiptap/extension-subscript": "3.22.3",
"@tiptap/extension-superscript": "3.22.3",
"@tiptap/extension-text": "3.22.3",
"@tiptap/extension-text-style": "3.22.3",
"@tiptap/extension-underline": "3.22.3",
"@tiptap/pm": "3.22.3",
"@tiptap/starter-kit": "3.22.3",
"fast-diff": "1.3.0",
"fflate": "0.8.2"
}
}

1656
pnpm-lock.yaml Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,4 +1,4 @@
import JSZip from 'jszip';
import { strToU8, zipSync } from 'fflate';
export class MinimalDocxGenerator {
constructor(options = {}) {
@ -23,8 +23,6 @@ export class MinimalDocxGenerator {
}
async generate() {
const zip = new JSZip();
// 0. Map IDs to Integers (1-based)
let fnIndex = 1;
Object.keys(this.footnotes).forEach(id => {
@ -36,20 +34,19 @@ export class MinimalDocxGenerator {
this.commentIdMap.set(id, cmIndex++);
});
zip.file('[Content_Types].xml', this.createContentTypesXml());
zip.folder('_rels').file('.rels', this.createRelsXml());
const zipObj = {
'[Content_Types].xml': strToU8(this.createContentTypesXml()),
'_rels/.rels': strToU8(this.createRelsXml()),
'word/document.xml': strToU8(this.createDocumentXml()),
'word/styles.xml': strToU8(this.createStylesXml()),
'word/fontTable.xml': strToU8(this.createFontTableXml()),
'word/footnotes.xml': strToU8(this.createFootnotesXml()),
'word/settings.xml': strToU8(this.createSettingsXml()),
'word/comments.xml': strToU8(this.createCommentsXml()),
'word/_rels/document.xml.rels': strToU8(this.createDocumentRelsXml())
};
const word = zip.folder('word');
word.file('document.xml', this.createDocumentXml());
word.file('styles.xml', this.createStylesXml());
word.file('fontTable.xml', this.createFontTableXml());
word.file('footnotes.xml', this.createFootnotesXml());
word.file('settings.xml', this.createSettingsXml());
word.file('comments.xml', this.createCommentsXml());
word.folder('_rels').file('document.xml.rels', this.createDocumentRelsXml());
return zip.generateAsync({ type: 'nodebuffer' });
return Buffer.from(zipSync(zipObj));
}
// --- XML Generators ---

View file

@ -13,7 +13,7 @@
}
/* 1. WORKSPACE CONTAINER */
.colophon-workspace {
.workspace-leaf .colophon-workspace {
background-color: var(--background-primary);
position: relative;
width: 100%;
@ -21,7 +21,7 @@
overflow: hidden;
display: flex;
flex-direction: column;
padding: 0 !important;
padding: 0;
}
.colophon-scroll-container {
@ -37,14 +37,14 @@
/* 2. THE EDITOR CANVAS (Main) */
.colophon-main-editor {
.workspace-leaf .colophon-main-editor {
/* Layout */
width: 100%;
/* Use the variable set by JS, or fallback to 1080px (new default) */
max-width: var(--colophon-editor-width, 1080px);
min-height: 100%;
margin: 0 auto;
padding: 0 2rem 75vh 2rem !important;
padding: 0 2rem 75vh;
/* Top padding 0, Bottom 75vh, Sides 2rem */
/* Appearance */
@ -74,8 +74,8 @@
}
/* Ensure first element is flush with top */
.colophon-main-editor > *:first-child {
margin-top: 0 !important;
.workspace-leaf .colophon-main-editor > *:first-child {
margin-top: 0;
}
/* Selection Styling - Applies to all editors in workspace */
@ -458,28 +458,26 @@
width: 100%;
}
.colophon-comment-editor {
.workspace-leaf .colophon-comment-editor {
font-size: 0.9rem;
line-height: 1.4;
min-height: 1.2em;
outline: none;
/* Revert to theme defaults for comments */
font-family: var(--font-interface) !important;
font-variant: normal !important;
text-indent: 0 !important;
font-family: var(--font-interface);
font-variant: normal;
}
/* Comment Preview Overrides */
.colophon-comment-preview,
.colophon-comment-preview p {
font-family: var(--font-text-interface) !important;
font-size: 0.9rem !important;
font-variant: normal !important;
font-style: normal !important;
text-indent: 0 !important;
padding: 0 !important;
color: var(--text-normal) !important;
line-height: 1.4 !important;
.workspace-leaf .colophon-comment-preview,
.workspace-leaf .colophon-comment-preview p {
font-family: var(--font-text-interface);
font-size: 0.9rem;
font-variant: normal;
font-style: normal;
padding: 0;
color: var(--text-normal);
line-height: 1.4;
cursor: pointer;
min-height: 1.2em;
white-space: pre-wrap;
@ -625,10 +623,10 @@
}
/* 12. GLOBAL SIDEBAR OVERRIDES */
.colophon-main-layout.is-global-sidebar .colophon-z-axis-panel {
.workspace-leaf .colophon-main-layout.is-global-sidebar .colophon-z-axis-panel {
display: none;
width: 0 !important;
border-left: none !important;
width: 0;
border-left: none;
}
.colophon-sidebar-view .colophon-z-axis-panel {
@ -721,13 +719,13 @@
width: 100%;
}
.colophon-footnote-editor {
.workspace-leaf .colophon-footnote-editor {
outline: none;
min-height: auto;
cursor: text;
width: 100%;
background-color: transparent !important;
border: 0 !important;
background-color: transparent;
border: 0;
}
.colophon-footnote-preview {
@ -755,20 +753,20 @@
box-shadow: 0 0 0 1px var(--interactive-accent);
}
.colophon-footnote-editor .ProseMirror {
padding: 0 !important;
margin: 0 !important;
width: 100% !important;
min-height: auto !important;
background-color: transparent !important;
box-shadow: none !important;
border: 0 !important;
.workspace-leaf .colophon-footnote-editor .ProseMirror {
padding: 0;
margin: 0;
width: 100%;
min-height: auto;
background-color: transparent;
box-shadow: none;
border: 0;
}
/* Base reset for paragraphs in mini-editors */
.colophon-footnote-editor p {
margin: 0 !important;
padding: 0 !important;
.workspace-leaf .colophon-footnote-editor p {
margin: 0;
padding: 0;
}
/* Footnote Marker in Canvas */
@ -999,26 +997,7 @@
margin-top: 10px;
}
.colophon-export-margins__label {
font-size: 11px;
line-height: 1.2;
color: var(--text-muted);
margin-bottom: 4px;
}
.colophon-export-margins__input {
width: 100%;
padding: 6px 8px;
border-radius: var(--radius-s);
border: 1px solid var(--background-modifier-border);
background: var(--background-modifier-form-field);
color: var(--text-normal);
}
.colophon-export-margins__input:focus {
outline: none;
border-color: var(--interactive-accent);
}
/* BLOCK SETTINGS UI */
.colophon-block-settings {
margin-top: 20px;