Uh oh!
There was an error while loading. Please reload this page.
feat(Combobox): add themeResetClass for the portalled menu (MET-3088) - #64
Merged
Conversation
Zayooo00
enabled auto-merge (squash)
September 1, 2026 05:14
In prod the options list is portalled to `document.body`, outside the element that carries Plasmic's design-token CSS variables (they live on `.plasmic_tokens_<projectId>`, not `:root`). `var(--token-*)` in the menu's generated styles then resolves to nothing and the menu renders unstyled. The Plasmic canvas is unaffected because #63 renders the menu inline there. Register a `type: "themeResetClass"` prop and apply it to the portalled root (`ComboboxOptions`). Plasmic supplies the class automatically, so there is no hardcoded project id and it survives a project migration.
Zayooo00force-pushed
the
feat/combobox-menu-root-classname
branch
from
September 1, 2026 05:15
94b08d5 to
1cfbfdcComparedosmiko7
approved these changes
Sep 1, 2026
Uh oh!
There was an error while loading. Please reload this page.
Zayooo00 added a commit
to myevaluations/myevals-plasmic-utils
that referenced
this pull request
Sep 1, 2026
…(MET-3088) (fullstackhouse#64) (#6) In prod the options list is portalled to `document.body`, so any style scoped to an ancestor class - notably Plasmic design tokens, which live on `.plasmic_tokens_<projectId>` rather than `:root` - stops applying and the menu renders unstyled. `menuRootClassName` is added to the portalled root (`ComboboxOptions`), so the caller can re-apply that scoped class there. No effect in the Plasmic canvas, where the menu already renders inline inside the scope.
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 freeto 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.
Follow-up to #62 / #63.
Problem
In prod the Combobox options list is portalled to
document.body(Headless UIanchor). Plasmic's design tokens are declared as CSS variables on.plasmic_tokens_<projectId>(applied on each component root), not:root. The portalled menu is outside that element, sovar(--token-*)in its generated styles resolves to nothing and the menu renders unstyled on the deployed app. The Plasmic canvas is unaffected because #63 renders the menu inline there.Change
Register a
type: "themeResetClass"prop and apply it to the portalled root (ComboboxOptions). Plasmic's built-in theme-reset mechanism supplies the class carrying the project's default styles and token variable definitions — no hardcoded project id, survives a project migration.No behaviour change when unset (e.g. non-Plasmic consumers). No effect in the canvas.
Verified
tsc -p tsconfig.package.json,next lint,vitest(49) green.