Skip to content

feat(joint-core, joint-react): mvc.View classNamePrefix override + Paper adoption#3311

Merged
Geliogabalus merged 2 commits into
clientIO:devfrom
kumilingus:feat/view-classname-prefix-dev
May 13, 2026
Merged

feat(joint-core, joint-react): mvc.View classNamePrefix override + Paper adoption#3311
Geliogabalus merged 2 commits into
clientIO:devfrom
kumilingus:feat/view-classname-prefix-dev

Conversation

@kumilingus
Copy link
Copy Markdown
Contributor

Summary

  • joint-core: new classNamePrefix property on mvc.View (defaults to config.classNamePrefix); set '' to opt out, or a custom string to replace the prefix. util.addClassNamePrefix / util.removeClassNamePrefix accept an optional prefix arg.
  • joint-react: Paper preset uses classNamePrefix: '' + className: 'jj-paper joint-paper' instead of overriding _ensureElClassName.

Companion PR against master (core-only, no react): #3310.

Test plan

  • QUnit coverage for util + mvc.View override (default / custom / empty / multi-name / idempotent / SVG / theme independence)
  • yarn grunt karma:joint — 1969/1969 pass
  • React Paper still renders with jj-paper joint-paper on the root, no joint- double-prefix

🤖 Generated with Claude Code

kumilingus and others added 2 commits May 13, 2026 12:45
…efix

Adds an opt-in `classNamePrefix` property on `mvc.View` (defaults to
`config.classNamePrefix`) and threads it through `util.addClassNamePrefix`
and `util.removeClassNamePrefix` via an optional second argument. Setting
`classNamePrefix: ''` lets a subclass opt out of prefixing entirely; the
theme class still uses the global `joint-` prefix.

Includes QUnit coverage for the new util argument and for the View
override behavior (default, custom, empty, multi-name, idempotency, SVG,
theme independence).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…efix on Paper

Replaces the custom `_ensureElClassName` override with the new
`classNamePrefix: ''` mechanism from `mvc.View`. Sets `className` to
`'jj-paper joint-paper'` directly so both classes land on the root
element without the global `joint-` prefix.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@kumilingus kumilingus requested a review from Geliogabalus May 13, 2026 10:49
@Geliogabalus Geliogabalus merged commit 57abb06 into clientIO:dev May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants