Skip to content

upgrade: fullscreen package upgrade for Solid 2.0#848

Merged
davedbase merged 11 commits into
solidjs-community:nextfrom
davedbase:update/v2/fullscreen
May 28, 2026
Merged

upgrade: fullscreen package upgrade for Solid 2.0#848
davedbase merged 11 commits into
solidjs-community:nextfrom
davedbase:update/v2/fullscreen

Conversation

@davedbase

@davedbase davedbase commented Apr 21, 2026

Copy link
Copy Markdown
Member

Bumps the peer dependency to solid-js@^2.0.0-beta and updates the package to match the 2.0 API.

Breaking

  • use:createFullscreen directive removed — use ref={fullscreen(opts)} instead
  • Requires solid-js@^2.0.0-beta and @solidjs/web@^2.0.0-beta

Changes

  • New fullscreen() ref factory export as the Solid 2.0 replacement for the directive
  • isServer imported from @solidjs/web
  • createEffect updated to the split compute/effect signature

Summary by CodeRabbit

Release Notes

  • Breaking Changes

    • Requires Solid.js 2.0 (beta.14+); not compatible with Solid 1.x.
    • Fullscreen API updated; usage pattern changed to ref directive.
  • New Features

    • Enhanced fullscreen primitives with improved state tracking and control methods.
  • Documentation

    • README updated with complete API reference and usage examples.

Review Change Stack

@changeset-bot

changeset-bot Bot commented Apr 21, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 23fcf5e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@solid-primitives/fullscreen Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@davedbase davedbase changed the base branch from main to next April 21, 2026 01:47
@davedbase davedbase added this to the Solid 2.0 Upgrade milestone Apr 21, 2026
@davedbase davedbase marked this pull request as ready for review May 17, 2026 14:23
@coderabbitai

coderabbitai Bot commented May 24, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a559c66e-96b4-4d99-a362-648dcf5f00e3

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.changeset/fullscreen-solid-2-migration.md:
- Around line 5-23: Update the migration note to match the shipped API: change
the example using the old ref usage so the Solid 2.0 example shows <div
ref={fullscreen()} /> (not fullscreen(fs)), replace mentions of the outdated
version tag `beta.7` with the actual shipped version if different, and update
the export signature description from `fullscreen(active?, options?)` to the
correct `fullscreen(options?)`; ensure you reference the helper factory name
`fullscreen` and the original `createFullscreen` in the prose so readers can map
the ref directive to the underlying API.

In `@packages/fullscreen/src/index.ts`:
- Around line 127-131: The current element binder overwrites removeListener
without removing any previously attached listener, risking orphaned click
handlers; inside the returned function (the callback that takes el: HTMLElement)
call the existing removeListener (if defined) before creating the new [enter,
exit] via makeFullscreen and binding toggle, then set removeListener to the new
cleanup function; reference the existing symbols removeListener, makeFullscreen,
enter, exit, and toggle when implementing this check and reassignment.
- Around line 90-96: When the ref changes you set bound (in the createEffect
callback) but don't resync the isActive state; after assigning bound = node ?
makeFullscreen(node, nativeOptions) : null you must call the same sync routine
that the 'fullscreenchange' listener uses to update isActive (e.g. invoke the
handler that updates the isActive signal or explicitly read the current state
from bound (bound?.isActive() or query document.fullscreenElement) and set the
isActive signal accordingly); update the createEffect callback (near ref,
createEffect, bound, makeFullscreen, nativeOptions, isActive, fullscreenchange)
to run that sync so isActive is correct immediately when ref swaps.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 10e0acaf-30db-4a01-8a35-4052a9fa6736

📥 Commits

Reviewing files that changed from the base of the PR and between 76d6f2e and 01a4804.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (8)
  • .changeset/fullscreen-solid-2-migration.md
  • packages/fullscreen/README.md
  • packages/fullscreen/package.json
  • packages/fullscreen/src/index.ts
  • packages/fullscreen/test/index.test.ts
  • packages/fullscreen/test/server.test.ts
  • packages/fullscreen/test/setup.ts
  • packages/fullscreen/tsconfig.json

Comment thread .changeset/fullscreen-solid-2-migration.md
Comment thread packages/fullscreen/src/index.ts
Comment thread packages/fullscreen/src/index.ts
Comment thread packages/fullscreen/src/index.ts
@davedbase davedbase merged commit 4e96f48 into solidjs-community:next May 28, 2026
1 check was pending
@davedbase davedbase deleted the update/v2/fullscreen branch May 28, 2026 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants