docs: Canvas Candy full class catalogue — gap analysis#32
Open
LeslieOA wants to merge 1 commit into
Open
Conversation
#19 was sized L because most of the cost was *research*: read the upstream plugin, enumerate every cc-* class, compare against our baseline, decide which are gaps worth closing. This commit does that research as a single doc and proposes a sub-issue split that turns the residual code work into S / XS chunks. Source for the upstream catalogue: github.com/TfTHacker/obsidian-canvas-candy — specifically 04 List of Decorations.md, the canonical class index. Findings Already supported (28 classes): all shapes, all card fill, all borders, all 8 documented gradient degrees plus any integer via our regex, all rotation classes plus any integer via our regex, text alignment. Net new gaps (3 classes worth implementing): cc-shape-parallelogram — alias for -left, XS direct port cc-image-cover — S direct port, reuses existing backgroundStyle:'cover' Skia path cc-image-clip — M new render primitive, needs card-shape clip plumbed into SkiaImageRenderer Deliberate-skip candidates (9 classes): cc-header / cc-footer / cc-label-{left,right} and their -noborder variants. These are upstream's CSS-class mechanism for zone-style callouts; we already expose the same zones via block syntax in extensions/callouts.ts. Supporting both mechanisms doubles the maintenance surface for the same visual effect. Doc recommends documenting the mismatch and optionally adding an import-time conversion pass rather than parallel support — open question for the maintainer. Where we're more permissive than upstream (no work needed): gradient deg — upstream documents 8 multiples of 45°; we accept any integer via regex card rotation — upstream documents only -45; we accept any int text rotation — upstream documents 8 multiples of 45°; we accept any int plus an undocumented trailing 'l' variant Open questions enumerated at the end of the doc: 1. Confirm skip on 9 callout-zone CSS classes 2. Verify cc-shape-parallelogram default direction (-left vs -right) 3. Priority order for the 3 feature gaps 4. File sub-issues now or wait for consumer demand? Proposed sub-issue split (post-review): feat(candy): cc-shape-parallelogram alias XS feat(candy): cc-image-cover for text / file nodes S feat(candy): cc-image-clip (card-shape image clipping) M docs(candy): document skipped callout-zone classes XS Total code work is closer to S after split — most of #19's original L sizing was this research, now resolved. No code changes. Library checks pass on this branch (38/38 tests, typecheck clean, lint exit 0). Refs: #19 Co-Authored-By: Claude Opus 4.7 (1M context) <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
Adds
docs/canvas-candy-catalogue.md(~180 lines). Resolves the research portion of #19. The doc enumerates everycc-*class the upstreamTfTHacker/obsidian-canvas-candyplugin defines, compares against our baseline implementation, marks each as already supported / gap / deliberate-skip, and proposes a 4-issue split for the residual code work.This PR is not a commitment to start coding. It's the research output that lets you decide which gaps are worth closing and which to leave skipped.
Headline finding
#19 was sized L because most of the cost was research. After cataloguing, the residual code work is:
cc-shape-parallelogramaliascc-image-coverfor text / file nodescc-image-clip(new render primitive)Total ≈ S. Not L. The catalogue resolves most of the original sizing.
What's already supported (28 classes)
All shapes, all card fills, all 11 borders, every gradient angle (we use a regex; upstream documents only 8 specific angles), every rotation angle, text alignment. We're actually more permissive than upstream in three places (gradient, card rotation, text rotation) — see §6 of the doc.
What's a real gap (3 classes)
cc-shape-parallelogram-left(probably)cc-image-coverbackgroundStyle:'cover'Skia pathcc-image-clipSkiaImageRendererWhat's deliberate-skip (9 classes)
cc-header/cc-footer/cc-label-{left,right}and their-nobordervariants. These are upstream's CSS-class mechanism for zone-style callouts; we already expose the same zones via block syntax inextensions/callouts.ts. Supporting both mechanisms for the same visual effect doubles the maintenance surface and confuses consumers about which to use.Open question in the doc: is skip correct, or do you want both supported for import-compatibility with canvases authored in vanilla Obsidian?
Four open questions for you (full list in §8 of the doc)
cc-shape-parallelogramdefault direction matches our-left?Verification
npm test: 38/38 (develop hasn't merged the conformance tests from test: conformance tests for JSON Canvas spec + Canvas Candy baseline #29 yet)npm run typecheck: cleannpm run lint: exit 0Note on #20 (file-node
:has()design)That's a separate issue tracking the architecturally distinct mechanism (frontmatter inside an embedded
.mdfile referenced as a file-type node). The 9 callout-zone classes I'm marking as skip here are not the:has()mechanism — they're a parallel CSS-class path that overlaps with our block-syntax callouts. #20 stays its own thing.Refs: #19