Skip to content

Release v0.4.2 - #178

Merged
roncodes merged 1 commit into
mainfrom
release/v0.4.2
Sep 16, 2026
Merged

roncodes merged 1 commit into
mainfrom
release/v0.4.2

Conversation

@roncodes

Copy link
Copy Markdown
Member

Patch release for v0.4.2: restores the hidden state of every Attach::Tooltip and Attach::Popover in production builds. The sitting release (component playground, signature pad, coverage) moved to release/v0.4.3 / #177 so this ships first.

What broke

v0.4.1 (#176, 434196f) started forwarding the host's browser targets to postcss-preset-env. With the console's targets (last 1 Chrome/Firefox/Safari versions) the preset skips the nesting-rules transform, because those browsers support nesting natively. The attacher styles that keep an attachment at opacity: 0 until it is shown are written nested, and ember-cli's production minifier (clean-css 5) cannot parse nesting: it emitted those rules as top-level & > .ember-attacher-fill selectors that match nothing, so every tooltip and popover rendered at full opacity without a hover. Development builds were unaffected because the browser parsed the nested block itself, which is why it reached production.

The popover component itself is not at fault; its v0.4.1 changes only affect interactive attachments.

Fix

  • lib/postcss-options.js: postcssPresetEnv({ …, features: { 'nesting-rules': true } }) so nesting is always flattened, whatever the targets.
  • tests/node/postcss-build-test.cjs: compiles attacher.css for the console's targets, asserts the flat hide rule is present with no & left, then minifies with the same clean-css ember-cli uses and asserts the rule survives. Fails on main, passes here.
  • package.json → 0.4.2, RELEASE.md first line names v0.4.2 so release.yml tags on merge.

Verification

  • node --test tests/node/postcss-build-test.cjs: 4 pass (the new test fails with the fix reverted).
  • ember build --environment=production of the dummy app: the minified vendor CSS contains .ember-attacher[x-placement^=top]>.ember-attacher-fill{…;opacity:0} for all four placements and no nesting leftovers; before the fix the console's built vendor.css had only the nested form.

… rules

v0.4.1 started forwarding the host's browser targets to postcss-preset-env,
which then skipped the nesting-rules transform for browsers that support
nesting natively. The attacher styles that hold a tooltip or popover at
opacity 0 until it is shown are nested, and ember-cli's clean-css minifier
cannot parse nesting: it emitted them as top-level `& > …` selectors that
match nothing, so every attachment rendered visible in production without
a hover. Development builds looked fine because the browser parsed the
nested block itself.

Force nesting-rules on regardless of targets, and add a node test that
compiles the attacher styles for the console's targets, asserts the flat
hide rule, and minifies the result with clean-css.

Prepare the v0.4.2 patch release.
@roncodes
roncodes merged commit b0cc3b2 into main Sep 16, 2026
11 checks passed
@roncodes
roncodes deleted the release/v0.4.2 branch September 16, 2026 14:41
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.

1 participant