Skip to content

Child theme override resolution #46

Description

@tayebmokni

Summary

Implement child theme override resolution: file-by-file overrides for classic themes, (theme_id, source) chain for block themes, and deep-merge theme.json between child and parent with array merging keyed by slug (not index).

Design reference

  • docs/03-theme-system.md §11 (Child Themes)
  • docs/03-theme-system.md §11.2 (Override rules)
  • docs/03-theme-system.md §11.3 (Resolver pseudocode)

Acceptance criteria

  • Child theme manifest with gonext.parent registered and parent chain loadable
  • resolveFile(theme, relPath) walks child → parent → null
  • DB resolver chain (child user) → (child seed) → (parent user) → (parent seed) → core (§6.3 + child layer)
  • theme.json deep-merged: child overrides parent, supports nulling out parent values
  • Palette / fontFamilies / fontSizes / etc arrays merged by slug, not index
  • Both functions.ts files run (parent then child)
  • Patterns: union of parent + child, same-slug child wins
  • Integration test: install parent + child, assert resolved outputs

Dependencies

#7, #5

Complexity

M

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions