Skip to content

🐛 Fixed settings preview interaction regressions - #29618

Merged
9larsons merged 1 commit into
mainfrom
codex/fix-portal-icon-color-picker
Jul 27, 2026
Merged

9larsons merged 1 commit into
mainfrom
codex/fix-portal-icon-color-picker

Conversation

@9larsons

Copy link
Copy Markdown
Contributor

What changed

  • Stabilized Shade color-picker dragging with pointer capture so the selection does not flicker between competing pointer states.
  • Updated the embed signup-form preview in place during color changes instead of rebuilding and fading its iframe.
  • Debounced embed background-color changes to match the Design picker behavior.
  • Fixed the custom Portal icon hover/delete layering and removed the empty gray hover state.
  • Made the Portal preview canvas follow Admin dark mode while keeping Portal itself white.
  • Added focused coverage for iframe updates, delayed preview content, color-picker pointer handling, and Portal preview-theme parsing.

Why

The Shade cleanup exposed several preview-specific interaction regressions. Color dragging could feed controlled values back into the picker while the pointer was still moving, iframe previews were unnecessarily regenerated for lightweight option changes, and Portal preview chrome had no knowledge of the active Admin theme.

The attempted Safari-only signup-form first-paint workaround was reverted because it did not eliminate WebKit's white flash and added complexity without improving behavior.

Validation

  • Admin Settings: 26 test files, 219 tests; lint
  • Shade: 25 test files, 235 tests; lint and typecheck
  • Portal: 46 test files, 583 tests; lint, typecheck, and production build
  • Signup form: lint, typecheck, and production build
  • git diff --check

no ref

Improved preview behavior after the Shade migration so color controls remain stable and Portal follows the active Admin theme.
@coderabbitai

coderabbitai Bot commented Jul 27, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: c0e3f209-db8b-4068-a9e1-e527de03f088

📥 Commits

Reviewing files that changed from the base of the PR and between fc73052 and a22f60b.

📒 Files selected for processing (19)
  • apps/admin-x-settings/src/components/color-picker-field.tsx
  • apps/admin-x-settings/src/components/settings/growth/embed-signup/embed-signup-preview.tsx
  • apps/admin-x-settings/src/components/settings/growth/embed-signup/embed-signup-sidebar.tsx
  • apps/admin-x-settings/src/components/settings/membership/portal/look-and-feel.tsx
  • apps/admin-x-settings/src/components/settings/membership/portal/portal-modal.tsx
  • apps/admin-x-settings/src/components/settings/membership/portal/portal-preview.tsx
  • apps/admin-x-settings/src/utils/get-portal-preview-url.ts
  • apps/admin-x-settings/src/utils/iframe-buffering.tsx
  • apps/admin-x-settings/test/unit/growth/embed-signup-preview.test.tsx
  • apps/admin-x-settings/test/unit/utils/iframe-buffering.test.tsx
  • apps/portal/src/app.jsx
  • apps/portal/src/components/frame.styles.js
  • apps/portal/src/components/popup-modal.jsx
  • apps/portal/src/index.css
  • apps/portal/src/index.jsx
  • apps/portal/test/app.test.jsx
  • apps/shade/src/components/patterns/color-picker.tsx
  • apps/shade/test/unit/components/patterns/color-picker.test.tsx
  • apps/signup-form/src/components/pages/form-view.tsx

Walkthrough

Portal previews now propagate dark or light theme settings through preview URLs and render matching backgrounds. Embed signup previews update mounted iframes incrementally, including styles and script data attributes. Gradient color selection uses pointer capture with active-pointer tracking. Additional changes adjust color-picker initialization and debounce behavior, portal icon styling, and signup form padding.

Possibly related PRs

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/fix-portal-icon-color-picker

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@nx-cloud

nx-cloud Bot commented Jul 27, 2026 •

Copy link
Copy Markdown

🤖 Nx Cloud AI Fix

Ensure the fix-ci command is configured to always run in your CI pipeline to get automatic fixes in future runs. For more information, please see https://nx.dev/ci/features/self-healing-ci


View your CI Pipeline Execution ↗ for commit a22f60b

Command Status Duration Result
nx run @tryghost/admin:test:acceptance ✅ Succeeded 8m 9s View ↗
nx run-many -t test:unit -p @tryghost/admin-x-s... ✅ Succeeded 6m 8s View ↗
nx run ghost-admin:test ✅ Succeeded 2m 36s View ↗
nx run ghost-monorepo:lint:boundaries ✅ Succeeded 20s View ↗
nx run @tryghost/admin:build ✅ Succeeded 2m 8s View ↗
nx run-many -t lint -p @tryghost/admin-x-settin... ✅ Succeeded 2m 1s View ↗
nx run @tryghost/activitypub:test:acceptance ✅ Succeeded 48s View ↗
nx run-many --target=build --projects=tag:publi... ✅ Succeeded 3s View ↗
nx run @tryghost/signup-form:test:acceptance ✅ Succeeded 9s View ↗

💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗


☁️ Nx Cloud last updated this comment at 2026-07-27 14:56:36 UTC

@codecov

codecov Bot commented Jul 27, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.03%. Comparing base (fc73052) to head (a22f60b).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #29618   +/-   ##
=======================================
  Coverage   75.03%   75.03%           
=======================================
  Files        1610     1610           
  Lines      141689   141689           
  Branches    17393    17393           
=======================================
  Hits       106316   106316           
  Misses      34331    34331           
  Partials     1042     1042           
Flag Coverage Δ
admin-tests 55.63% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@9larsons
9larsons marked this pull request as ready for review July 27, 2026 15:03
@9larsons
9larsons merged commit 2a6ca21 into main Jul 27, 2026
48 of 49 checks passed
@9larsons
9larsons deleted the codex/fix-portal-icon-color-picker branch July 27, 2026 15:03
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