Skip to content

feat(devices): add createWakeLock, createVibration, and createScreenOrientation primitives - #1031

Open
deny-dz wants to merge 1 commit into
solidjs-community:mainfrom
deny-dz:feat/devices-wakelock-vibration-orientation
Open

feat(devices): add createWakeLock, createVibration, and createScreenOrientation primitives#1031
deny-dz wants to merge 1 commit into
solidjs-community:mainfrom
deny-dz:feat/devices-wakelock-vibration-orientation

Conversation

@deny-dz

@deny-dz deny-dz commented Aug 22, 2026

Copy link
Copy Markdown

Summary

This PR expands @solid-primitives/devices with 3 mobile & kiosk hardware primitives:

  1. createWakeLock(): Screen Wake Lock API wrapper preventing screen dimming/locking during active presentations, timers, audio/video playback, and kiosk check-ins. Auto-releases on cleanup and re-acquires upon visibility recovery.
  2. createVibration(): Tactile Vibration & Haptics API wrapper for mobile buttons, toggles, success/error confirmations, and game interactions.
  3. createScreenOrientation(): Reactive Screen Orientation API wrapper observing orientation changes (portrait-primary, landscape-primary, angle) with programmatic lock() and unlock() capabilities.

Changes

  • packages/devices/src/wakelock.ts: Wake lock implementation.
  • packages/devices/src/vibration.ts: Vibration / haptics implementation.
  • packages/devices/src/orientation.ts: Screen orientation implementation.
  • packages/devices/src/index.ts: Re-exported new primitives.
  • packages/devices/test/devices-extras.test.ts: Vitest test suite.
  • .changeset/devices-wakelock-vibration-orientation.md: Minor changeset.

@changeset-bot

changeset-bot Bot commented Aug 22, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: dec6428

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/devices Minor

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

@coderabbitai

coderabbitai Bot commented Aug 22, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@deny-dz, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 57 minutes

Limit details: You’ve used all 4 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

Wait for the limit to reset, then comment @coderabbitai review or push new commits to the PR.

An organization admin can change what happens after included review limits in Billing.

How do review limits work?

CodeRabbit enforces per-developer PR review limits within each organization.

For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 28f33591-8b23-409f-ac35-e23ee0b63fbd

📥 Commits

Reviewing files that changed from the base of the PR and between c7b608c and dec6428.

📒 Files selected for processing (6)
  • .changeset/devices-wakelock-vibration-orientation.md
  • packages/devices/src/index.ts
  • packages/devices/src/orientation.ts
  • packages/devices/src/vibration.ts
  • packages/devices/src/wakelock.ts
  • packages/devices/test/devices-extras.test.ts

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.

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